BYO Relay deployment
Bring Your Own (BYO) Relay runs arcflow-relay on your infrastructure with the same browser contract as the Compose-managed Relay in docker/docker-compose.server.yml. Use BYO when you need a custom domain, separate network zone, or air-gapped edge while keeping arcflow-server centralized.
Reference implementation: examples/relay/byo-docker/.
Quick start
Browser env:
Health check:
ARCFLOW_RELAY_SITES_JSON schema
Each array element maps to a site record:
| Field | Required | Description |
|---|---|---|
id | Yes | Site id in URL path |
display_name | Yes | Operator label |
allowed_origins | Yes | Origin allowlist |
rate_limit_rpm | Yes | Per-minute cap |
allow_inline | Yes | Browser inline workflow override |
default_workflow_name | No | Default publish name |
kb_namespace | Yes | Vector namespace |
upstream_runtime_key | Yes | Key sent to server (must match scoped key or master) |
token | Yes | Plain site token Relay accepts from browsers |
Environment variables
| Variable | Purpose |
|---|---|
ARCFLOW_UPSTREAM_URL | Server base URL (e.g. https://api.internal:8080) |
ARCFLOW_RELAY_SITES_JSON | Inline site definitions (BYO) |
ARCFLOW_RELAY_PORT | Listen port (default 8090) |
ARCFLOW_RELAY_PUBLIC_URL | Returned in admin site create when server provisions sites |
Server-side companion vars:
| Variable | Purpose |
|---|---|
ARCFLOW_STATIC_RUNTIME_KEYS | JSON map limiting upstream keys per workflow |
ARCFLOW_SERVER_API_KEY | Master key if upstream uses it |
ARCFLOW_RELAY_PUBLIC_URL | Public Relay base for admin responses |
Full list: Environment variables reference.
Admin-provisioned vs BYO
| Approach | Site source | Best for |
|---|---|---|
| Admin API | Postgres arcflow_sites (future Relay sync) | Operator dashboard, dynamic sites |
| BYO JSON | Env at Relay start | Fixed sites, edge deploy, CI smoke |
For production with changing sites, prefer admin API provisioning and plan Relay config reload strategy. BYO JSON requires redeploy to add sites.
Scoped upstream keys
Define scoped keys on the server:
Set "upstream_runtime_key": "relay-site-key-abc" in site JSON. Never put the master server key in Relay env if a scoped key suffices.
TLS and networking
Typical layout:
Relay does not terminate LLM traffic; it only proxies JSON run APIs.
Smoke test
After deploy, run repository scripts if available:
Or manual curl from origin-and-rate-limiting.md.
Related pages
- relay/overview.md
- relay/request-path.md
- examples/relay-byo-deployment.md (when published)