DOCS / DEPLOYMENT / CONFIGURATION REFERENCE
Configuration Reference
Both apps validate their environment eagerly at boot via @xcvzlabs/env — a missing or malformed variable crashes startup with a clear error rather than failing later at request time.
Gateway (apps/gateway/.env)
PORTnumber, default 3001Read natively by Nitro's
bun preset — not part of the @xcvzlabs/env schema.API_KEY_PEPPERstring, required, min 32 chars Generate with
bun run generate-pepper. Losing it invalidates every issued key at once — see Security. OPENAI_API_KEYstring, optionalRequired only if the registry references
provider: 'openai'.ANTHROPIC_API_KEYstring, optionalRequired only if the registry references
provider: 'anthropic'.GOOGLE_API_KEYstring, optionalRequired only if the registry references
provider: 'google'.OLLAMA_BASE_URL / OLLAMA_API_KEYstring, optional A provider is "configured" once
OLLAMA_BASE_URL is set; the API key is optional even then. See Ollama & vLLM. VLLM_BASE_URL / VLLM_API_KEYstring, optionalSame pattern as Ollama.
DB_HOST / DB_PORT / DB_USER / DB_PASSWORD / DB_SSL / DB_DATABASEstrings, required The gateway's Postgres connection.
DB_SSL accepts only the literal strings "true"/"false" (see booleanEnv). Dashboard (apps/dashboard/.env)
NUXT_BETTER_AUTH_SECRETstring, requiredGenerate with
openssl rand -base64 32. Signs/encrypts better-auth sessions.LATTICE_GATEWAY_URLstring (URL), requiredThe gateway's base URL.
/management/v1 is appended automatically by gatewayFetch.LATTICE_MANAGEMENT_API_KEYstring, required Minted with
bun run gateway seed-management-key <name>. Server-side only — never sent to the browser. See Dashboard Setup & Auth. DB_HOST / DB_PORT / DB_USER / DB_PASSWORD / DB_SSL / DB_DATABASEstrings, required The dashboard's own Postgres connection — better-auth tables only, independent of the gateway's database.
What changing the model registry requires
The registry (apps/gateway/server/registry/models.config.ts) is code, not environment configuration — adding, removing, or repricing a model requires a code change and redeploy of the gateway, not an env var change. See Model Registry & Routing.