/docs/self-host/env

Environment variables

Every obsrv service is configured by environment variables — no config files in containers.

Keep local and production databases separate. Local development should use localhost Postgres or the Docker Compose database. Production should use the managed Postgres/Cloud SQL connection from Secret Manager and must not point at a local connection string.

Go API

VariableRequiredDefaultDescription
PORTNo8080HTTP port
ENVNodevdev or production
DB_URLYes—Postgres connection string
GCS_BUCKETYes—Object storage bucket name
GCS_ENDPOINTNo—Override for fake-gcs in dev
BQ_PROJECTYes—Warehouse project ID
BQ_DATASETNoobsrvWarehouse dataset
BQ_ENDPOINTNo—Override for BQ emulator in dev
JWT_SECRETYes—Shared with the dashboard
ANTHROPIC_API_KEYNo—Used for cluster auto-labelling
OPENAI_API_KEYNo—Used for embedding generation

Dashboard

VariableRequiredDefaultDescription
NEXT_PUBLIC_API_URLNohttp://localhost:8080Go API URL
NEXTAUTH_URLNohttp://localhost:3100Public dashboard URL
NEXTAUTH_SECRETYes—NextAuth session encryption secret
JWT_SECRETYes—Shared with Go API
DATABASE_URLYes—Same Postgres as Go API
AUTH_GOOGLE_IDYes—Google OAuth client ID
AUTH_GOOGLE_SECRETYes—Google OAuth client secret

SDKs

VariableRequiredDefaultDescription
THETA_API_KEYYes—Project API key
THETA_PROJECTNo—Optional project filter; API keys are project-scoped
THETA_BASE_URLNohttps://api.obsrv.techAPI endpoint