Skip to content

Configuration

BetweenRows is configured entirely via environment variables. There is no config file.

Required on first boot

VariableDefaultDescription
BR_ADMIN_PASSWORDPassword for the initial admin account. Required when no users exist in the admin database. Only used on first boot. Change it through the admin UI after logging in.

Admin account

VariableDefaultDescription
BR_ADMIN_USERadminUsername for the initial admin account. Only used on first boot — ignored on subsequent boots. The username cannot be changed after creation; pick the name you want before the first run. You can always create additional admin accounts later via the UI or CLI.

Secrets and signing

VariableDefaultDescription
BR_ENCRYPTION_KEYauto-persisted64-char hex string. AES-256-GCM key used to encrypt sensitive admin data at rest (data source passwords, decision function JS source). If unset, auto-generated on first boot and persisted to /data/.betweenrows/encryption_key. Set explicitly in production. If you rotate this value, existing encrypted data becomes unreadable — migrate carefully.
BR_ADMIN_JWT_SECRETauto-persistedHMAC-SHA256 signing secret for admin JWTs. Any non-empty string. Auto-generated and persisted to /data/.betweenrows/jwt_secret if unset. Set explicitly in production. Rotating this value invalidates all existing admin sessions — admins must re-authenticate.
BR_ADMIN_JWT_EXPIRY_HOURS24JWT lifetime in hours. After this duration, admins must re-authenticate.

Admin database

VariableDefaultDescription
BR_ADMIN_DATABASE_URLsqlite://proxy_admin.db?mode=rwcSeaORM connection URL for the admin database. SQLite is the supported and tested backend. The file lives under /data in the Docker image.

Network bindings

VariableDefault (binary)Default (Docker)Description
BR_PROXY_BIND_ADDR127.0.0.1:54340.0.0.0:5434The address the SQL proxy listens on. Docker image defaults to 0.0.0.0 so the port is reachable from outside the container.
BR_ADMIN_BIND_ADDR127.0.0.1:54350.0.0.0:5435The address the admin REST API and UI listens on. Same Docker override.

Connection lifecycle

VariableDefaultDescription
BR_IDLE_TIMEOUT_SECS900 (15 min)Close idle proxy connections after this many seconds with no activity. Prevents slow or abandoned clients from holding connections indefinitely. Set to 0 to disable (not recommended — risks connection exhaustion under load).

CORS

VariableDefaultDescription
BR_CORS_ALLOWED_ORIGINS(empty — same-origin only)Comma-separated list of allowed CORS origins for the admin REST API. Required if you host the admin UI on a different origin than the REST API. Example: https://admin.example.com,https://staging-admin.example.com.

Logging

VariableDefaultDescription
RUST_LOGinfoStandard Rust tracing filter. Examples: debug, info,hyper=warn, proxy=debug,info. Use debug when investigating an issue, info for normal operation.

Example: minimum production configuration

sh
docker run -d \
  --name betweenrows \
  --restart unless-stopped \
  -e BR_ADMIN_PASSWORD="$(openssl rand -base64 24)" \
  -e BR_ENCRYPTION_KEY="$(openssl rand -hex 32)" \
  -e BR_ADMIN_JWT_SECRET="$(openssl rand -base64 32)" \
  -e BR_ADMIN_JWT_EXPIRY_HOURS=8 \
  -e BR_IDLE_TIMEOUT_SECS=600 \
  -e RUST_LOG=info \
  -p 5434:5434 -p 5435:5435 \
  -v /srv/betweenrows/data:/data \
  ghcr.io/getbetweenrows/betweenrows:0.16.2

TIP

Save BR_ENCRYPTION_KEY and BR_ADMIN_JWT_SECRET in a secrets manager (Vault, AWS Secrets Manager, Fly secrets, Kubernetes secrets). Losing them means losing encrypted data source credentials and invalidating all admin sessions.