DATABASE_URL |
Postgres for users, credentials, keys, and OAuth sessions/tokens |
Required |
PORT |
Public OAuth 2.0 / Auth UI port |
5000 |
INTERNAL_PORT |
Internal health + /metrics (not public) |
5001 |
PUBLIC_ISSUER_URL |
Pins JWT iss and RFC 8414 authorization server metadata to this origin. Also used by POST /dev/token when enabled. Set this when the request origin is the container hostname, otherwise iss is the container origin and relying-party AUTH_ISSUER checks 401. |
Optional (required in prod compose); must be a bare http:// or https:// origin without path, query, or fragment; trailing slash stripped |
AUTH_CLIENTS_FILE |
Path to a JSON array of per-client OAuth configs: [{"id":"web","redirect_uris":["https://app.example.com/callback"],"audiences":["https://api.example.com"]}] (audiences optional, defaults to []). Use this when configuring multiple clients. Mutually exclusive with AUTH_ALLOWED_CLIENTS, AUTH_ALLOWED_REDIRECT_URIS, and AUTH_ALLOWED_AUDIENCES. Missing file, invalid JSON, duplicate IDs, or invalid redirect URIs fail startup. |
Unset |
AUTH_ALLOWED_CLIENTS |
Single OAuth client ID (at most 1 client allowed; multiple clients require AUTH_CLIENTS_FILE). Mutually exclusive with AUTH_CLIENTS_FILE. |
plat5 |
AUTH_ALLOWED_REDIRECT_URIS |
Comma-separated redirect URI allowlist for the single flat client. Validated at startup (http:// or https://, no #fragment per RFC 6749 §3.1.2). Mutually exclusive with AUTH_CLIENTS_FILE. |
Empty (deny all /authorize); explicit opt-in required. Dev compose defaults to http://localhost:5173/callback. |
AUTH_ALLOWED_AUDIENCES |
Comma-separated audience allowlist for the single flat client, checked on /authorize, /token (including refresh), and /dev/token. Mutually exclusive with AUTH_CLIENTS_FILE. |
Empty = audience must be omitted or match client_id. Non-empty = audience required and must match |
AUTH_ALLOWED_ORIGINS |
Comma-separated browser CORS origins. Validated at startup (must be bare http:// or https:// origins without path, query, or fragment). |
Empty (no CORS headers) |
TRUSTED_PROXIES |
Comma-separated IPv4/IPv6 addresses or CIDR blocks whose X-Forwarded-For header is trusted for client IP rate limiting. Walks X-Forwarded-For right-to-left skipping trusted proxies and takes the rightmost untrusted hop. Invalid entries fail startup. |
Empty (trust no proxies; always use direct socket peer IP and ignore forwarded headers) |
AUTH_DISPLAY_NAME |
Password-challenge email copy, and login UI title when AUTH_THEME_FILE omits title |
Plat5 |
AUTH_THEME_FILE |
Optional path to a Theme JSON object (title, favicon, logo, background, primary, font, radius, css). Omit = the bundled Plat5 theme (paper and ink, the blue bar, light or dark from the system). The issuer serves /static/wordmark.svg, /static/wordmark-dark.svg, /static/favicon.svg, and /static/inter-latin.woff2 for any theme to use. Missing file or invalid JSON fails startup. |
Unset |
SMTP_HOST |
Password-challenge SMTP host |
Required unless AUTH_DEV_MODE=true or AUTH_DISABLE_SIGNUP=true (no default). BYO provider or host-published MTA |
SMTP_PORT |
SMTP port |
587 |
SMTP_USER / SMTP_PASS |
SMTP auth |
With SMTP_HOST and SMTP_FROM, enables email. All four are required at startup unless AUTH_DEV_MODE=true or AUTH_DISABLE_SIGNUP=true |
SMTP_FROM |
Sender address for verification emails |
Required when sending email (no default) |
SMTP_TLS_INSECURE |
Skip TLS verify (local only) |
Only true skips |
AUTH_DEV_MODE |
Enables the dev-only conveniences: the POST /dev/token mint (oauth-surface.md), and logging login codes when SMTP is incomplete. Both let anyone sign in as any email, so never enable it in production. Logs a warning at boot when on |
Off. Only the exact string true enables it. Dev compose sets it; prod compose does not |
AUTH_DEV_USERS |
Dev-only seeded password logins: comma-separated email:password (password at least 8 characters). Set at every boot, so the env is the truth. Needs AUTH_DEV_MODE=true, or startup fails |
Unset. Dev compose seeds [email protected]:password |
AUTH_DISABLE_SIGNUP |
Disables self-service registration (/register and /register/verify return 403, prompt=create is ignored, register link hidden). Also hides password reset when SMTP is unconfigured. Use container CLI (bun run user:set, bun run invite:create) for zero-SMTP closed onboarding |
Off. Only the exact string true enables it |
AUTH_TOKEN_EMAIL |
Adds top-level email claim to access tokens. For an operator issuer, whose relying party records who acted. Leave it off for customers |
Off. Only the exact string true enables it |
OTEL_* |
See telemetry.md. Standard OpenTelemetry variables; an invalid value stops the issuer at boot |
— |