Skip to main content

Backend Configuration

Complete reference for all environment variables consumed by the Go backend. The authoritative source is internal/app/env-setup.go (API server) and internal/app/env-setup-worker.go (eventsync worker).

Phase 0 note: per-variable descriptions, valid values, and environment-specific requirements to be filled in during baseline generation.

Environment groups

GroupEnv structPurpose
CoreRuntime environment label (local, dev, prod)
CookieCookieEnvSession cookie signing and encryption keys, domain, Gin mode
WebsiteWebsiteEnvFrontend base URL (used for redirect URIs)
LiveKitLiveKitEnvLiveKit Cloud API key/secret, server URL, project and region
WorkOSWorkOSEnvAuthKit API key, client ID, SSO/OAuth redirect URIs, webhook secret
WebSocketWebSocketEnvOffice-router Worker base URL, JWT issuer/audience/private key
R2 FilesR2EnvCloudflare R2 credentials and bucket for recording temp storage
R2 AvatarsR2AvatarEnvSeparate R2 bucket and public URL for user/org avatar storage
CloudflareCloudflareEnvCloudflare Worker URL (office-router)
GoogleGoogleEnvGoogle OAuth credentials (Calendar integration)
AvatarAvatarEnvAvatar processing config
Org LogoOrgLogoEnvOrg logo processing config
RecordingRecordingEnvRecording pipeline config
GrafanaGrafanaEnvGrafana Mimir push endpoint and credentials
SupabaseSupabaseEnvJWT secret (used to validate Supabase-issued tokens)
WebhookWebhookEnvInbound webhook signing secret (WorkOS events)

Worker-specific overrides

The eventsync worker binary reads the same env file as the API server but supports one override:

  • WORKER_POSTGRES_URL — if set, replaces POSTGRES_URL for the worker process. Used to point the worker at a dedicated database while the API server continues using the main one.

Notes

  • All secrets (keys, signing secrets, credentials) are managed as org-level GitHub Actions secrets and injected at deploy time by Sevalla. No secrets are committed to the repository.
  • Local development uses a .env file loaded by godotenv. The file is gitignored; obtain values from the shared secrets store.
  • The GIN_MODE variable controls Gin's behaviour: debug locally, release in production. Setting debug in production degrades performance and enables verbose output.