Environment reference
Use the shipped .env.example as the complete version-matched reference. Never publish .env or use example secrets in production.
| Variable | Purpose |
|---|---|
API_BIND_HOST |
Optional API listening interface; use 127.0.0.1 for a local-only host-run API |
| APP_BASE_DOMAIN | Base hostname without scheme |
| PUBLIC_API_ORIGIN | Public API origin and asset URLs |
| PUBLIC_ADMIN_ORIGIN | Portal origin when different |
| CORS_ALLOWED_ORIGINS | Comma-separated browser origins |
| POSTGRES_* / DATABASE_URL | Database; URL overrides individual fields |
| REDIS_URL | Redis URI |
| JWT_SECRET | Strong signing secret |
| SOURCE_ENCRYPTION_KEY | Separate strong key for source secrets |
| DEVICE_TOKEN_PEPPER | Device-credential secret |
| SOURCE_HTTP_ALLOWED_HOSTS | Allowed HTTP/RSS hosts |
| SOURCE_DB_ALLOWED_HOSTS | Allowed database hosts |
| SOURCE_ALLOW_PRIVATE_NETWORKS | Permit intended private-network sources |
| ANDROID_UPDATE_MANIFEST_URL | HTTPS APK manifest; empty disables discovery |
One-host example
Section titled “One-host example”APP_BASE_DOMAIN=boards.company.comPUBLIC_API_ORIGIN=https://boards.company.comPUBLIC_ADMIN_ORIGIN=https://boards.company.comCORS_ALLOWED_ORIGINS=https://boards.company.comSet secrets separately; this is not a complete configuration. Restrict source networks to necessary hosts. Keep encryption keys stable and in protected backups: losing keys can make credentials unreadable.
The source-development API listens on port 3000. Separate admin/player servers need matching origins and CORS. Restart services after changes.