Changelog
Reference

Configuration

Every environment variable, grouped by surface — the compose stack, the gateway, the CLI and clients, and the developer-deployed agent-loop and executor.

Every knob is an environment variable. Defaults are chosen so an unedited .env boots a working local stack; the tables below are for anyone who wants non-default ports, credentials, or behavior. Longer stories link to the guide that owns them.

The compose stack

These live in .env (copy .env.example). Every one has a working default baked into docker-compose.yml, so a missing .env still boots.

VariableDefaultMeaning
POSTGRES_USERteaspillPostgres role (catalog store; also feeds Electric).
POSTGRES_PASSWORDteaspillPostgres password. Change it before exposing the port.
POSTGRES_DBteaspillDatabase name.
POSTGRES_PORT5432Host-side published port.
RESTATE_INGRESS_PORT8080Restate ingress (invocations in).
RESTATE_ADMIN_PORT9070Restate admin API (deployment registration).
RESTATE_METRICS_PORT9071Prometheus metrics.
RESTATE_NODE_PORT5122Node-to-node (reserved; unused single-node).
ELECTRIC_PORT_HOST3000Host-side published port for the shape API.
ELECTRIC_INSECUREtrueDev-only. Disables shape-API auth. Set false before exposing Electric.
DURABLE_STREAMS_PORT4437Host-side published port for the history store.
DURABLE_STREAMS_LOGinfoHistory-store log filter (errortrace).
GATEWAY_PORT8787Host-side published port for the gateway.
Published ports are for local debugging. In production the gateway is the only surface you expose; the other services stay on the internal network. See Self-hosting.

Gateway

The gateway reads everything from env. The defaults below are the standalone defaults; the compose stack overrides the upstream URLs to internal service names.

VariableDefaultMeaning
PORT8787Listen port.
HOST0.0.0.0Listen host.
TEASPILL_TENANTdefaultDeployment tenant used to expand /a/<type>/<id>.
RESTATE_INGRESS_URLhttp://localhost:8080Restate ingress (compose: http://restate:8080).
RESTATE_ADMIN_URLhttp://localhost:9070Restate admin API (compose: http://restate:9070).
ELECTRIC_URLhttp://localhost:3000Electric shape API (compose: http://electric:3000).
DURABLE_STREAMS_URLhttp://localhost:4437History store (compose: http://durable-streams:4437).
DATABASE_URLPostgres for API keys. Optional only if a bootstrap key is set.
GATEWAY_BOOTSTRAP_API_KEYDev-only literal key accepted without a database row.
GATEWAY_MAX_BODY_BYTES1048576Body cap (1 MiB) on commands and proxied writes. Oversize → 413.
GATEWAY_UPSTREAM_HEADERS_TIMEOUT_MS120000Upstream first-byte timeout; must exceed the long-poll park.
GATEWAY_JWT_SECRETHS256 secret enabling the browser read-token path. Unset ⇒ API keys only.
GATEWAY_JWT_CLOCK_TOLERANCE_SECONDS60Clock-skew leeway when verifying a read token's expiry.
GATEWAY_CORS_ALLOW_ORIGINS*Allowed origins for GET on /streams/* and /shapes/*.
LOG_LEVELinfoStructured-logging level.
OTEL_EXPORTER_OTLP_ENDPOINTWhen set, spans export via OTLP/HTTP; otherwise tracing is a no-op.

Auth-related variables are covered in depth in Auth & API keys.

CLI and clients

The CLI and the SDK clients are gateway clients. Their env names are deliberately distinct from the gateway's own server-side variables.

VariableDefaultMeaning
TEASPILL_GATEWAY_URLhttp://localhost:8787Gateway base URL.
TEASPILL_API_KEYGateway API key.
TEASPILL_TENANTdefaultDeployment tenant.
TEASPILL_DEPLOYMENT_URLhttp://host.docker.internal:9080Deployment URL(s) teaspill dev registers (comma-separated).

Agent-loop and executor

The two developer-deployed services (the reference deployment's agent-loop and executor-host) read these. The defaults shown are the overlay values.

VariableDefaultMeaning
PORT9080 / 9081Listen port (agent-loop / executor).
TEASPILL_GATEWAY_URLhttp://gateway:8787Gateway for health-wait and registration.
TEASPILL_INGRESS_URLhttp://restate:8080Restate ingress for tool and workspace clients.
TEASPILL_STREAMS_URLhttp://durable-streams:4437History store for event and exec output.
TEASPILL_DEPLOYMENT_URLhttp://agent-loop:9080 / http://executor:9081The URL Restate dials — service name in-network; http://host.docker.internal:<port> for host-run. Never localhost.
TEASPILL_API_KEYGateway API key for registration.
DATABASE_URLsynthesized by composeCatalog connection. Absent ⇒ a loud degraded mode.
TEASPILL_MIGRATE1Run idempotent catalog migrations on boot.
TEASPILL_MIGRATIONS_DIR/app/drizzleMigration directory (in the image).
TEASPILL_RECONCILERonThe background consistency loop. off disables it.
TEASPILL_IDLE_ARCHIVE_MS— (30 min)Idle auto-archive delay override, ms. Unset ⇒ the 30-minute default; 0 disables auto-archive. Short values are for testing the archive/resurrect round-trip only — never run production with a short window.
TEASPILL_WORKSPACE_ADAPTERdockerAdapter that private workspaces run in.
TEASPILL_EXECUTOR_ADAPTERdockerExecutor adapter. local-unrestricted opts into host exec (doubly gated).

Demo-agent gating

The reference deployment's demo agents are served only when their key or opt-in is present; a missing one skips the agent cleanly rather than crashing.

VariableMeaning
ANTHROPIC_API_KEYEnables the model-backed demo agents (both the native and Claude Agent SDK demos need it).
TEASPILL_DEMO_CASDKSet to 1 to additionally serve the Claude Agent SDK demo agent.
TEASPILL_DEMO_MODELOverrides the demo model.
TEASPILL_CASDK_SESSION_DIRSession directory for the Claude Agent SDK demo.