Skip to content
OpenPostDocs
OpenPostDocs

Configuration

Configure URLs, storage, provider apps, and optional self-hosted services.

The Docker Compose example reads .env when the container starts. Keep deployment settings there or in your secret store. OpenPost also has Settings → Instance → Configuration for settings it can store encrypted in its database. Environment values, including _FILE secrets, take precedence over matching database settings. Recreate the container with docker compose up -d --force-recreate openpost after changing .env. A plain restart keeps the previous environment.

Public addresses

SettingWhat to enter
OPENPOST_APP_URLThe public origin users open, such as https://post.example.com. OAuth callbacks derive from this value.
OPENPOST_PUBLIC_URLThe public origin used for server links and Telegram's webhook. Usually the same as the app URL.
OPENPOST_MEDIA_URLA public URL for media, such as https://post.example.com/media, or the default /media path when the public origin serves media.

Use HTTPS for a public instance and make sure your proxy forwards API and media requests. Set these URLs before registering provider callbacks. Changing the app URL later can require updating callback URLs in provider portals and reconnecting accounts. Provider integrations lists the callback for each provider.

When a proxy terminates HTTPS, configure OPENPOST_TRUSTED_PROXY_CIDRS for its upstream connection networks. Empty ignores forwarded IP and scheme headers. Follow reverse proxy setup before upgrading or exposing the instance.

Deployment secrets

Generate each secret separately:

openssl rand -base64 32
openssl rand -base64 32

Set OPENPOST_JWT_SECRET to the first value and OPENPOST_ENCRYPTION_KEY to the second. Store them in your platform's private environment settings or secret store. Keep both stable across restarts and restores. Losing the encryption key can make saved provider credentials unreadable.

Set OPENPOST_DISABLE_REGISTRATIONS=false until you create the first administrator. Use true afterward if public signup should close.

Storage

The Compose setup stores SQLite at /data/db/openpost.db and media at /data/media under its ./data bind mount. The repository's docker-compose.yml and platform recipes use an openpost_data named volume for the same paths. Back up the storage your deployment actually uses. Do not persist only the database; published media and draft attachments live in the media directory.

For PostgreSQL, set OPENPOST_DATABASE_DRIVER=postgres and OPENPOST_DATABASE_URL to the connection string. For S3-compatible storage, set OPENPOST_STORAGE_DRIVER=s3, OPENPOST_S3_ENDPOINT, OPENPOST_S3_REGION, OPENPOST_S3_BUCKET, OPENPOST_S3_ACCESS_KEY_ID, OPENPOST_S3_SECRET_ACCESS_KEY, and OPENPOST_S3_PUBLIC_BASE_URL. Set OPENPOST_S3_FORCE_PATH_STYLE=true only if your object store needs it. Migrate existing data before changing storage backends. A setting change does not move files or database records.

Back up the database, media, Compose file, and secrets as one restore set.

Provider apps

Follow social integration setup for provider credentials, callbacks, account connection, and readiness records. Environment-defined apps take precedence over saved entries and are read-only in Settings.

MCP tools

The MCP endpoint lists every operation directly by default. Set OPENPOST_MCP_MODE=search to make /mcp use the compact search, query, and execute surface, or OPENPOST_MCP_MODE=both to advertise both surfaces. The separate /mcp/code endpoint is always compact and needs no environment change. See MCP endpoints and tools before changing the default.

Useful controls

Set up email before enabling OPENPOST_EMAIL_VERIFICATION_REQUIRED=true. Add OPENPOST_EXTRA_CORS_ORIGINS only for other origins that need browser API access. Same-origin use needs no entry.

Workflow AI limits

OPENPOST_WORKFLOWS_AI_ENABLED=true enables autonomous workflow AI dispatch. Set it to false to stop new AI calls. OPENPOST_WORKFLOWS_AI_MONTHLY_CALL_LIMIT=1000 bounds calls per Workspace UTC month, including failed calls. Set the limit to 0 only when you intend unlimited operator-funded calls. These settings require a backend restart and do not change provider credentials or cancel calls already dispatched.

On this page