Configuration
Govrix Scout is configured entirely through environment variables. There is no config file required — every setting has a sensible default except for GOVRIX_API_KEY and GOVRIX_DATABASE_URL, which must be provided.
GOVRIX_API_KEY is required. All management API requests (port 4001) are rejected with HTTP 401 if this variable is not set or the bearer token does not match.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
GOVRIX_API_KEY | Yes | — | Bearer token for the management API (port 4001). Set to any strong random string. |
GOVRIX_DATABASE_URL | Yes | — | PostgreSQL connection string. Must point to a PostgreSQL 16 + TimescaleDB instance. |
GOVRIX_PROXY__UPSTREAM_OPENAI | No | https://api.openai.com | Base URL for OpenAI-compatible upstream. Override to route through a corporate gateway or proxy. |
GOVRIX_PROXY__UPSTREAM_ANTHROPIC | No | https://api.anthropic.com | Base URL for Anthropic upstream. Override similarly. |
GOVRIX_PROXY_PORT | No | 4000 | Port the transparent proxy listens on for agent traffic. |
GOVRIX_API_PORT | No | 4001 | Port the management API listens on. |
RUST_LOG | No | info | Log level filter. Accepts trace, debug, info, warn, error. |
Minimal .env example
# Required
GOVRIX_API_KEY=govrix-change-me-in-production
GOVRIX_DATABASE_URL=postgres://govrix:govrix_scout_dev@localhost:5432/govrix
# Optional — defaults shown
GOVRIX_PROXY__UPSTREAM_OPENAI=https://api.openai.com
GOVRIX_PROXY__UPSTREAM_ANTHROPIC=https://api.anthropic.com
GOVRIX_PROXY_PORT=4000
GOVRIX_API_PORT=4001
RUST_LOG=infoDocker Compose override — custom upstream
If your organisation routes LLM traffic through a corporate API gateway, override the upstream URLs in a docker-compose.override.yml:
# docker-compose.override.yml
services:
govrix-scout:
environment:
GOVRIX_PROXY__UPSTREAM_OPENAI: https://llmproxy.example.com
GOVRIX_PROXY__UPSTREAM_ANTHROPIC: https://anthropic-gateway.example.comDocker Compose automatically merges this file with docker-compose.yml when you run docker compose up. No changes to the base file are needed.
The upstream URL must not include a path suffix. Govrix Scout appends the original request path (e.g. /v1/chat/completions) to the base URL automatically.
Native binary — inline env vars
For local development without Docker, pass env vars inline:
GOVRIX_API_KEY=govrix-local-dev \
GOVRIX_DATABASE_URL=postgres://govrix:govrix_scout_dev@localhost:5432/govrix \
GOVRIX_PROXY__UPSTREAM_OPENAI=https://api.openai.com \
GOVRIX_PROXY_PORT=4000 \
GOVRIX_API_PORT=4001 \
./target/release/govrix-scoutGenerating a strong API key
openssl rand -hex 32Use the output as your GOVRIX_API_KEY. Treat it like a database password — do not commit it to version control.