Skip to content

Configuration

Settings come from environment variables, with a few command-line flags. With Docker Compose, put them in .env (see .env.example); every line is passed into the container.

Server

Variable Flag Default What it does
ADDR / PORT -addr 127.0.0.1:8080 Listen address. PORT alone sets the port on loopback
BASE_PATH -base / URL prefix the app is served under. Must match the web build
CARDPRESS_DB_URL -db file:./data/cardpress.db SQLite file, libsql://... for Turso, or http://127.0.0.1:<port> for a libSQL server on this machine (file size limit)
CARDPRESS_DB_TOKEN Auth token for a hosted libSQL database
CARDPRESS_SERVE_WEB -serve-web true Serve the embedded web app. Turn off for an API-only server
CARDPRESS_MCP -mcp true Serve the MCP endpoint at /mcp

Access

Variable What it does
CARDPRESS_API_TOKEN Bearer token for /api/v1 and /mcp (at least 16 characters). Required unless the server is on loopback or CARDPRESS_INSECURE is set
CARDPRESS_INSECURE Allow a non-loopback address without a token, when something else protects it
CARDPRESS_ALLOWED_HOSTS Extra host names accepted when there is no token (otherwise only localhost names)
CARDPRESS_CORS_ORIGINS Browser origins allowed when the web app is hosted separately

Accounts

Variable What it does
CARDPRESS_DEFAULT_ROLE The role of a person who signs up: editor (default) or writer
CARDPRESS_MEDIA_BRAND_MB How many MB of files each brand's media library may hold. Default 200
CARDPRESS_SIGNUP closed stops self sign-up once the first account exists (admins add people). Default open
CARDPRESS_ADMIN_EMAIL If set, only this email can create the first (admin) account. Set it on a server reachable from the internet

See Accounts and roles. API keys are made in the app (Settings, API keys), not in the environment.

Public pages

Variable What it does
CARDPRESS_PUBLIC_URL The address readers use, with no path (https://example.com). It is written into the canonical link, the social preview tags and the sitemap. Without it the request's own host is used, which is fine for a trial and wrong behind a proxy
CARDPRESS_SITE_NAME The name shown on the public pages and in previews. Empty uses the brand's display name

See Public pages.

Stored credentials

Variable What it does
CARDPRESS_SECRET_KEY Encrypts the social credentials saved in the app (at least 32 characters, for example openssl rand -hex 32). Required with a hosted database or a non-loopback address. On a local single-user setup a key file is created next to the database

Credentials can also come from environment variables instead of the app; see Social accounts.

Assistant

Variable Default What it does
CARDPRESS_AGENT off off or cma (Claude Managed Agent)
CARDPRESS_AGENT_MANIFEST The agent manifest: a file, an https address or the JSON
CARDPRESS_AGENT_BUDGET_CENTS 200 Spend cap per conversation, in US cents; 0 = none
CARDPRESS_AGENT_TIMEOUT 12m Longest wait for one reply (10s to 30m)
ANTHROPIC_API_KEY Used to reach the agents
ANTHROPIC_WORKSPACE_ID For a key that covers several workspaces

See Claude Managed Agent.

Publishing

Variable Default What it does
CARDPRESS_MISSED_GRACE 15m How late a scheduled post may still go out (1m to 24h)
CARDPRESS_LINKEDIN_VERSION built in The LinkedIn-Version header
CARDPRESS_VIDEO_MAX_MB 500 The largest video a post may carry (1 to 500)
OTEL_*, ARIZE_PROJECT_NAME off Traces, metrics and logs over OTLP. See Telemetry
CARDPRESS_LINKEDIN_API_BASE LinkedIn API address; for tests and proxies only. Must be https (http only for localhost)

Docker Compose only

Variable Default What it does
CARDPRESS_BIND 127.0.0.1 Where the port is published
CARDPRESS_PORT 8080 Published port
CARDPRESS_IMAGE_TAG latest Image tag to run

Subcommands

Command What it does
cardpress Run the server
cardpress mcp Serve MCP over stdio for an agent on this machine; see MCP
cardpress healthcheck Exit 0 if the local server is up (used by the container health check)
cardpress -version Print the version