Skip to content

Settings

The gateway reads every setting from environment variables. Durations take h, m and s, such as 720h. Lists are separated by commas. A value that cannot work stops the start, with a message that names the setting.

Required

Variable What it is
KEERA_DATABASE_URL The Postgres connection string.
KEERA_OPERATOR_KEY The operator's credential, for the first sign-in and for automation. 16+ characters.
KEERA_SECRET_KEY Encrypts stored provider keys and directory tokens. 16+ characters. Keep it safe: without it, stored keys cannot be read.
Variable Default What it is
KEERA_PUBLIC_URL the request's host The address people open, such as https://keera.example.ch. Required for single sign-on, passkeys and payments.
KEERA_MODELS_FILE none The models each new organisation starts with. See Install.
KEERA_METRICS_TOKEN none A token that may read /metrics and nothing else.
KEERA_USAGE_RETENTION for ever How long the request log is kept. See Retention.
KEERA_AUDIT_RETENTION for ever How long the audit log is kept.
KEERA_UPSTREAM_PRIVATE all The host names inside your network that organisations may reach, such as keera-engine,keera-decider.

Sign-in

Variable What it is
KEERA_OIDC_PROVIDERS The names of the identity providers.
KEERA_OIDC_<NAME>_LABEL The text on the provider's sign-in button.
KEERA_OIDC_<NAME>_ISSUER The provider's address, or an ldaps:// directory.
KEERA_OIDC_<NAME>_CLIENT_ID, _CLIENT_SECRET The client registered with the provider.
KEERA_OIDC_<NAME>_LDAP_BIND_DN, _LDAP_BIND_PASSWORD, _LDAP_BASE_DN The service account and search base for a directory.
KEERA_OIDC_<NAME>_DOMAINS The email domains this provider may sign people in with.
KEERA_OIDC_<NAME>_GROUPS_CLAIM The claim that holds the groups, such as roles.
KEERA_OIDC_<NAME>_ADMIN_GROUPS Groups whose members are administrators.
KEERA_OIDC_<NAME>_OPERATOR_GROUPS Groups whose members are operators.
KEERA_OIDC_<NAME>_DEFAULT_ROLE The role of new people when no admin groups are set.
KEERA_OIDC_<NAME>_SIGNUP Lets people create their own organisation.
KEERA_OPERATORS Email addresses that are operators.
KEERA_PASSKEYS Turns on passkeys.
KEERA_CHAT_URL Lets people sign in to Keera Chat at this address.

See Single sign-on and passkeys.

Traffic

Variable Default What it is
KEERA_ADDR :8080 The address and port to listen on.
KEERA_MAX_BODY_BYTES 32 MiB The largest request, in bytes.
KEERA_UPSTREAM_HEADER_TIMEOUT 2m How long a model may take to start answering.
KEERA_REDIS_URL none Shares per-minute rate limits between several gateway replicas.
KEERA_TRUSTED_PROXIES private ranges The proxies in front whose X-Forwarded-For is trusted.
KEERA_SESSION_GAP 30m The pause that ends one task and starts the next.
KEERA_UI true Serves the control panel. Turn off to offer only the API.
KEERA_LOG_LEVEL info debug, info, warn or error.
KEERA_LOG_FORMAT text text or json.

Hosted providers and billing

Variable What it is
KEERA_PROVIDER_<NAME>_API_KEY The gateway's own key for a provider, such as KEERA_PROVIDER_ANTHROPIC_API_KEY. Every organisation then uses it, at list price, and the panel shows Billing.
KEERA_BILLING_POSTFINANCE_SPACE_ID, _USER_ID, _AUTH_KEY Turns on card payments through PostFinance Checkout.
KEERA_BILLING_VAT VAT added to each payment, in percent.
KEERA_CLAUDE_SUBSCRIPTIONS Lets Claude Code on a Claude plan through. See Claude plans.

Sandboxes

Sandboxes are off unless KEERA_SANDBOX_DRIVER is set.

Variable What it is
KEERA_SANDBOX_DRIVER kubernetes for real use, podman for local development.
KEERA_SANDBOXES_FILE The sandbox classes each new organisation starts with.
KEERA_SANDBOX_NAMESPACE The Kubernetes namespace for sandboxes. Use one of their own.
KEERA_SANDBOX_PUBLIC_URL The gateway as a sandbox reaches it, usually the in-cluster service.
KEERA_SANDBOX_RUNTIME_ISOLATED, _VM The runtime classes for gVisor and Kata.
KEERA_SANDBOX_GIT_FORGE github or gitlab, for repository access.
KEERA_SANDBOX_IDLE_SUSPEND Suspends an engineer's sandbox after this long without a connection.

Retention

By default, Keera deletes nothing: reports read the request log, and compliance reads the audit log.

KEERA_USAGE_RETENTION=720h      # keep 30 days of the request log
KEERA_AUDIT_RETENTION=17520h    # keep two years of the audit log

Values below 24h are refused. Daily totals are always kept, so usage charts over long periods still work after old requests are deleted. A request log row is about 1 KB with its indexes, and no prompt text is stored.