Developers
Environment configuration
Copy each repository's .env.example to .env. Git ignores .env; protect it with owner-only permissions and never prefix secrets with PUBLIC_.
Backend
| Variable | Purpose / default |
|---|---|
PGCONNECTSTRING | PostgreSQL URI. Compose overrides host to postgres. |
POSTGRES_DB/USER/PASSWORD | Compose database bootstrap; use a strong production password. |
BK_CLIENT_ID, BK_CLIENT_SECRET | BeatKhana OAuth application credentials. Required for OAuth. |
BK_CALLBACK_URL | Exact registered callback, default http://localhost:7198/oauth/callback. |
BK_API_URL, BK_AUTHORIZE_URL, BK_PUBLIC_KEY_URL | BeatKhana API/OAuth/key endpoints. |
BK_LINKING_URL | Player identity-linking page. |
PUBLIC_API_URL | Public backend origin used in generated download links and logs. |
WEBSITE_URL | Browser redirect origin after OAuth. |
CORS_ORIGIN | Allowed website origin. |
AUTH_COOKIE_DOMAIN | Use .compcube.net for API/site subdomains; blank locally. |
BEATLEADER_API_URL, SCORESABER_API_URL, BEATSAVER_API_URL, BEATSAVER_FALLBACK_API_URL | External identity/map services. |
PLUGIN_VERSIONS | Comma-separated accepted plugin versions. Blank accepts development builds/falls back to published versions for status. Pin production. |
PLUGIN_RELEASE_DIRECTORY | Persistent DLL/manifest storage. Compose uses /data/plugin-releases. |
PLUGIN_UPLOAD_SECRET | Long bearer secret shared only with GitHub Actions. The plugin workflow uses it only when the workflow ref is exactly main; other builds stay in GitHub Actions artifacts. |
PLUGIN_UPLOAD_MAX_BYTES | Raw DLL limit, default 25 MiB. |
DISCORD_TOKEN, DISCORD_CLIENT_ID, DISCORD_GUILD_ID | Optional bot; blank token disables it. |
REST_PORT, WS_PORT | Default 7198 and 8008. |
TIMER_POLL_MS, TIMER_LEASE_MS | Default 1000 and 30000 ms. |
DISCARD_SECONDS, PICK_SECONDS, ROUND_RESULTS_SECONDS | Defaults: 60-second discard, 45-second pick, and 6-second results display. ROUND_RESULTS_SECONDS must match the plugin's RoundResultsDurationSeconds; mismatched plugins are rejected. |
TRUST_PROXY | Express trusted proxy ranges; default private/loopback ranges. |
Website
PUBLIC_COMPCUBE_API_URL, PUBLIC_COMPCUBE_SOCKET_URL, PUBLIC_REPLAY_VIEWER_URL, PUBLIC_SITE_URL, PUBLIC_DISCORD_URL, and PUBLIC_GITHUB_URL are browser-visible. COMPCUBE_INTERNAL_API_URL is a private server-side route to the backend. In production it may be the public API origin or a private reverse-proxy/container address reachable from the website container.
Wiki
NEXT_PUBLIC_WEBSITE_URL controls the CompCube navigation link. WIKI_PORT controls the published Compose port (default 3001). No secret is required.