For AI agents: All required variables must be set before starting the CMS API. Missing required variables will cause startup to fail with an explicit error message.
This page documents every environment variable and Cloudflare binding used by LumiBase.
Core runtime
Variable
Required
Default
Description
LUMIBASE_ENV
✓
—
Environment label: development, staging, production
LUMIBASE_RUNTIME
Docker only
cloudflare
docker for Node.js/Docker; Cloudflare Workers infers from bindings
JWT_SECRET
✓
—
Secret for signing/verifying application JWTs. Min 32 chars. For Cloudflare production, set with wrangler secret put JWT_SECRET --env production; never commit or place in [env.production.vars].
LUMIBASE_DEV_AUTH
Local dev only
false
Set to true to bypass Logto auth in local dev. Never enable in production; pnpm release:check fails if production resolves to true.
LUMIBASE_REALTIME_ENABLED
✗
true
Set to false to disable WebSocket at deployment level
LUMIBASE_ADMIN_PATH
✗
(random)
Custom path for Studio admin panel (security through obscurity)
VITE_LUMIBASE_ALLOW_ADMIN_PATH_REDIRECT
Setup/debug only
false
Client-side opt-in that allows convenience redirects to the private admin path. Keep unset in production except for a temporary controlled setup/debug window.
The admin path is private operational state. Do not expose it through VITE_*
environment variables or client build metadata, and do not automatically
redirect public/setup routes to it in production. See
Private admin path.
NVIDIA hosted-inference key (build.nvidia.com / NIM). Billed by NVIDIA.
NVIDIA_BASE_URL
✗
Override the NVIDIA endpoint — e.g. a self-hosted NIM container (http://nim:8000/v1). Defaults to https://integrate.api.nvidia.com/v1.
VERTEX_ACCESS_TOKEN
If vertex provider
Google Cloud OAuth 2.0 bearer (gcloud auth print-access-token). Tokens expire (~1h). Billed to Google Cloud, not AWS.
VERTEX_PROJECT_ID
If vertex provider
Google Cloud project id that owns the Vertex AI models.
VERTEX_LOCATION
✗
Vertex AI region (default: us-central1).
LLM_MODEL
✗
Model name override (e.g., gpt-4.1-nano, claude-3-5-haiku-latest, gemini-3.5-flash, meta/llama-3.1-8b-instruct)
WORKERS_AI_GATEWAY
Workers AI only
CF Workers AI gateway URL
Provider ↔ billing:nvidia and vertex call external clouds — NVIDIA
and Google Cloud respectively — so their usage is not covered by AWS
credit. nvidia (or a self-hosted NIM via NVIDIA_BASE_URL) and MeiliSearch
are the pieces that pair naturally with AWS-hosted infrastructure.
Email (Resend)
Variable
Required
Description
RESEND_API_KEY
If email enabled
Resend API key for transactional email
EMAIL_FROM
If email enabled
Sender address (e.g., noreply@yourdomain.com)
SCIM provisioning
Variable
Required
Description
SCIM_TOKEN
If SCIM enabled
Bearer token for /scim/v2/ endpoint authentication
Pressure limiter (Docker / Node.js)
The Docker CMS process includes an overload guard for the Node.js event loop. When enabled and the process is saturated, API requests fail fast with HTTP 503, a SERVICE_UNAVAILABLE JSON envelope, Retry-After, and X-Lumi-Overload instead of queueing until the container becomes unresponsive. The guard bypasses /health and /metrics by default so operators can still inspect the instance.
Variable
Required
Default
Description
LUMIBASE_PRESSURE_LIMITER_ENABLED
Docker only
true
Enables the Node.js overload guard. Set false only as a temporary mitigation while you scale or optimize the overloaded path.
LUMIBASE_PRESSURE_LIMITER_SAMPLE_INTERVAL
✗
250
Sampling interval in milliseconds for event-loop pressure checks.
LUMIBASE_PRESSURE_LIMITER_MAX_EVENT_LOOP_DELAY
✗
1000
Maximum observed event-loop delay in milliseconds before API traffic receives 503. Set false to disable this threshold.
Optional utilization threshold such as 0.99. Disabled by default because sustained useful CPU work can otherwise produce noisy rejections.
LUMIBASE_PRESSURE_LIMITER_RETRY_AFTER
✗
5
Seconds advertised in the Retry-After response header.
LUMIBASE_PRESSURE_LIMITER_EXCLUDED_PATHS
✗
/health,/metrics
Comma-separated path prefixes that should keep serving during overload checks.
Rate limiting
A fixed-window throttle guards the authenticated API. It keys per principal (user → API key → IP) and is scoped per site. When exceeded it returns HTTP 429 with a RATE_LIMITED envelope plus X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After. It fails open if the cache is unavailable, so it is defence-in-depth rather than a hard quota.
Large imports can trip the default budget. Raise LUMIBASE_RATE_LIMIT_MAX and prefer the bulk endpoint — see Data import.
Variable
Required
Default
Description
LUMIBASE_RATE_LIMIT_MAX
✗
300
Max requests per window per principal, per site.
LUMIBASE_RATE_LIMIT_WINDOW_S
✗
60
Window length in seconds.
LUMIBASE_RATE_LIMIT_DISABLED
✗
(unset)
Set to true to disable the throttle entirely.
GraphQL
Every GraphQL operation is validated before it runs against a depth limit and a static cost limit, rejecting abusively deep or wide queries at parse time (CWE-770). Depth is a compile-time constant (12); cost is tunable. Raise LUMIBASE_GQL_MAX_COST if a legitimate query is rejected. See graphql-api-spec.md.
Variable
Required
Default
Description
LUMIBASE_GQL_MAX_COST
✗
1000
Max static cost accepted per operation.
LUMIBASE_GQL_DEFAULT_LIST_SIZE
✗
20
Cost multiplier for a list field with no literal pagination argument (or a variable one).
LUMIBASE_GQL_MAX_LIST_MULTIPLIER
✗
100
Upper clamp on any single list field's cost multiplier.