/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
| Variable | Required | Default | Description |
|---|---|---|---|
| PORT | No | 8080 | HTTP port |
| ENV | No | dev | dev or production |
| DB_URL | Yes | — | Postgres connection string |
| GCS_BUCKET | Yes | — | Object storage bucket name |
| GCS_ENDPOINT | No | — | Override for fake-gcs in dev |
| BQ_PROJECT | Yes | — | Warehouse project ID |
| BQ_DATASET | No | obsrv | Warehouse dataset |
| BQ_ENDPOINT | No | — | Override for BQ emulator in dev |
| JWT_SECRET | Yes | — | Shared with the dashboard |
| ANTHROPIC_API_KEY | No | — | Used for cluster auto-labelling |
| OPENAI_API_KEY | No | — | Used for embedding generation |
Dashboard
| Variable | Required | Default | Description |
|---|---|---|---|
| NEXT_PUBLIC_API_URL | No | http://localhost:8080 | Go API URL |
| NEXTAUTH_URL | No | http://localhost:3100 | Public dashboard URL |
| NEXTAUTH_SECRET | Yes | — | NextAuth session encryption secret |
| JWT_SECRET | Yes | — | Shared with Go API |
| DATABASE_URL | Yes | — | Same Postgres as Go API |
| AUTH_GOOGLE_ID | Yes | — | Google OAuth client ID |
| AUTH_GOOGLE_SECRET | Yes | — | Google OAuth client secret |
SDKs
| Variable | Required | Default | Description |
|---|---|---|---|
| THETA_API_KEY | Yes | — | Project API key |
| THETA_PROJECT | No | — | Optional project filter; API keys are project-scoped |
| THETA_BASE_URL | No | https://api.obsrv.tech | API endpoint |