Configuration variables
Reference for Brume backend environment variables: identity, domains, database, tuning, and external services.
In brief
This reference inventories the backend environment variables, their expected values, and their effects.
In Kubernetes resource names, <instance> means global.instanceName or, when that value is empty, the Helm release name.
The Brume backend reads its configuration from the Kubernetes secret <instance>-backend-env, mounted as environment variables on the <instance>-backend deployment. This page lists each variable, its expected value, and its effect, to prepare a deployment and review an existing instance.
Model keys are managed separately: they live encrypted in the database, per workspace, and never transit through the environment. See The LLM key rule.
Identity and secrets
Three secrets anchor the cryptographic identity of the instance. They are generated once at deployment and kept in your secret manager, never in the repository.
| Variable | Role | Generation |
|---|---|---|
JWT_SECRET | Signing key for authentication tokens (JWT HS256). Rotating it invalidates all active sessions. | openssl rand -hex 32 |
APP_ENCRYPTION_KEY | Fernet key that encrypts the api_keys table (workspace LLM keys). | 32-byte base64 Fernet key |
BRUME_INTERNAL_SECRET | Secret for internal routes (cron, callbacks). Dev default dev-internal-secret, to replace in production. | openssl rand -hex 32 |
APP_ENCRYPTION_KEY: without it, LLM keys are unreadable
The api_keys table is encrypted with Fernet using this key. A database copy without APP_ENCRYPTION_KEY contains non-decryptable LLM keys: a database dump recovered alone gives access to no provider key. To replay a production database locally, export both the database AND this key. Rotating it makes stored keys undecryptable until they are entered again.
BRUME_TRUST_PROXY_HEADERS=true allows the frontend to pass the original IP
and User-Agent to the audit log. Enable it only when the frontend is reachable
exclusively through an ingress that replaces X-Real-IP and
X-Forwarded-For. The Helm chart enables it behind its Traefik IngressRoute;
Docker Compose keeps it disabled by default because the frontend port is
directly exposed.
Runtime environment
Two settings ship with development values and must change before the instance is exposed — Secure your instance picks them up in its checklist:
| Variable | Default | Effect |
|---|---|---|
ENVIRONMENT | development | Environment label. Debug routes are only exposed in development; switch to production before opening the instance. |
COOKIE_SECURE | false | Marks cookies as Secure. Set to true as soon as the instance is served over HTTPS. |
INVITE_CODES | empty | Valid invitation codes, comma-separated. Absent or empty, signup is open to everyone; once set, only the listed codes get through. |
Domains and brand
| Variable | Typical value | Effect |
|---|---|---|
APP_DOMAIN | brume.ai | Root domain of the instance. Base for all absolute links emitted by the backend. |
APP_PROTOCOL | https | Protocol for absolute links. Default https. |
HUB_SUBDOMAIN | v2 | Hub subdomain. Combined with APP_DOMAIN to build the hub URL (https://v2.brume.ai). Empty, the hub lives on the root domain. |
DOCS_URL | https://docs.brume.ai | Public URL of the bundled documentation, used by the application's licence and help links. |
BRAND_NAME | Brume | Brand name displayed in the interface and emails. |
Database
The database carries the entire stateful layer: application data, vector search, task queue, and agent checkpoints. Two connections with distinct privileges are involved at startup:
| Variable | Typical value | Effect |
|---|---|---|
DATABASE_URL | postgresql://brume_app:<runtime-pass>@<instance>-pg-rw:5432/brume | Least-privilege connection used continuously by the backend, worker, and tower. The brume_app role is created or reconciled at startup; its password is separate from the CNPG owner's password. |
DATABASE_ADMIN_URL | postgresql://postgres:<admin-pass>@<instance>-pg-rw:5432/brume | Administration connection used only to reconcile brume_app and run migrations. With Helm, init containers build it from the kubernetes.io/basic-auth superuser Secret and URL-encode its credentials. With the all-in-one image and an external database, it is required during initialization. |
CloudNativePG initializes the database with a third role, the bootstrap owner (<instance> by default). Its <instance>-pg-app Secret must contain neither the brume_app credentials nor DATABASE_URL. The environment Secret shared by the backend and worker must contain DATABASE_URL, but never DATABASE_ADMIN_URL.
All-in-one trust boundary
With an external database, the all-in-one initializer removes DATABASE_ADMIN_URL from the backend and worker process environments and does not persist it in its secrets file. The value remains visible in the container metadata, however. Use the multi-service Compose stack or Helm if you require administration credentials never to be attached to the long-lived application container.
Worker tuning
The worker processes two separate queues: document extraction (Docling, CPU-heavy) and vectorization (embedding calls, limited by network I/O). Each queue has its own concurrency, adjustable without touching the rest.
| Variable | Default | Queue | Load profile |
|---|---|---|---|
BRUME_PROCESSING_WORKERS | 2 | processing, attachments | Docling extraction, OCR, PDF transcription. CPU-bound: increase with the number of available cores. |
BRUME_EMBEDDING_WORKERS | 8 | embedding | Vector indexing. IO-bound: concurrency covers embedding call latency without saturating CPU. |
External services
Several functions rely on targeted third-party services. The principle is uniform: absence of the variable cleanly disables the function. On a self-hosted instance in a closed network, leaving these variables unset is enough to cut the corresponding outbound call.
| Variable | Service | Function | If absent |
|---|---|---|---|
SERPER_API_KEY | Serper | Web search | Web search disabled |
WEB_FETCH_PROXY_URL | The proxy of your choice | fetch_url fallback when a site refuses the request | No fallback: a refusal stays an error |
DAYTONA_API_KEY / DAYTONA_API_URL | Daytona | Code execution sandbox | Sandbox disabled |
COMPOSIO_API_KEY | Composio | External connectors (OAuth) | Connectors disabled |
POSTHOG_PROJECT_TOKEN | PostHog | Product analytics | Analytics disabled (explicitly logged) |
NTFY_URL | ntfy | Alert notifications | Notifications disabled |
The fetch_url proxy fallback
A datacenter-hosted instance goes out through an IP address many sites classify as non-human out of hand: they answer 403, 429, 451 or 503 to a page that is nonetheless public. WEB_FETCH_PROXY_URL gives fetch_url a second address to replay the request from — once, and only on those four statuses. A 404, a 500 or a timeout are not refusals and are never replayed.
The variable holds the full proxy URL, exactly as the HTTP library consumes it, credentials included:
WEB_FETCH_PROXY_URL=http://username:[email protected]:8080The provider is yours to pick. IP Royal supplies this kind of residential proxy and hands you a URL in exactly that format; any other provider will do as long as it returns a URL usable as-is.
The fallback call shows up in the outbound audit under the web-fetch-proxy service, distinct from the direct web-fetch: an operator can therefore see which of their calls went through the third party.
A proxy changes the origin address, not the browser: a page that requires JavaScript rendering stays out of reach either way.
Transactional emails (invitations, password resets) go out over SMTP when SMTP_HOST is set, otherwise through the Resend API when RESEND_API_KEY is. With neither, sending is disabled — Getting the instance running requires one of the two channels.
| Variable | Default | Effect |
|---|---|---|
EMAIL_FROM | Brume <[email protected]> | Sender address for outgoing emails. |
SMTP_HOST | empty | SMTP host. Empty, sending falls back to the Resend API. In development, point it at Mailpit (localhost). |
SMTP_PORT | 1025 | SMTP port. |
SMTP_USERNAME / SMTP_PASSWORD | empty | SMTP credentials, if the server requires them. |
SMTP_USE_TLS | false | Enables STARTTLS on the SMTP connection. |
RESEND_API_KEY | empty | Resend API key, used when SMTP_HOST is empty. |
Saving a key on a closed network
When you save a key, the backend tests it by calling the provider's model catalogue. Without outbound Internet access that test fails: the key is stored anyway, and the keys screen shows it as "unreachable". No variable to set.
The LLM key rule
Keys for model providers (Anthropic, OpenAI, Mistral) are not environment variables. They are stored in the api_keys table, encrypted with APP_ENCRYPTION_KEY, and resolved at runtime according to the workspace → tenant cascade. The backend never reads an LLM key from the environment.
This has two direct consequences for the operator:
- A variable like
ANTHROPIC_API_KEYin the backend environment has no effect: it is not consulted. Brume's BYOK model expects keys to be entered by workspace in the interface. - Each workspace carries its own keys. A tenant-level key serves as fallback when a workspace does not define one.
Details of this mechanism are in Your data and Architecture.
Helm configuration
The variables above feed the <instance>-backend-env secret. Deployment parameters (replicas, resources, PostgreSQL instances, backup, cluster domains) are configured in the Helm values of the brume-chart chart:
| File | Role |
|---|---|
ee/helm-chart/values.yaml | Default chart values: global.{clusterName, domain, apiDomain, docsDomain, towerDomain}, resources per component, PostgreSQL parameters, backup configuration. |
example-client.yaml | Values skeleton for a dedicated instance, to copy and adapt per instance. |