Skip to main content

Configuration

OpRelay is configured through environment variables and an optional config file.

Environment variables

VariableDefaultDescription
DATABASE_URLPostgreSQL connection string (required)
PORT3000HTTP server port
JWT_SECRETToken signing secret (required in production)
LOG_LEVELinfodebug, info, warn, error
CORS_ORIGINS*Allowed CORS origins

Config file

Optional oprelay.config.json for lane and orchestration settings:

{
"lanes": {
"human": {
"model": "claude-opus-4",
"context": "full",
"approval_required": true
},
"agent": {
"model": "claude-sonnet-4",
"context": "compressed",
"workers": 3
}
},
"orchestration": {
"sse_enabled": true,
"lease_timeout_seconds": 600,
"max_retries": 3
}
}