Environment variables reference

Complete reference for ArcFlow environment variables across server, Relay, CLI, and tooling. Normative summary: Environment variables reference. Never commit .env files containing secrets to source control.

Server authentication

VariableRequiredDefaultExampleSurfaceLog classification
ARCFLOW_SERVER_API_KEYYes (server)nonea1b2... (64 hex)Server runtime routesNever log
ARCFLOW_ADMIN_API_KEYYes for adminnoneseparate 64 hex/v1/admin/*Never log
ARCFLOW_STATIC_RUNTIME_KEYSNononeJSON mapScoped workflow keysNever log
ARCFLOW_DEFAULT_UPSTREAM_RUNTIME_KEYFor admin sitesnonematches scoped key idSite create upstreamNever log

Static keys JSON example:

json
{
 "site-key-1": {
 "workflows": ["chat"],
 "publish": false
 }
}

Database

VariableRequiredDefaultExampleSurfaceLog classification
ARCFLOW_POSTGRESQL_URLYes for server runsnonepostgres://user:pass@host:5432/arcflowServer, Relay, CLI migrateNever log (contains password)
ARCFLOW_PG_MAX_CONNECTIONSNo1020Server poolSafe

Pool sizing rule: (replicas × limit) < Postgres max_connections.

Vector store and embeddings

VariableRequiredDefaultExampleSurfaceLog classification
ARCFLOW_QDRANT_URLFor vector/RAGnonehttp://qdrant:6333ServerSafe
ARCFLOW_EMBEDDING_PROVIDERProd with RAGnoneopenai/text-embedding-3-smallServerSafe
ARCFLOW_QDRANT_HYBRIDNounset/falsetrueHybrid retrievalSafe
COHERE_API_KEYWhen rerank enablednoneCohere API keyRerank providerNever log

Do not use stub embedding provider in production when knowledge ingest or vector agents are enabled.

Server runtime

VariableRequiredDefaultExampleSurfaceLog classification
ARCFLOW_PORTNo80808080Server listenSafe
ARCFLOW_CORS_ORIGINSNoemptyhttps://app.example.com,https://admin.example.comServer CORSSafe
ARCFLOW_DEBUGNofalsetrue (dev only)Debug routesSafe
ARCFLOW_WEBHOOK_SECRETFor external callbacksnone32+ byte secretHMAC verifyNever log
ARCFLOW_RELAY_PUBLIC_URLNononehttps://relay.example.comAdmin site responsesSafe

Relay

VariableRequiredDefaultExampleSurfaceLog classification
ARCFLOW_UPSTREAM_URLYesnonehttp://arcflow-server:8080RelaySafe
ARCFLOW_RELAY_PORTNo80908090Relay listenSafe
ARCFLOW_RELAY_SITES_JSONBYO Relaynoneinline sites arrayRelay static configNever log (contains tokens)

Relay may share ARCFLOW_POSTGRESQL_URL with server for dynamic sites.

LLM providers

VariableRequiredDefaultExampleSurfaceLog classification
OPENAI_API_KEYWhen using OpenAInonesk-...ProviderNever log
ANTHROPIC_API_KEYWhen using Anthropicnonesk-ant-...ProviderNever log
GEMINI_API_KEYWhen using GemininoneGoogle AI keyProviderNever log

Provider selection is per-agent in workflow definitions via ProviderConfig.api_key_env.

Observability (alpha, OpenTelemetry metrics export)

VariableRequiredDefaultExampleSurfaceLog classification
ARCFLOW_OTEL_ENABLEDNofalsetrueOTel initSafe
ARCFLOW_OTLP_ENDPOINTWhen OTel onnonehttp://otel-collector:4317OTLP exportSafe

See OpenTelemetry guide.

CLI migrate

VariableRequiredPurpose
ARCFLOW_POSTGRESQL_URLYesarcflow migrate up / validate

Frontend (static SDK, not server env)

These are build-time Vite variables, documented for operator handoff:

VariablePurpose
VITE_ARCFLOW_RELAY_URLPublic Relay base URL
VITE_ARCFLOW_SITE_IDSite id from admin create
VITE_ARCFLOW_SITE_TOKENOne-time site token

Dashboard dev (private repo): ARCFLOW_ADMIN_URL, admin key in BFF only.

Critical production triple

Minimum for a working server deployment:

  1. ARCFLOW_SERVER_API_KEY and ARCFLOW_ADMIN_API_KEY
  2. ARCFLOW_POSTGRESQL_URL
  3. At least one LLM key (OPENAI_API_KEY, etc.)

Security checklist for operators

  • Store secrets in a secret manager or orchestrator secrets, not in git.
  • Rotate keys on schedule or on personnel change. See Token rotation (ArcFlow repository).
  • Restrict .env file permissions (chmod 600).
  • Never log environment dumps in production support bundles.