RELAY_* environment variables. The standalone
image ships with sensible defaults and auto-generates its secrets on first
boot — a bare docker run needs no environment variables at all. The values
below matter when you move to a real (lean-image + managed-Postgres) deployment.
Environment variables
| Variable | Default | Description |
|---|---|---|
RELAY_PG_DSN | (required, except standalone) | Postgres connection string. The standalone image provides its own. |
RELAY_PORT | 8080 | Inference (data plane) listener port. |
RELAY_CONTROL_PORT | 8081 | Control plane + admin UI listener port. Set off to disable. |
RELAY_MASTER_KEY | (auto-generated on standalone) | 32-byte base64 key for stored-mode host keys. Generate with openssl rand -base64 32. Must be stable in production. |
RELAY_ADMIN_TOKEN | (auto-generated on standalone) | Break-glass control-plane bearer. Empty disables it on the lean image. |
RELAY_INFERENCE_API_URL | (standalone: http://localhost:8080) | Data-plane origin the admin UI calls (served via /config.json). Set to your public API URL in production. |
RELAY_STATE_BACKEND | memory | memory or redis. Use redis for multi-pod deployments. |
RELAY_REDIS_ADDR | (empty) | Required when RELAY_STATE_BACKEND=redis. |
RELAY_AUTO_SEED_IF_EMPTY | (empty) | When 1 and Postgres is empty, seed the catalog on boot. |
RELAY_CONFIG_DIR | config | Relay-internal YAML (rate limits, identity). |
RELAY_CATALOG_DIR | (empty) | Local catalog data tree to auto-seed from. The standalone image bakes this in. |
RELAY_COOKIE_SECURE | true | Set false for HTTP-only local dev (standalone defaults it to false). |
RELAY_SHUTDOWN_DEADLINE_S | 15 | Graceful shutdown budget in seconds. |
On the standalone image, the master key, admin password, and admin token are
generated on first boot, printed to the container logs, and persisted on the
data volume. To pin your own, pass them with
-e.Minimal standalone run
- Inference API →
http://localhost:8080 - Admin UI + control API →
http://localhost:8081 - Credentials are auto-generated and printed to the logs on first boot.
Persisting data across runs
A baredocker run uses an ephemeral filesystem, so starting a new
container regenerates the master key, admin credentials, and an empty catalog.
Mount a named volume to keep everything:
-v mount preserves the catalog, your config, and the
secrets. First boot against an empty volume generates them once; every run
after reuses them.