Self-hosting

Configuration reference

Every environment variable a self-hosted Brunel reads, grouped by purpose, with what is required and how to generate secrets.

Generate secrets with openssl rand -base64 32 unless stated otherwise. Never commit real values.

Storage

VariablePurpose
DATABASE_URLPostgreSQL connection string. Without it (and without Blob), the in-memory store is used and nothing persists
BLOB_READ_WRITE_TOKENVercel Blob store, as an alternative to PostgreSQL
BRUNEL_DEMO_MODE1: in-memory store and demo banner

Sign-in and secrets

VariablePurpose
AUTH_URLPublic address, e.g. https://brunel.example.com
AUTH_SECRETEncrypts the session cookie
AUTH_GITHUB_ID, AUTH_GITHUB_SECRETGitHub OAuth app for sign-in
AUTH_ENCRYPTION_KEY32 bytes, base64: seals GitHub tokens and other secrets (AES-256-GCM)
AUTH_ENCRYPTION_KEY_PREVIOUSThe previous key during a rotation; stored secrets are re-sealed by the daily job
BRUNEL_ALLOWED_LOGINSPrivate mode: only these GitHub logins can use the instance (comma-separated)
BRUNEL_OWNER_LOGINSOperators with the unlimited owner plan (comma-separated)

AI reasoning

All optional: without them the deterministic architect answers.

VariablePurpose
REASONING_BASE_URL, REASONING_API_KEY, REASONING_MODELAn OpenAI-compatible reasoning endpoint
REASONING_MAX_TOKENSOutput token cap per call
REASONING_MONTHLY_TOKEN_BUDGETMonthly token cap for the whole instance; beyond it, the deterministic architect answers
ANTHROPIC_API_KEY, ANTHROPIC_MODELAlternative provider configuration
BRUNEL_LLM_OFF1: kill switch, never call an AI provider
BRUNEL_LLM_MOCKfixtures: replay recorded answers (tests, offline demos)

GitHub

VariablePurpose
GITHUB_TOKENOptional server token for a higher public GitHub API rate limit
BRUNEL_GITHUB_APP_ID, BRUNEL_GITHUB_APP_SLUG, BRUNEL_GITHUB_APP_PRIVATE_KEY, BRUNEL_GITHUB_APP_WEBHOOK_SECRETThe optional GitHub App (all four together)

Billing

VariablePurpose
STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRETStripe checkout and webhooks
STRIPE_PRICE_PRO, STRIPE_PRICE_BUSINESSStripe price ids of the paid plans

Certificates

VariablePurpose
BRUNEL_CERT_SIGNING_KEYEd25519 private key (PKCS#8 PEM or base64 DER): openssl genpkey -algorithm ed25519
BRUNEL_CERT_SIGNING_KEY_PREVIOUSThe previous key during a rotation, published for verification only

Operations and security

VariablePurpose
CRON_SECRETBearer secret of the daily and monthly jobs
UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKENShared rate limits across instances
BRUNEL_GUEST_ANALYSES_PER_HOURGuest analyses per address per hour (default 5)
BRUNEL_OUTBOUND_ALLOWLISTRestrict user-configured destinations (webhooks, SSO issuer, own AI endpoint) to these hosts; .example.com covers subdomains
BRUNEL_SECURITY_ALERT_WEBHOOKSlack-compatible webhook for critical security events

Hosts

VariablePurpose
BRUNEL_SUBDOMAINS1: console on console., enterprise. and portal.
BRUNEL_API_SUBDOMAIN1: REST API and MCP on api.
BRUNEL_CDN1 at build time: static files from cdn.
BRUNEL_DOCS_SUBDOMAIN1: this documentation on docs.
Configuration reference · Brunel Docs