Configuration
The Settings UI, environment variables, and the AI backend.
Configuration
OpsRadar reads configuration from environment variables. You can set them two ways:
- Settings UI (recommended) — the dashboard's Settings page writes
~/.opsradar/.envand applies changes to the running process immediately, no restart. Sensitive values are masked and can be tested in place. - Environment /
.env— set variables directly (Docker Compose reads a.envfile next todeploy/docker-compose.yml; the CLI sources~/.opsradar/.envonopsradar start).
Variables
| Variable | Default | Purpose |
|---|---|---|
AGENT_BACKEND | auto | AI backend: auto, claude, claude-cli, or bob |
ANTHROPIC_API_KEY | — | Enables the Claude API backend |
ANTHROPIC_MODEL | claude-opus-5 | Override the Claude model (e.g. claude-sonnet-5, claude-haiku-4-5 for a cheaper/faster tier) |
CLAUDE_BIN | claude | Path/name of the Claude CLI binary |
BOB_BIN | bob | Path/name of the Bob Shell binary |
BOB_TASK_TIMEOUT | 3m | Per-workload analysis timeout (Go duration) |
BOB_SCAN_TIMEOUT | 10m | Whole-scan timeout (Go duration) |
GITHUB_TOKEN | — | GitHub token for PR generation (see Connect GitHub) |
GITHUB_REPO | — | Fallback target repository (owner/repo) |
GITHUB_CLIENT_ID | — | GitHub OAuth App client ID (for the connect-with-GitHub flow) |
GITHUB_CLIENT_SECRET | — | GitHub OAuth App client secret |
OPS_RADAR_API_KEY | — | API key for the HTTP API. Empty = auth disabled (dev only) |
KUBECONFIG | ~/.kube/config | Path(s) to kubeconfig file(s) |
STORE_PATH | ~/.opsradar/ops-radar.db | SQLite database file |
PORT | 8080 | API server port |
AI backend
On startup OpsRadar selects a backend. With AGENT_BACKEND=auto (the default) it tries, in order:
- Claude API — if
ANTHROPIC_API_KEYis set. - Claude CLI — if the
claudebinary is onPATH(reuses your~/.claudelogin). - Bob Shell — if the
bobbinary is onPATH.
Force one explicitly with AGENT_BACKEND=claude, claude-cli, or bob. If nothing is configured, cluster scanning is unavailable and the API logs a warning — the rest of the app still works. The Settings page can test a key (ANTHROPIC_API_KEY, GITHUB_TOKEN, GITHUB_REPO) with a live round-trip before you rely on it.
API key
When OPS_RADAR_API_KEY is set, every request except GET /health must include:
X-API-Key: <your-key>The pod-exec WebSocket can't send headers, so it authenticates with a ?key= query parameter instead. Leave the key empty for local development — the API logs a security warning when it's unset, because every endpoint (including /docker) is then unauthenticated.
Where settings live
The Settings UI stores everything in ~/.opsradar/.env, created with 0600 permissions and never leaving the machine. Keys are written in a fixed order and empty values are removed. You can edit this file by hand; changes apply on the next opsradar start (or immediately when saved through the UI).
Store path
- CLI / local run — defaults to
~/.opsradar/ops-radar.db(the directory is created automatically). - Docker / Helm — set
STORE_PATH=/data/ops-radar.dbonto a mounted volume (Docker Compose and the Helm chart already do this).
Override anywhere:
STORE_PATH=/tmp/ops-radar.db opsradar startMultiple kubeconfigs
KUBECONFIG accepts a colon-separated list; OpsRadar loads every context from every file and can scan any of them:
export KUBECONFIG=~/.kube/config:~/.kube/work-config
opsradar startEach context is verified on startup — one that's missing the permissions OpsRadar needs is logged as a warning, not a crash.