Configuration
OpRelay is configured through environment variables and an optional config file.
Environment variables
| Variable | Default | Description |
|---|---|---|
DATABASE_URL | — | PostgreSQL connection string (required) |
PORT | 3000 | HTTP server port |
JWT_SECRET | — | Token signing secret (required in production) |
LOG_LEVEL | info | debug, 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
}
}