What this is for
The gateway is configured entirely through environment variables. The Register Gateway dialog on Deploy generates the minimum set you need (registration token, gateway name, optional LAN IP). This page is the full reference for every other variable the container accepts — production hardening, control-plane overrides, Supabase JWT validation, database/Redis, and observability. All variables are read once on startup. To change a value, edit.env (or your config-management equivalent) and restart the container.
Required: cloud registration
Every gateway you register from the dashboard runs in cloud mode and exchanges a one-time token for long-lived credentials.
After the first successful registration the token is ignored — credentials are loaded from disk on every subsequent boot. See Deploy → Step 4.
Production hardening
Recommended in production. The defaults are placeholder values that work for local development only — the gateway refuses to boot in any non-development environment if ENCRYPTION_KEY is left at its default or shorter than 32 characters.
Cloud overrides
The defaults already point at Guardway Cloud. Change these only for staging, an internal control plane, custom credential storage, or interval tuning.Full request and response bodies stay on the gateway host by default. Guardway Cloud receives request metadata (model, tokens, cost, latency), guardrail events with a redacted preview of up to 200 characters, and the heartbeat inventory. Audit logs stay local. Prompt text also reaches Guardway Cloud when you use Cloud-managed PII detection or Content moderation, when you run the Playground from app.guardway.ai, or when
GUARDWAY_CLOUD_SEND_BODIES=true. See Network Requirements.Supabase JWT validation
Set these when the gateway should accept dashboard Supabase JWTs directly (Phase 3.1 — used by direct-connect flows). Both must be set together.
When
GUARDWAY_SUPABASE_JWKS_URL is empty the gateway only validates locally-issued JWTs.
Server
CORS
All three accept comma-separated lists.
Database
The gateway ships with sensible defaults for the bundled Compose Postgres. Override only when pointing at an external database.Bundled Postgres tuning
These are.env keys for the bundle’s database service, not gateway variables. Sizing gives the value for each tier.
Capacity and retention
Local request history is kept forever unless you set a retention window. Gateway v0.5.46 or later; the retention and body-cap variables default to off so an upgrade never deletes or truncates existing history. Sizing explains how they drive disk size.Redis
Rate limiting (gateway-local)
These set the local request and token caps the gateway enforces. Org-wide caps are configured from Settings → Traffic and override these at runtime.Cache
These are gateway-local cache defaults. Org-wide cache settings configured from Settings → Traffic override these at runtime.Semantic cache (preview)
Observability
Egress proxy
Route the gateway’s outbound calls (control plane and LLM providers) through a corporate proxy. The standardHTTP_PROXY / HTTPS_PROXY / NO_PROXY variables are honored too; the GUARDWAY_PROXY_* variables take precedence and scope the proxy to Guardway’s own egress.
Model resolution
Guardrail sidecars
Optional guardrail engines that run beside the gateway, enabled with the composesecurity / safety profiles. The deployment owns these hostnames; the compose defaults point at the in-network service names, so you set these only to reach a sidecar running elsewhere (for example a LAN ML host). See the gateway’s security/README.md.
Safety SLM
Llama Guard 3 (moderation) and Prompt Guard (injection) run in a sidecar (docker compose --profile safety up) or on the Guardway Cloud managed endpoint. The rail fails open by default: if the sidecar is unreachable the gateway warn-logs and lets traffic through. The dashboard’s managed toggle overrides these at runtime.
MCP gateway
Periodic health checks of the MCP servers the gateway proxies, so a server that goes down after discovery doesn’t keep reading healthy.Admin UI
The gateway ships with a minimal local admin UI. Most users govern the gateway from the dashboard and leave this off.API key prefix
Related
- Deploy — minimum env vars from the Register Gateway dialog.
- Sizing — which capacity and retention values to set at 100k, 1M and 10M requests a day.
- Activate — what success looks like once the gateway boots.
- Settings → Traffic — org-wide rate-limit and cache settings that override the gateway-local defaults above.