Skip to content
esc
Type to search. Use ↑ ↓ to move, ↵ to open.
Self-hosting

Configuration

Every knob is an environment variable in the repo-root .env, read by docker compose, the web app and the Go services.

Updated 10 Sept 2026 beta 2 min read

Database #

VariableDefaultNotes
DATABASE_URL—Full connection string. Leave empty under compose so it is built from the parts below; .env.example ships a local development value that must be cleared.
POSTGRES_USERappCompose provisions the db service from these.
POSTGRES_PASSWORD—Required.
POSTGRES_DBtrackr
POSTGRES_HOST POSTGRES_PORTlocalhost 5432Compose overrides the host to db. Under compose, POSTGRES_PORT only changes the port published on the host; containers always use 5432.

Routing and auth #

VariableDefaultNotes
ORIGINunsetKeep unset behind a proxy that sets forwarded headers.
PROTOCOL_HEADER HOST_HEADERx-forwarded-proto x-forwarded-hostHeader names the app trusts.
XFF_DEPTH1Number of proxies in front.
BETTER_AUTH_SECRET—Required. 32+ characters.
ROOT_EMAIL ROOT_NAMEroot@example.com RootSeeded superadmin account.
ROOT_PASSWORD—Required on first start. 8+ characters.

Email #

Read by the worker.

VariableDefault
EMAIL_FROM— (required once SMTP_HOST is set)
SMTP_HOSTempty = log to console
SMTP_PORT587
SMTP_SECUREtrue when SMTP_PORT is 465, else false
SMTP_USER SMTP_PASS—
DIGEST_TZEurope/Berlin (web app and worker; not forwarded)

Storage #

See Docker Compose → Storage for the STORAGE_* and S3_* variables. The S3_* variables are not forwarded by the shipped compose file.

Worker #

VariableDefaultNotes
WORKER_CONCURRENCY4Parallel jobs per worker.
WORKER_JOB_TIMEOUT4mPer-job deadline. Must be shorter than WORKER_REAP_AFTER.
WORKER_POLL_INTERVAL1sFallback poll; LISTEN/NOTIFY wakes it instantly.
WORKER_NOTIFYtrueSet to false to disable LISTEN/NOTIFY, for example behind a transaction-mode pooler.
WORKER_HEARTBEAT WORKER_REAP_AFTER30s 5mStale jobs are re-queued after the reap window while they have attempts left, otherwise marked failed. Heartbeat must be shorter than the reap window.
WORKER_BACKOFF_BASE WORKER_BACKOFF_CAP10s 10mExponential retry backoff.
WORKER_JOB_TYPESallComma-separated list to pin a worker to some job types.
WORKER_IDhostnameAppears in the worker's log lines. Not forwarded.

Scheduler #

VariableDefaultNotes
SCHEDULER_POLL_INTERVAL5s
SCHEDULER_BATCH_SIZE100
SCHEDULER_IDhostnameNot forwarded.

Webhooks and push #

VariableDefaultNotes
WEBHOOKS_ENABLEDtrueWeb app. Not forwarded.
WEBHOOK_TIMEOUT10sWorker. Not forwarded.
WEBHOOK_MAX_BODY2048Bytes of the response body kept per delivery attempt. Worker. Not forwarded.
WEBHOOK_ALLOW_PRIVATE_URLSfalseDevelopment only; also allows plain http://. Web app and worker. Not forwarded.
PUSH_ENABLEDfalseLets the web app enqueue push.send jobs. Delivery also needs the APNS_* values in the worker; without them the jobs are skipped.
APNS_KEY APNS_KEY_ID APNS_TEAM_ID APNS_BUNDLE_ID—APNs credentials for the iOS app. APNS_KEY accepts PEM content, a file path or base64.
APNS_ENVproductiondevelopment for sandbox pushes.
Edit this page on GitHub