Environment variables
Every environment variable the gateway, the Slurm provisioner, the control plane and the benchmark backend read, with its default.
9 min readUpdated for v2.4.0Edit on GitHub
obleth has no configuration file. Each process reads the environment once at startup. Settings that change at runtime (routing, boons, alerts, energy, the Slurm connection, retention) live in Postgres and are changed from the dashboard or the Management API.
Boolean variables accept 1/0, true/false, yes/no and on/off,
in any case. An unparseable number falls back to the default.
obleth gateway
The Compose column says how deploy/docker/docker-compose.yml sets each
variable:
.env: forwarded fromdeploy/docker/.env. A value in brackets is the Compose default when it differs from the binary's.- fixed: hardcoded in the Compose file, so a value in
.envhas no effect. See variables Compose does not forward. - composed: built from other
.envvalues, such asREDIS_PASSWORD. - not set: Compose does not pass it, so the default applies.
For the Helm value behind each variable, see Helm values.
| Variable | Default | What it sets | Compose |
|---|---|---|---|
OBLETH_PROXY_LISTEN | 0.0.0.0:8080 | Data-plane bind address | fixed |
OBLETH_ADMIN_LISTEN | 0.0.0.0:9180 | Management API bind address | fixed |
OBLETH_METRICS_LISTEN | 0.0.0.0:9091 | Prometheus metrics bind address | fixed |
OBLETH_UPSTREAM_BASE_URL | http://127.0.0.1:8081 | Upstream for models with no api_base | .env (http://benchmark-backend:8081) |
OBLETH_UPSTREAM_TIMEOUT_SECS | 300 | Wait for upstream response headers; a model's request_timeout_secs overrides it | .env |
OBLETH_UPSTREAM_READ_TIMEOUT_SECS | the upstream timeout, at least 120 | Longest silence on an upstream connection, the wait for response headers included, so it also caps a non-streaming generation; 0 turns it off | .env (empty) |
OBLETH_UPSTREAM_POOL_IDLE_SECS | 15 | How long an idle upstream connection is kept; 0 disables reuse | not set |
OBLETH_UPSTREAM_TCP_KEEPALIVE_SECS | 30 | TCP keep-alive on upstream connections; 0 turns it off | not set |
OBLETH_DATABASE_URL | postgres://obleth:obleth@127.0.0.1:5432/obleth | Postgres URL | composed |
OBLETH_REDIS_URL | redis://127.0.0.1:6379 | Redis URL, in the form redis://:PASSWORD@host:6379 | composed |
OBLETH_REDIS_RESPONSE_TIMEOUT_MS | 250 | Wait for one Redis reply; 0 uses the default | .env |
OBLETH_REDIS_CONNECT_TIMEOUT_MS | 2000 | Wait for one Redis connect; 0 uses the default | .env |
OBLETH_REDIS_REWARM_SECS | 300 | Interval of the Postgres-to-Redis re-push; 0 turns the timer off, max 86400 | .env |
OBLETH_CLICKHOUSE_URL | http://127.0.0.1:8123 | ClickHouse HTTP endpoint | fixed (http://clickhouse:8123) |
OBLETH_CLICKHOUSE_DB | obleth | ClickHouse database | composed |
OBLETH_CLICKHOUSE_USER | default | ClickHouse user | composed (obleth) |
OBLETH_CLICKHOUSE_PASSWORD | empty | ClickHouse password | composed |
OBLETH_GLOBAL_MAX_IN_FLIGHT | 4096 | Safety ceiling across all model pools | fixed |
OBLETH_DEFAULT_MODEL_MAX_IN_FLIGHT | 32 | Pool size of a model with no max_in_flight | fixed |
OBLETH_FAIRSHARE_ALGORITHM | hierarchical | hierarchical; any other value means weighted | fixed |
OBLETH_FAIRSHARE_HISTORY_SECS | 3600 | Scheduler history kept for the Fairshare chart; 0 turns it off | fixed |
OBLETH_ADMISSION_TIMEOUT_SECS | 60 | Longest wait in the fairshare queue before a 503; 0 uses the default | .env |
OBLETH_FAIRSHARE_SHARED_SLOTS | true | Hold limits as cluster-wide slots in Redis when more than one replica is live | .env |
OBLETH_FAIRSHARE_REPLICA_AWARE | true | Split limits across live replicas when shared slots are off or unavailable | .env |
OBLETH_FAIRSHARE_REPLICA_HEARTBEAT_SECS | 5 | Replica heartbeat interval; 0 uses the default | .env |
OBLETH_FAIRSHARE_REPLICA_TTL_SECS | 15 | How long a heartbeat counts a replica as live; at least twice the heartbeat | .env |
OBLETH_FAIRSHARE_SESSION_AFFINITY | false | Favour warm agent sessions in each pool; see Session affinity | .env |
OBLETH_FAIRSHARE_SESSION_AFFINITY_WARM_SECS | 120 | How long after its last step a session counts as warm | .env |
OBLETH_FAIRSHARE_SESSION_AFFINITY_HOLD_MS | 3000 | How long a looping session's slot is held for its next step; 0 holds nothing | .env |
OBLETH_FAIRSHARE_SESSION_AFFINITY_MAX_JUMPS | 8 | Times a queued request may be passed by later requests of its key | .env |
OBLETH_FAIRSHARE_SESSION_AFFINITY_MAX_BYPASS_SECS | 30 | Wait after which nothing passes a request | .env |
OBLETH_FAIRSHARE_SESSION_AFFINITY_MAX_HELD_PERCENT | 25 | Most of a pool's slots held at once | .env |
OBLETH_CAPACITY_DISCOVERY_ENABLED | false | Run pool-size discovery for discovered models | .env |
OBLETH_CAPACITY_DISCOVERY_INTERVAL_SECS | 15 | How often discovery re-reads its sources; 0 uses the default | .env |
OBLETH_CAPACITY_DISCOVERY_NAMESPACES | empty | Comma-separated namespaces the kubernetes source reads, in order | fixed (empty) |
OBLETH_CAPACITY_DEFAULT_SERVICE | empty | Service name template for the kubernetes source | fixed (empty) |
OBLETH_VIDEO_JOB_RETENTION_HOURS | 24 | How long a video or mesh job record is kept; 0 uses the default | .env |
OBLETH_VIDEO_JOB_SCOPE | key | Who may see a video or mesh job: key or tenant | .env |
OBLETH_FAIL_OPEN | true | Admit without budget checks while Redis is down; a bad value stops startup | .env |
OBLETH_WAL_PATH | ./obleth-telemetry.wal | Telemetry write-ahead log; must be writable by uid 10001 | .env (/tmp/obleth-telemetry.wal) |
OBLETH_TELEMETRY_FLUSH_INTERVAL_MS | 5000 | How long each replica buffers usage rows and spans before inserting them into ClickHouse; clamped to 100–60000. A full buffer of 500 rows is inserted at once | .env |
OBLETH_SHUTDOWN_GRACE_SECS | 300 | How long shutdown waits for in-flight requests | .env |
OBLETH_ADMIN_TOKEN | required | Management API bearer token; the gateway will not start without it | .env (required) |
OBLETH_ENCRYPTION_KEY | unset | Base64 of 32 bytes; encrypts upstream secrets at rest | .env (empty) |
OBLETH_API_KEY_PEPPER | unset | Pepper mixed into API-key hashes; changing it invalidates every key | .env (empty) |
OBLETH_JWT_ISSUERS | unset | JSON array of trusted JWT issuers; invalid JSON exits with code 2 | .env (empty) |
OBLETH_BLOCK_PRIVATE_NETWORKS | false | Strict outbound URL policy (on only for 1, true, yes, on) | .env (empty) |
OBLETH_ALLOWED_PRIVATE_CIDRS | empty | Comma-separated CIDRs allowed in strict mode | .env (empty) |
OBLETH_MODEL_HEALTH_ENABLED | true | Run scheduled model health checks | .env |
OBLETH_MODEL_HEALTH_INTERVAL_SECS | 900 | Default interval between checks | .env |
OBLETH_MODEL_HEALTH_TIMEOUT_SECS | 30 | Timeout of one probe | .env |
OBLETH_MODEL_HEALTH_RETENTION_DAYS | 30 | Days of health-check history kept | .env |
OBLETH_USAGE_RETENTION_DAYS | 180 | Days of raw usage rows kept; the saved setting overrides it | .env |
OBLETH_AUTO_CLASSIFIER_ENABLED | false | Seeds the auto router classifier switch | .env |
OBLETH_AUTO_CLASSIFIER_MODEL | unset | Seeds the classifier model | .env (empty) |
OBLETH_AUTO_CLASSIFIER_TIMEOUT_MS | 250 | Seeds the classifier timeout | .env |
OBLETH_SESSION_ID_DERIVATION | true | Derive a session id when a request has none; only 0, false, no, off turn it off | .env |
OBLETH_COMPRESSOR_URL | unset | Compression sidecar URL; unset turns the neural stage off | .env (empty) |
OBLETH_COMPRESSOR_TIMEOUT_MS | 800 | Sidecar scoring timeout | .env (empty) |
OBLETH_SLACK_WEBHOOK_URL | unset | Seeds the Slack alert webhook | .env (empty) |
OBLETH_SLACK_ALERT_MIN_INTERVAL_SECS | 300 | Seeds the per-alert cooldown | .env |
OBLETH_OTEL_ENDPOINT | unset | OTLP/HTTP collector base URL; unset turns tracing off | .env (empty) |
RUST_LOG | info,obleth=debug | Log filter (EnvFilter syntax) | fixed |
Where to read more: fairshare engine, pool sizes, shutdown and timeouts, reliability, video generation, identity tokens, model health, auto model routing, alerting and Redis layout.
obleth-provisioner
The provisioner reads only its Management API connection and cadence. The slurmrestd URL, user, JWT and on/off switch are set in the Slurm connection on the Deployments page and fetched on every tick. See Slurm provisioning.
| Variable | Default | What it sets |
|---|---|---|
OBLETH_ADMIN_TOKEN | required | Management API token, the same as the gateway's |
OBLETH_ADMIN_BASE_URL | http://localhost:9180 | Management API base URL |
OBLETH_PROVISIONER_INTERVAL_SECS | 15 | Reconcile tick interval |
OBLETH_PROVISIONER_HEALTH_TIMEOUT_SECS | 5 | Timeout of one replica health probe |
OBLETH_PROVISIONER_WARMUP_TIMEOUT_SECS | 600 | Timeout of the warmup request after promotion; 0 skips warmup |
OBLETH_PROVISIONER_LOST_RETENTION_SECS | 900 | How long lost replica rows are kept |
OBLETH_PROVISIONER_RESTART_AFTER_FAILURES | 20 | Net failing probe ticks before a running replica is restarted; 0 turns it off |
OBLETH_PORT_SPAN | 8 | Width of each replica's port window |
OBLETH_PROVISIONER_JOB_PREFIX | obleth- | Slurm job-name prefix of jobs this gateway owns |
RUST_LOG | unset | Log filter; Compose and Helm set info,obleth_provisioner=debug |
Compose sets OBLETH_ADMIN_BASE_URL=http://obleth:9180 and forwards
OBLETH_ADMIN_TOKEN and OBLETH_PROVISIONER_RESTART_AFTER_FAILURES from
.env. Each generated sbatch script exports OBLETH_SERVING_PORT, the port
the launched model server binds; the provisioner sets it, it does not read it.
Control plane
| Variable | Default | What it sets |
|---|---|---|
OBLETH_ADMIN_TOKEN | required | Management API token |
OBLETH_ADMIN_BASE_URL | http://localhost:9180 | Management API base URL; Compose sets http://obleth:9180 |
OBLETH_PROXY_BASE_URL | http://localhost:8080 | Data-plane URL for the Playground, the portal, the assistant and MCP checks; Compose sets http://obleth:8080 |
DATABASE_URL | required | Postgres URL for the dashboard's sign-in tables |
DASHBOARD_ADMIN_EMAIL | unset | Email of the break-glass admin; Compose and Helm default to admin@example.com |
DASHBOARD_PASSWORD | unset | Break-glass admin password, at least 8 characters |
DASHBOARD_SESSION_SECRET | required unless BETTER_AUTH_SECRET is set | Session signing secret, at least 32 characters |
BETTER_AUTH_SECRET | DASHBOARD_SESSION_SECRET | Sign-in library secret; Compose and Helm set it to DASHBOARD_SESSION_SECRET |
BETTER_AUTH_URL | http://localhost:3000 | Dashboard URL as the browser sees it; Compose defaults to http://localhost:3002 |
TRUSTED_ORIGINS | empty | Comma-separated extra origins allowed to sign in; * allows any |
OIDC_PROVIDERS | unset | JSON array of SSO providers, see dashboard SSO |
OBLETH_RECIPES_DIR | ./recipes | Directory of launch recipe files for new deployments |
The break-glass admin is created at boot only when both DASHBOARD_ADMIN_EMAIL
and DASHBOARD_PASSWORD are set and no active admin exists. The container also
sets PORT=3000 and HOSTNAME=0.0.0.0 for the Next.js server.
benchmark-backend
The model-free OpenAI-compatible test upstream behind the benchmark Compose
profile, the Helm benchmarkBackend Deployment and
obench.
| Variable | Default | What it sets |
|---|---|---|
BENCHMARK_BACKEND_LISTEN | 0.0.0.0:8081 | Bind address |
BENCHMARK_BACKEND_TTFT_MS | 20 | Simulated time to first token |
BENCHMARK_BACKEND_TOKEN_MS | 5 | Delay between tokens; Compose and Helm set 3 |
BENCHMARK_BACKEND_DEFAULT_OUTPUT | 64 | Output tokens when a request sets no max_tokens |
BENCHMARK_BACKEND_CONCURRENCY | 10000 | Requests served at once before callers queue; Compose and Helm set 256 |
Each also accepts a MOCK_ spelling (MOCK_LISTEN, MOCK_TTFT_MS and so on)
as a fallback.
Compose-only variables
Docker Compose reads these to fill in docker-compose.yml; no obleth binary
reads them. See Docker Compose.
| Variable | Default | What it sets |
|---|---|---|
COMPOSE_PROFILES | benchmark,edge,observability in .env.example | Optional services to start |
OBLETH_VERSION | latest | Image tag of the first-party images; dev tracks edge builds |
OBLETH_COMPRESSOR_VERSION | latest | Image tag of the compression sidecar |
POSTGRES_USER / POSTGRES_PASSWORD / POSTGRES_DB | obleth / required / obleth | Bundled Postgres credentials |
REDIS_PASSWORD | required | Password the bundled Redis requires; use URL-safe characters |
CLICKHOUSE_USER / CLICKHOUSE_PASSWORD / CLICKHOUSE_DB | obleth / required / obleth | Bundled ClickHouse credentials |
COMPRESSOR_CPUS | 4 | Sidecar CPU quota and thread count |
COMPRESSOR_SOURCE / COMPRESSOR_MODEL_ID / COMPRESSOR_ONNX_FILE | onnx / chopratejas/kompress-v2-base / onnx/kompress-fp32.onnx | Build arguments that pick the sidecar's scoring model |
GRAFANA_ADMIN_USER / GRAFANA_ADMIN_PASSWORD | admin / required with observability | Grafana admin sign-in |
HAPROXY_STATS_USER / HAPROXY_STATS_PASSWORD | admin / admin | HAProxy stats page sign-in (edge profile) |
Set by the platform
The gateway also reads variables that the container runtime sets, not you:
HOSTNAMEnames the replica in its Redis heartbeat, with a random suffix. Without it the gateway reads/etc/hostname.KUBERNETES_SERVICE_HOSTandKUBERNETES_SERVICE_PORTlocate the API server for thekubernetescapacity source, with the pod's ServiceAccount token.
