OBLETHdocs

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 from deploy/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 .env has no effect. See variables Compose does not forward.
  • composed: built from other .env values, such as REDIS_PASSWORD.
  • not set: Compose does not pass it, so the default applies.

For the Helm value behind each variable, see Helm values.

VariableDefaultWhat it setsCompose
OBLETH_PROXY_LISTEN0.0.0.0:8080Data-plane bind addressfixed
OBLETH_ADMIN_LISTEN0.0.0.0:9180Management API bind addressfixed
OBLETH_METRICS_LISTEN0.0.0.0:9091Prometheus metrics bind addressfixed
OBLETH_UPSTREAM_BASE_URLhttp://127.0.0.1:8081Upstream for models with no api_base.env (http://benchmark-backend:8081)
OBLETH_UPSTREAM_TIMEOUT_SECS300Wait for upstream response headers; a model's request_timeout_secs overrides it.env
OBLETH_UPSTREAM_READ_TIMEOUT_SECSthe upstream timeout, at least 120Longest 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_SECS15How long an idle upstream connection is kept; 0 disables reusenot set
OBLETH_UPSTREAM_TCP_KEEPALIVE_SECS30TCP keep-alive on upstream connections; 0 turns it offnot set
OBLETH_DATABASE_URLpostgres://obleth:obleth@127.0.0.1:5432/oblethPostgres URLcomposed
OBLETH_REDIS_URLredis://127.0.0.1:6379Redis URL, in the form redis://:PASSWORD@host:6379composed
OBLETH_REDIS_RESPONSE_TIMEOUT_MS250Wait for one Redis reply; 0 uses the default.env
OBLETH_REDIS_CONNECT_TIMEOUT_MS2000Wait for one Redis connect; 0 uses the default.env
OBLETH_REDIS_REWARM_SECS300Interval of the Postgres-to-Redis re-push; 0 turns the timer off, max 86400.env
OBLETH_CLICKHOUSE_URLhttp://127.0.0.1:8123ClickHouse HTTP endpointfixed (http://clickhouse:8123)
OBLETH_CLICKHOUSE_DBoblethClickHouse databasecomposed
OBLETH_CLICKHOUSE_USERdefaultClickHouse usercomposed (obleth)
OBLETH_CLICKHOUSE_PASSWORDemptyClickHouse passwordcomposed
OBLETH_GLOBAL_MAX_IN_FLIGHT4096Safety ceiling across all model poolsfixed
OBLETH_DEFAULT_MODEL_MAX_IN_FLIGHT32Pool size of a model with no max_in_flightfixed
OBLETH_FAIRSHARE_ALGORITHMhierarchicalhierarchical; any other value means weightedfixed
OBLETH_FAIRSHARE_HISTORY_SECS3600Scheduler history kept for the Fairshare chart; 0 turns it offfixed
OBLETH_ADMISSION_TIMEOUT_SECS60Longest wait in the fairshare queue before a 503; 0 uses the default.env
OBLETH_FAIRSHARE_SHARED_SLOTStrueHold limits as cluster-wide slots in Redis when more than one replica is live.env
OBLETH_FAIRSHARE_REPLICA_AWAREtrueSplit limits across live replicas when shared slots are off or unavailable.env
OBLETH_FAIRSHARE_REPLICA_HEARTBEAT_SECS5Replica heartbeat interval; 0 uses the default.env
OBLETH_FAIRSHARE_REPLICA_TTL_SECS15How long a heartbeat counts a replica as live; at least twice the heartbeat.env
OBLETH_FAIRSHARE_SESSION_AFFINITYfalseFavour warm agent sessions in each pool; see Session affinity.env
OBLETH_FAIRSHARE_SESSION_AFFINITY_WARM_SECS120How long after its last step a session counts as warm.env
OBLETH_FAIRSHARE_SESSION_AFFINITY_HOLD_MS3000How long a looping session's slot is held for its next step; 0 holds nothing.env
OBLETH_FAIRSHARE_SESSION_AFFINITY_MAX_JUMPS8Times a queued request may be passed by later requests of its key.env
OBLETH_FAIRSHARE_SESSION_AFFINITY_MAX_BYPASS_SECS30Wait after which nothing passes a request.env
OBLETH_FAIRSHARE_SESSION_AFFINITY_MAX_HELD_PERCENT25Most of a pool's slots held at once.env
OBLETH_CAPACITY_DISCOVERY_ENABLEDfalseRun pool-size discovery for discovered models.env
OBLETH_CAPACITY_DISCOVERY_INTERVAL_SECS15How often discovery re-reads its sources; 0 uses the default.env
OBLETH_CAPACITY_DISCOVERY_NAMESPACESemptyComma-separated namespaces the kubernetes source reads, in orderfixed (empty)
OBLETH_CAPACITY_DEFAULT_SERVICEemptyService name template for the kubernetes sourcefixed (empty)
OBLETH_VIDEO_JOB_RETENTION_HOURS24How long a video or mesh job record is kept; 0 uses the default.env
OBLETH_VIDEO_JOB_SCOPEkeyWho may see a video or mesh job: key or tenant.env
OBLETH_FAIL_OPENtrueAdmit without budget checks while Redis is down; a bad value stops startup.env
OBLETH_WAL_PATH./obleth-telemetry.walTelemetry write-ahead log; must be writable by uid 10001.env (/tmp/obleth-telemetry.wal)
OBLETH_TELEMETRY_FLUSH_INTERVAL_MS5000How 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_SECS300How long shutdown waits for in-flight requests.env
OBLETH_ADMIN_TOKENrequiredManagement API bearer token; the gateway will not start without it.env (required)
OBLETH_ENCRYPTION_KEYunsetBase64 of 32 bytes; encrypts upstream secrets at rest.env (empty)
OBLETH_API_KEY_PEPPERunsetPepper mixed into API-key hashes; changing it invalidates every key.env (empty)
OBLETH_JWT_ISSUERSunsetJSON array of trusted JWT issuers; invalid JSON exits with code 2.env (empty)
OBLETH_BLOCK_PRIVATE_NETWORKSfalseStrict outbound URL policy (on only for 1, true, yes, on).env (empty)
OBLETH_ALLOWED_PRIVATE_CIDRSemptyComma-separated CIDRs allowed in strict mode.env (empty)
OBLETH_MODEL_HEALTH_ENABLEDtrueRun scheduled model health checks.env
OBLETH_MODEL_HEALTH_INTERVAL_SECS900Default interval between checks.env
OBLETH_MODEL_HEALTH_TIMEOUT_SECS30Timeout of one probe.env
OBLETH_MODEL_HEALTH_RETENTION_DAYS30Days of health-check history kept.env
OBLETH_USAGE_RETENTION_DAYS180Days of raw usage rows kept; the saved setting overrides it.env
OBLETH_AUTO_CLASSIFIER_ENABLEDfalseSeeds the auto router classifier switch.env
OBLETH_AUTO_CLASSIFIER_MODELunsetSeeds the classifier model.env (empty)
OBLETH_AUTO_CLASSIFIER_TIMEOUT_MS250Seeds the classifier timeout.env
OBLETH_SESSION_ID_DERIVATIONtrueDerive a session id when a request has none; only 0, false, no, off turn it off.env
OBLETH_COMPRESSOR_URLunsetCompression sidecar URL; unset turns the neural stage off.env (empty)
OBLETH_COMPRESSOR_TIMEOUT_MS800Sidecar scoring timeout.env (empty)
OBLETH_SLACK_WEBHOOK_URLunsetSeeds the Slack alert webhook.env (empty)
OBLETH_SLACK_ALERT_MIN_INTERVAL_SECS300Seeds the per-alert cooldown.env
OBLETH_OTEL_ENDPOINTunsetOTLP/HTTP collector base URL; unset turns tracing off.env (empty)
RUST_LOGinfo,obleth=debugLog 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.

VariableDefaultWhat it sets
OBLETH_ADMIN_TOKENrequiredManagement API token, the same as the gateway's
OBLETH_ADMIN_BASE_URLhttp://localhost:9180Management API base URL
OBLETH_PROVISIONER_INTERVAL_SECS15Reconcile tick interval
OBLETH_PROVISIONER_HEALTH_TIMEOUT_SECS5Timeout of one replica health probe
OBLETH_PROVISIONER_WARMUP_TIMEOUT_SECS600Timeout of the warmup request after promotion; 0 skips warmup
OBLETH_PROVISIONER_LOST_RETENTION_SECS900How long lost replica rows are kept
OBLETH_PROVISIONER_RESTART_AFTER_FAILURES20Net failing probe ticks before a running replica is restarted; 0 turns it off
OBLETH_PORT_SPAN8Width of each replica's port window
OBLETH_PROVISIONER_JOB_PREFIXobleth-Slurm job-name prefix of jobs this gateway owns
RUST_LOGunsetLog 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

VariableDefaultWhat it sets
OBLETH_ADMIN_TOKENrequiredManagement API token
OBLETH_ADMIN_BASE_URLhttp://localhost:9180Management API base URL; Compose sets http://obleth:9180
OBLETH_PROXY_BASE_URLhttp://localhost:8080Data-plane URL for the Playground, the portal, the assistant and MCP checks; Compose sets http://obleth:8080
DATABASE_URLrequiredPostgres URL for the dashboard's sign-in tables
DASHBOARD_ADMIN_EMAILunsetEmail of the break-glass admin; Compose and Helm default to admin@example.com
DASHBOARD_PASSWORDunsetBreak-glass admin password, at least 8 characters
DASHBOARD_SESSION_SECRETrequired unless BETTER_AUTH_SECRET is setSession signing secret, at least 32 characters
BETTER_AUTH_SECRETDASHBOARD_SESSION_SECRETSign-in library secret; Compose and Helm set it to DASHBOARD_SESSION_SECRET
BETTER_AUTH_URLhttp://localhost:3000Dashboard URL as the browser sees it; Compose defaults to http://localhost:3002
TRUSTED_ORIGINSemptyComma-separated extra origins allowed to sign in; * allows any
OIDC_PROVIDERSunsetJSON array of SSO providers, see dashboard SSO
OBLETH_RECIPES_DIR./recipesDirectory 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.

VariableDefaultWhat it sets
BENCHMARK_BACKEND_LISTEN0.0.0.0:8081Bind address
BENCHMARK_BACKEND_TTFT_MS20Simulated time to first token
BENCHMARK_BACKEND_TOKEN_MS5Delay between tokens; Compose and Helm set 3
BENCHMARK_BACKEND_DEFAULT_OUTPUT64Output tokens when a request sets no max_tokens
BENCHMARK_BACKEND_CONCURRENCY10000Requests 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.

VariableDefaultWhat it sets
COMPOSE_PROFILESbenchmark,edge,observability in .env.exampleOptional services to start
OBLETH_VERSIONlatestImage tag of the first-party images; dev tracks edge builds
OBLETH_COMPRESSOR_VERSIONlatestImage tag of the compression sidecar
POSTGRES_USER / POSTGRES_PASSWORD / POSTGRES_DBobleth / required / oblethBundled Postgres credentials
REDIS_PASSWORDrequiredPassword the bundled Redis requires; use URL-safe characters
CLICKHOUSE_USER / CLICKHOUSE_PASSWORD / CLICKHOUSE_DBobleth / required / oblethBundled ClickHouse credentials
COMPRESSOR_CPUS4Sidecar CPU quota and thread count
COMPRESSOR_SOURCE / COMPRESSOR_MODEL_ID / COMPRESSOR_ONNX_FILEonnx / chopratejas/kompress-v2-base / onnx/kompress-fp32.onnxBuild arguments that pick the sidecar's scoring model
GRAFANA_ADMIN_USER / GRAFANA_ADMIN_PASSWORDadmin / required with observabilityGrafana admin sign-in
HAPROXY_STATS_USER / HAPROXY_STATS_PASSWORDadmin / adminHAProxy stats page sign-in (edge profile)

Set by the platform

The gateway also reads variables that the container runtime sets, not you:

  • HOSTNAME names the replica in its Redis heartbeat, with a random suffix. Without it the gateway reads /etc/hostname.
  • KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT locate the API server for the kubernetes capacity source, with the pod's ServiceAccount token.