Configuration reference¶
Set values in the repository's .env before starting Compose. This is a focused overview; the environment template contains the complete set.
| Setting | Purpose |
|---|---|
SURLS_IMAGE |
Pin a published Surls release image for predictable updates. |
POSTGRES_PASSWORD |
Database password used by the Compose PostgreSQL service. Generate a hex value. |
AUTH_SECRET |
Authentication and encrypted-credential key. Keep stable and back it up. |
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY |
Private, stable runtime key for Server Actions. Published images use a disposable build key; source builds can use this key at build time. |
BASE_URL |
Exact public Surls application origin, without trailing slash. |
WEBAUTHN_RP_ID, WEBAUTHN_ORIGIN |
Passkey hostname and matching origin. |
SURLS_PORT |
Published app port; use 127.0.0.1:3000 for a local reverse proxy. |
SURLS_PUBLIC_WEBROOT_PATH |
Existing read-only public-page directory, default ./www. |
SURLS_UPLOADS_PATH |
Existing writable upload directory, default ./uploads. |
SMTP_HOST, SMTP_PORT, SMTP_FROM, SMTP_USER, SMTP_PASSWORD |
Optional environment SMTP configuration. Site admins can save a dashboard-managed override under Settings → Email. |
INITIAL_ADMIN_EMAIL, INITIAL_ADMIN_NAME, INITIAL_ADMIN_PASSWORD |
First admin; remove the password after first login. |
TRUST_PROXY |
Leave false unless you control and sanitize every proxy hop. |
TURNSTILE_SITE_KEY, TURNSTILE_SECRET_KEY |
Optional pair; set both or neither. |
UPLOAD_MAX_BYTES |
Default per-file upload limit (25 MiB), used until a site or user policy overrides it. |
UPLOAD_USER_STORAGE_QUOTA_BYTES, UPLOAD_SITE_STORAGE_QUOTA_BYTES |
Upload quota controls. |
CLICK_EVENT_RETENTION_DAYS, AUDIT_LOG_RETENTION_DAYS |
Retention windows, 365 days by default. |
DATABASE_URL in .env is for host-run development. Compose builds the app's container connection URL from POSTGRES_* values and the internal database hostname. See email delivery for connection checks, tests, and templates. Optional SMTP and external-provider environment settings are listed in the deployment and external sign-in guides.