Skip to main content
Aperium reads its configuration from environment variables on the backend pods. This page lists every variable a self-hosted deployment needs, grouped by what they control.

How configuration is layered

Aperium resolves configuration from three layers, in precedence order:
  1. Process environment variables (highest — an env var always wins).
  2. YAML config files — a non-secret host file plus a secrets file.
  3. Built-in defaults (lowest).
In a Kubernetes deployment you typically set everything through environment variables (this page’s catalog). The YAML layer is the convenient path for local and single-host deployments, and it produces the same settings a container would read from the environment. Point Aperium at these files with APERIUM_CONFIG_FILE (a comma-separated list of paths):
When APERIUM_CONFIG_FILE is unset, Aperium discovers conventional OS user and system config directories first, then falls back to repo-local config/ files. YAML values are layered into the environment without overwriting variables already set, so the precedence above holds automatically. APERIUM_ENV marks the deployment posture — one of local, test, dev, staging, production, or airgap. The staging, production, and airgap values are fail-closed: they reject development auth bypasses and require a database-backed permission store. airgap is the offline single-tenant production posture. A real deployment must set APERIUM_ENV explicitly.
Connector credentials are not configured here. Anything connector-specific (Google Workspace, Slack, Atlassian, Microsoft 365, Odoo, Salesforce, NetSuite, BigQuery, Onyx, and so on) is entered by an admin through the admin onboarding flow on first sign-in or the Admin Console’s MCP Servers tab afterward. Aperium stores those credentials encrypted against the tenant. See Integrations.

Application basics

Database

LLM providers

Aperium supports calling Claude either through Anthropic’s API directly or through AWS Bedrock. Pick whichever fits your security and procurement requirements (or run both side by side and select per-deployment with PRIMARY_LLM_PROVIDER).

Provider selection

Anthropic API

AWS Bedrock

Set BEDROCK_ENABLED=true to register Bedrock as a provider, then either supply IAM keys explicitly or leave them blank to use the standard boto3 credential chain (env vars, ~/.aws/credentials, instance profile, IRSA on EKS, etc.). Bedrock provider configuration is environment-driven only; there is no per-tenant override.

Other providers

Token and context window budgets

These caps control how Aperium splits the model’s context window across the system prompt, tool schemas, conversation history, and tool results.

Context management and loop detection

Response streaming

Prompt caching

Prompt caching lets the model reuse a long static prefix (system prompt + tool schemas + skills) across requests so you only pay full price for the first hit.

MCP runtime

These variables control how Aperium talks to MCP servers (both built-in connectors and any custom ones registered through the Admin Console). They do not contain connector credentials.

Tool loading and routing

Capability routing trims which tools are advertised to the model on each turn so context budget and latency stay reasonable when many MCP servers are connected.

Multi-pod and Redis

If you run more than one backend pod, you must enable Redis so pods can share session state and broadcast notifications.

Vector database (Qdrant)

Used for retrieval, memory, and other features that need vector search.

Tabular query backend

Aperium can compute its tabular analytics either against PostgreSQL or against BigQuery. Choose one with TABULAR_QUERY_BACKEND and configure that backend’s variables.

PostgreSQL backend

BigQuery backend

File uploads and shared storage

Aperium needs a place to store uploaded files. Choose local (a shared RWX volume) or gcs (a Google Cloud Storage bucket) and configure the matching variables.

Document processing

Sharing

Used by the share-link feature.

Email (SMTP)

Used for notification emails and invitations.

Tracing and observability

Aperium emits OpenTelemetry traces for the agent loop and tool calls. Phoenix is the bundled trace UI.

Sentry

Guardrails

Agent intelligence

Embedding cache (multi-pod)

When the backend runs with more than one replica, point Hugging Face and sentence-transformers at a shared volume so models aren’t downloaded to every pod.

Feature flags

These toggle UI features. They can be flipped per environment.

Frontend

The frontend reads URLs from environment variables prefixed with VITE_: