Skip to Content
Getting StartedConfiguration

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

VariableRequiredDefaultDescription
GOVRIX_API_KEYYesBearer token for the management API (port 4001). Set to any strong random string.
GOVRIX_DATABASE_URLYesPostgreSQL connection string. Must point to a PostgreSQL 16 + TimescaleDB instance.
GOVRIX_PROXY__UPSTREAM_OPENAINohttps://api.openai.comBase URL for OpenAI-compatible upstream. Override to route through a corporate gateway or proxy.
GOVRIX_PROXY__UPSTREAM_ANTHROPICNohttps://api.anthropic.comBase URL for Anthropic upstream. Override similarly.
GOVRIX_PROXY_PORTNo4000Port the transparent proxy listens on for agent traffic.
GOVRIX_API_PORTNo4001Port the management API listens on.
RUST_LOGNoinfoLog 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=info

Docker 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.com

Docker 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-scout

Generating a strong API key

openssl rand -hex 32

Use the output as your GOVRIX_API_KEY. Treat it like a database password — do not commit it to version control.

Last updated on