This guide walks you through configuring environment variables for local development.
git clone git@github.com:datum/cloud-portal.git
cd cloud-portalbun installCopy the example environment file:
cp .env.example .envEdit .env with your values:
# Open in your editor
code .env # or vim .envThese must be set for the app to start:
| Variable | Description | Example |
|---|---|---|
APP_URL |
Your local app URL | http://localhost:3000 |
API_URL |
Control Plane API URL | http://localhost:8080 or staging URL |
SESSION_SECRET |
Session encryption key (min 32 chars) | your-super-secret-session-key-min-32-chars |
AUTH_OIDC_ISSUER |
OIDC provider URL | https://your-oidc-provider.com |
AUTH_OIDC_CLIENT_ID |
OIDC client ID | your-client-id |
These enhance the development experience:
# Logging
LOG_LEVEL=debug # debug | info | warn | error
LOG_FORMAT=pretty # json | pretty | compact
LOG_CURL=true # Generate CURL commands for API calls
LOG_REDACT_TOKENS=true # Hide sensitive tokens in logs
# Observability (for local stack)
OTEL_ENABLED=false
PROMETHEUS_URL=http://localhost:9090
GRAFANA_URL=http://localhost:3002| Environment | API URL |
|---|---|
| Local | http://localhost:8080 |
| Staging | https://api.staging.env.datum.net |
| Production | https://api.datum.net |
Run TypeScript check to ensure environment is properly configured:
bun run typecheckExpected: No errors. If you see environment-related errors, check your .env file.
| Variable | Required | Default | Description |
|---|---|---|---|
NODE_ENV |
No | development |
Environment mode |
VERSION |
No | - | Git commit SHA (set in CI) |
DEBUG |
No | false |
Enable debug mode |
| Variable | Required | Default | Description |
|---|---|---|---|
LOG_LEVEL |
No | info |
Log verbosity |
LOG_FORMAT |
No | pretty |
Log output format |
LOG_CURL |
No | false |
Generate CURL commands |
LOG_REDACT_TOKENS |
No | true |
Redact sensitive data |
LOG_PAYLOADS |
No | false |
Log request/response bodies |
| Variable | Required | Default | Description |
|---|---|---|---|
SENTRY_DSN |
No | - | Sentry error tracking |
SENTRY_ENV |
No | - | Sentry environment name |
OTEL_ENABLED |
No | false |
Enable OpenTelemetry |
OTEL_EXPORTER_OTLP_ENDPOINT |
No | - | OTEL collector endpoint |
| Variable | Required | Default | Description |
|---|---|---|---|
FATHOM_ID |
No | - | Fathom Analytics ID |
HELPSCOUT_BEACON_ID |
No | - | HelpScout support widget |
REDIS_URL |
No | - | Redis for rate limiting |
Your .env file should have at minimum:
APP_URL=http://localhost:3000
API_URL=https://api.staging.env.datum.net
SESSION_SECRET=<32+ character string>
AUTH_OIDC_ISSUER=<your OIDC issuer URL>
AUTH_OIDC_CLIENT_ID=<your client ID>Proceed to Running Locally.