Environment variables
Every variable the server reads. Set them on the container; deploy/deployment.yaml lists the common ones. Default is what the server uses when the variable is unset; the image and deploy/deployment.yaml set a few themselves.
Core
A value that doesn't parse, or is below the minimum, falls back to the default.
| Variable | Default | Description |
|---|---|---|
PORT | 8080 | HTTP port the server listens on (API, UI, /metrics, probes). |
DATA_PATH | ./data/app.db; image: /data/app.db | SQLite database file. Must be on a persistent volume; the directory also holds session recordings unless SESSION_RECORDING_DIR is set. |
STATIC_DIR | ./public; image: /app/public | Directory of the React build the server serves. |
TIMEZONE | UTC; deployment.yaml: Europe/Istanbul | Time zone of audit log timestamps in the UI and CSV export. |
LOG_RETENTION_DAYS | 30 | How long audit events are kept in the database, in days; older ones are purged at start and every 12 hours. 0 = never purge. |
BACKUP_INTERVAL | 24h | How often the database is copied into BACKUP_DIR (Go duration: 12h, 24h). 0 = no scheduled copy; Admin → Backups can still make one. A copy is also made before an upgrade changes the database. |
BACKUP_KEEP | 7 | How many copies BACKUP_DIR keeps; the oldest beyond that are deleted after each new one. |
BACKUP_ALLOW_DOWNLOAD | false | true lets admins download the copies in Admin → Backups (each download is audited; an API key never can). A copy holds every stored credential, so this is off by default and set on the Deployment rather than in the UI: an admin account alone can't turn it on. Copies made before it was turned on can be downloaded too. |
BACKUP_DIR | backups` next to `DATA_PATH | Where database copies go. A copy holds every stored credential: without ENCRYPTION_KEY_FILE it also holds the key that decrypts them. |
API_KEY_READ_RETENTION_DAYS | 7 | How long successful reads made with an API key (list, get, logs, view_yaml, view_overview) are kept; they are most of an agent's audit volume. Writes, denials, failures, pod.exec and api_key.* events stay for LOG_RETENTION_DAYS. Console / Elastic lines are not affected. |
RESTART_HISTORY_RETENTION_DAYS | 30 | How long container exits (restart history) are kept. |
MAX_REPLICAS | 100 | Highest replica count the Scale endpoint accepts for Deployments and StatefulSets. |
Logging
| Variable | Default | Description |
|---|---|---|
LOG_FORMAT | text; deployment.yaml: ecs | ecs (Elastic Common Schema, nested JSON; use it for Elastic), json (flat JSON with short field names) or text (for reading by eye). |
LOG_LEVEL | info | debug, info, warn or error. Successful health probes and /metrics scrapes are logged at debug only. |
LOG_OUTPUT | stdout | stdout or stderr. |
LOG_ADD_SOURCE | false | Add the source file and line to every record (log.origin.* in ECS). |
LOG_INCLUDE_AUDIT | true | Write every audit event to stdout as well, one line per action, with the request id of its HTTP request line. With false the database still has them. |
APP_ENV | none; deployment.yaml: prod | Environment label on every log record (service.environment) and trace (deployment.environment), e.g. prod. |
APP_VERSION | the build version | Overrides the version on log records and traces (service.version), e.g. for a canary. |
Tracing (OpenTelemetry)
| Variable | Default | Description |
|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT | none | OTLP/HTTP receiver, e.g. http://otel-collector.observability:4318. Setting this or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT turns tracing on; the other OTEL_* variables of the OpenTelemetry specification (headers, sampler, resource attributes) apply as well. |
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT | none | OTLP/HTTP endpoint for traces only (full URL, including /v1/traces). |
OTEL_SERVICE_NAME | openconsole | service.name of the traces. |
Security and limits
| Variable | Default | Description |
|---|---|---|
PASSWORD_MIN_LENGTH | 8 | Minimum length of local passwords (create, change, admin reset). Passwords are also capped at 72 bytes (bcrypt). |
TRUSTED_PROXIES | none; deployment.yaml: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,fc00::/7 | Comma-separated CIDRs (or addresses) of the proxies in front of the console, e.g. the ingress controller's pod network. Only a connection from one of them may set the client address with X-Forwarded-For / X-Real-Ip; the address used is the first one from the right that isn't a trusted proxy. Empty = no header is believed and the client is the connection's source. It is the address in the audit, the sessions list and the sign-in lock. An invalid entry stops the server at start. |
ALLOWED_ORIGINS | none | Comma-separated origins (https://tools.example.com) of other sites whose pages may call the API from a browser (CORS). The console's own UI is same-origin and needs nothing here; curl, scripts and agents send no Origin and are not affected. Empty = no other site. An invalid entry stops the server at start. |
WS_ORIGIN_CHECK | warn | What happens to a WebSocket (pod shell, logs, live events) whose Origin is another site: not the request's own host (Host, or X-Forwarded-Host from a trusted proxy) and not in ALLOWED_ORIGINS. warn lets it through and logs ws.origin_mismatch; enforce refuses it with 403. Connections without an Origin are always accepted. |
ENCRYPTION_KEY_FILE | none | File holding the key that encrypts the stored cluster credentials, LDAP bind password and Azure AD secret: base64 of 32 bytes (openssl rand -base64 32), usually a mounted Kubernetes Secret. Unset = the key is kept in the database itself. When set, the first start re-encrypts every value with it, deletes the key from the database and signs everyone out once. An invalid key, or a value that can't be decrypted, stops the server at start. |
ENCRYPTION_KEY | none | The key itself, instead of ENCRYPTION_KEY_FILE (which wins when both are set). |
ENCRYPTION_KEY_PREVIOUS_FILE | none | During a key rotation: file holding the old key. Values still encrypted with it are re-encrypted with the new one on start; remove it afterwards. |
ENCRYPTION_KEY_PREVIOUS | none | The old key itself, instead of ENCRYPTION_KEY_PREVIOUS_FILE. |
ENCRYPTION_KEY_LOST | false | For one start, when the key the stored credentials were encrypted with is lost for good: true empties every value that can't be decrypted (each one is logged) instead of stopping the server, so an admin can enter the cluster credentials, LDAP bind password and Azure AD secret again. Needs ENCRYPTION_KEY_FILE (the new key). Remove it afterwards. |
EXEC_IDLE_TIMEOUT | 5m | A pod shell with no input for this long is closed. Go duration (90s, 10m, 1h); minimum 30s. |
MAX_EXEC_SESSIONS_PER_USER | 3 | Open pod shells per user; one more is refused with 429 and audited as pod.exec / rate_limited. 0 = unlimited. |
Sign-in
| Variable | Default | Description |
|---|---|---|
AZURE_AD_AUTHORITY | https://login.microsoftonline.com | Microsoft Entra ID sign-in host for national clouds, e.g. https://login.microsoftonline.us or https://login.chinacloudapi.cn. |
Session recording
Recording is configured in Admin → Recordings → Recording settings and stored in the database. These variables only seed those settings on the very first start (useful for scripted installs), except SESSION_RECORDING_DIR, which is read on every start.
| Variable | Default | Description |
|---|---|---|
SESSION_RECORDING_DIR | <dir of DATA_PATH>/recordings | Where .cast files are written. Read on every start. |
SESSION_RECORDING_ENABLED | true | Record new pod shell sessions. Seeds Admin → Recordings on the first start only, like the variables below; after that the setting in the UI wins. |
SESSION_RECORDING_RETENTION_DAYS | 30 | Daily purge of older recordings; 0 = never. First start only. |
SESSION_RECORDING_MAX_SIZE_MB | 10 | Per-session cap; past it the recording stops and is flagged truncated. First start only. |
SESSION_RECORDING_MAX_TOTAL_MB | 2048 | Quota for all recordings together. First start only. |
SESSION_RECORDING_MIN_FREE_MB | 512 | Free space always left on the recordings volume. First start only. |
SESSION_RECORDING_DISK_POLICY | evict_oldest | What happens at the quota: evict_oldest deletes the oldest recordings, stop stops recording new sessions. First start only. |
Feature flags
Switch a capability off for everyone, admins included, whatever the roles grant: FEATURE_<NAME>=false (or 0, no). Anything else, or unset, leaves it on. A disabled feature disappears from the UI, its endpoints answer 403 feature_disabled and the attempt is audited as denied. GET /api/features shows the current state; the startup log lists what is off.
| Variable | false turns off |
|---|---|
FEATURE_POD_EXEC | pod shell and one-command exec (pods:exec) |
FEATURE_YAML_EDIT | YAML edit / apply on every resource except Secrets ({resource}:edit) |
FEATURE_WORKLOAD_ACTIONS | Deployment restart and scale, StatefulSet scale |
FEATURE_SECRETS | the whole Secrets tab (every secrets:*) |
FEATURE_SECRET_REVEAL | revealing secret values (secrets:reveal) |
FEATURE_SECRET_EDIT | editing Secrets (secrets:edit) |
FEATURE_API_KEYS | API keys: the page, the /api/me/api-keys endpoints and signing in with a key (a key then gets 401) |