API Configuration
When running from source, API reads these variables from the root .env. Docker Compose reads the same single .env, but its consumer allowlist injects only API settings into the API container. Shared values such as PUBLIC_BASE_URL, logging, OpenTelemetry, and the volume-transfer limit are authored once and forwarded only to their actual consumers. API reads and validates configuration only at startup; restart it after changes, and expect startup to fail when an explicitly selected ENV_FILE is missing or malformed.
Basic configuration
- Note:
SECRET_ENCRYPTION_KEYis required in production; changing it makes stored encrypted credentials unreadable. - Note: These settings create the first administrator only when the database has never contained a user. They never overwrite an active administrator; API refuses to start if users exist but no active administrator remains.
- Note: API and Agent must use the same
AI_INTERNAL_SECRET. - Note: Enabling the Helm chart Ingress requires the matching
app.trustedProxyCidrsvalue. Prefer dedicated Ingress or reverse-proxy source subnets actually seen by API and the proxy egress ranges in the trusted forwarding chain; use a whole Pod CIDR only when network isolation prevents every other Pod from reaching API directly. Do not use client ranges; API rejects0.0.0.0/0and::/0. Direct requests are limited by their socket peer, and a forwarded client IP is used only when that peer belongs to a trusted proxy CIDR. Public CLI device start, device-code polling, authorization-code, refresh, and revoke flows use independent source buckets.
The kubectl gateway never guesses a kubeconfig Server from the request Host. Restart API after changing PUBLIC_BASE_URL and issue replacement kubeconfig files for affected users. The reverse proxy must also preserve /kube/, support upgrades, disable stream buffering, and avoid logging raw query strings. See Kubernetes (Helm) Deployment.
Advanced configuration
Runtime and development
Database
Metrics and observability
Volume import and export
Volume content streams directly among the client, API, and runtime-cluster Transfer Pod. It does not require object storage, a callback URL, or a complete local API spool.