Skip to content

Environment Variables

AdventureLog configuration is driven by environment variables. The file you edit depends on your install type:

Install typeEnv fileCompose file
Standard Deployment.envdocker-compose.yml
Advanced Deployment.env.advanceddocker/docker-compose.advanced.yml
Traefik.env.advanceddocker/docker-compose.traefik.yaml
Development.envdocker/docker-compose.dev.yml

Validate before deploying:

bash
bash scripts/validate-env.sh
# or for Standard Deployment:
bash scripts/validate-env.sh .env

Standard Deployment minimal setup

Standard Deployment only requires POSTGRES_PASSWORD in .env. URLs, SECRET_KEY, and admin defaults are derived at container startup. See Standard Deployment.

URL and networking

These variables control how the browser, SvelteKit SSR, and Django talk to each other.

VariableRequiredUsed byDescriptionDefault
SITE_URLNoBothSingle public URL when frontend and backend share one domain. Derives ORIGIN, FRONTEND_URL, PUBLIC_URL, and CSRF_TRUSTED_ORIGINS when those are unset.
PUBLIC_SERVER_URLYesFrontend SSRInternal backend URL for server-side requests. Keep http://server:8000 in Advanced Deployment. Standard Deployment uses http://127.0.0.1:8000.http://server:8000
ORIGINSometimesFrontendPublic frontend origin (needed without HTTPS).http://localhost:8015
FRONTEND_URLYesBackendPublic frontend URL for emails and redirects.http://localhost:8015
PUBLIC_URLYesBackendPublic backend URL for media and OAuth callbacks.http://localhost:8016
CSRF_TRUSTED_ORIGINSYesBackendComma-separated browser origins allowed to submit forms.http://localhost:8015,http://localhost:8016
FRONTEND_PORTYesComposeHost port for the frontend container.8015
BACKEND_PORTYesComposeHost port for the backend container.8016
HOST_PORTNoStandard Deployment composeHost port mapped to the single-container stack.8015
BODY_SIZE_LIMITYesFrontendMaximum upload size in bytes.Infinity

See Advanced Deployment for a visual explanation of the URL model.

Database (PostgreSQL / PostGIS)

VariableRequiredDescriptionDefault
PGHOSTYesDatabase hostname inside Docker network.db
POSTGRES_DB / PGDATABASEYesDatabase name.database
POSTGRES_USER / PGUSERYesDatabase user.adventure
POSTGRES_PASSWORD / PGPASSWORDYesDatabase password. Change in production.changeme123

Django core

VariableRequiredDescriptionDefault
SECRET_KEYYesDjango secret key. Auto-generated in Standard Deployment if unset.changeme123
DEBUGNoEnable debug mode. Use False in production.False
DJANGO_ADMIN_USERNAMEYesFirst-boot superuser username.admin
DJANGO_ADMIN_PASSWORDYesFirst-boot superuser password.admin
DJANGO_ADMIN_EMAILYesFirst-boot superuser email.admin@example.com
GUNICORN_WORKERSNoGunicorn worker processes. Use 1 on small hosts; (2 × CPU) + 1 on larger servers.2
SKIP_WORLD_DATANoSet to 1 to skip the first-boot download-countries import (saves RAM; world travel data loads later).unset

Registration and authentication

VariableRequiredDescriptionDefault
DISABLE_REGISTRATIONNoBlock new account signups.False
DISABLE_REGISTRATION_MESSAGENoMessage shown when registration is disabled.Custom message
SOCIALACCOUNT_ALLOW_SIGNUPNoAllow new accounts via social providers when registration is disabled.False
FORCE_SOCIALACCOUNT_LOGINNoDisable password login; social/OIDC only.False
ACCOUNT_EMAIL_VERIFICATIONNonone, optional, or mandatory.none

Related guides: Social Auth, Disable Registration, API Keys.

Rate limiting

VariableRequiredDescriptionDefault
ENABLE_RATE_LIMITSNoEnable API rate limiting. Recommended in production.False
RATE_LIMIT_USERNoDefault authenticated user throttle.10000/hour
RATE_LIMIT_IMAGE_PROXYNoImage proxy endpoint limit.60/minute
RATE_LIMIT_IMAGE_IMPORTNoImage import limit.12/minute
RATE_LIMIT_EXTERNAL_GEOCODENoExternal geocoding limit.120/minute
RATE_LIMIT_EXTERNAL_RECOMMENDATIONSNoRecommendations API limit.30/minute
RATE_LIMIT_EXTERNAL_WIKIPEDIANoWikipedia lookup limit.60/minute
RATE_LIMIT_EXTERNAL_SUNRISE_SUNSETNoSunrise/sunset API limit.30/minute

See Advanced Configuration for usage notes.

Email (SMTP)

VariableRequiredDescription
EMAIL_BACKENDNoconsole (logs only) or email (SMTP).
EMAIL_HOSTIf SMTPSMTP server hostname.
EMAIL_PORTNoSMTP port. Default 587.
EMAIL_USE_TLSNoEnable TLS. Default true.
EMAIL_USE_SSLNoEnable SSL. Default false.
EMAIL_HOST_USERIf SMTPSMTP username.
EMAIL_HOST_PASSWORDIf SMTPSMTP password.
DEFAULT_FROM_EMAILIf SMTPSender address.

See SMTP Email.

Media storage

VariableRequiredDescriptionDefault
MEDIA_STORAGENolocal or s3.local
MEDIA_STORAGE_LIMIT_MBNoPer-user storage cap in MB (0 = unlimited).0
MEDIA_STORAGE_LIMIT_BYTESNoOverrides MB limit when set.0
AWS_ACCESS_KEY_IDIf S3S3 access key.
AWS_SECRET_ACCESS_KEYIf S3S3 secret key.
AWS_STORAGE_BUCKET_NAMEIf S3Bucket name.
AWS_S3_ENDPOINT_URLIf non-AWSProvider endpoint (R2, MinIO, Spaces).
AWS_S3_REGION_NAMENoRegion (auto for Cloudflare R2).
AWS_S3_CUSTOM_DOMAINNoCDN or custom domain for media URLs.

See S3 Media Storage.

Integrations

VariableRequiredDescription
GOOGLE_MAPS_API_KEYIf enabledGoogle Maps tiles and place search.
STRAVA_CLIENT_IDIf enabledStrava OAuth client ID.
STRAVA_CLIENT_SECRETIf enabledStrava OAuth client secret.
PUBLIC_UMAMI_SRCIf enabledUmami analytics script URL.
PUBLIC_UMAMI_WEBSITE_IDIf enabledUmami website ID.

Traefik compose

Used with docker/docker-compose.traefik.yaml:

VariableRequiredDescription
ACME_EMAILYesLet's Encrypt registration email.
TRAEFIK_DOMAINYesPublic domain for the Traefik router.

Operations

These are not application settings but affect management scripts:

VariableDescriptionDefault
COMPOSE_FILEOverride compose file (scripts/deploy.sh, backup, restore).Auto-detected
ADVENTURELOG_COMPOSESet to advanced to prefer Advanced Deployment when both env files exist. Legacy aio/standard values still select Standard Deployment.unset
BACKUP_DIRBackup output directory for scripts/backup.sh.backups
ADVENTURELOG_REFGit ref for installer downloads.main

See Operations & Maintenance.

Source of truth