Skip to main content

Environment Variables Reference

This page consolidates all environment variables used across all deployment targets.

Backend Variables

Required (All Targets)

VariableDescriptionExample
CLERK_PUBLISHABLE_KEYClerk publishable keypk_live_abc123...
CLERK_SECRET_KEYClerk secret keysk_live_xyz789...
CORS_ORIGINAllowed CORS origin (frontend URL)https://app.example.com

Required (Production)

VariableDescriptionNotes
SESSION_SECRETSession signing keyopenssl rand -base64 32
ENCRYPTION_SECRETSettings encryption keyRequired on all PaaS targets (no machine-derived fallback)
AGENT_SERVER_URLExternal URL for agent communicationMust include https://

Elasticsearch

VariableDescription
ELASTICSEARCH_CLOUD_IDElastic Cloud deployment ID
ELASTICSEARCH_API_KEYAPI key for authentication
ELASTICSEARCH_NODEDirect node URL (e.g., http://localhost:9200)
ELASTICSEARCH_INDEX_PATTERNIndex pattern (default: achilles-results-*)

Test Library

VariableDescription
TESTS_REPO_URLGit URL for the test library
TESTS_REPO_BRANCHBranch to sync (default: main)
GITHUB_TOKENPAT for private repos
TESTS_SOURCE_PATHLocal fallback path for tests

Agent Build

VariableDescription
AGENT_REPO_URLGit URL for agent source (enables build-from-source)
AGENT_REPO_BRANCHBranch to clone (default: main)

Server

VariableDescriptionDefault
PORTServer port3000
NODE_ENVNode environmentdevelopment

Vercel-Only

VariableDescription
TURSO_DATABASE_URLTurso database URL (libsql://...)
TURSO_AUTH_TOKENTurso authentication token
SIGNING_PRIVATE_KEY_B64Ed25519 private key (base64, PKCS8 DER)
SIGNING_PUBLIC_KEY_B64Ed25519 public key (base64, SPKI DER)

Docker-Only

VariableDescription
NGROK_FRONTEND_DOMAINngrok domain for frontend tunnel
NGROK_BACKEND_DOMAINngrok domain for backend/agent tunnel

Frontend Variables

VariableDescriptionNotes
VITE_CLERK_PUBLISHABLE_KEYClerk publishable keyMust have VITE_ prefix
VITE_BACKEND_PORTBackend port for Vite proxyDefault: 3000 (dev only)
VITE_API_URLFull backend URLProduction — direct CORS mode

PaaS Frontend Variables

VariableDescriptionUsed By
CLERK_PUBLISHABLE_KEYClerk key (without VITE_ prefix)docker-entrypoint.sh injects as window.__env__
BACKEND_HOSTBackend internal hostnamenginx proxy mode (Railway, Standard+ Render)
BACKEND_PORTBackend internal portnginx proxy mode

Per-Target Summary

VariableDockerRailwayRenderFly.ioVercel
CLERK_PUBLISHABLE_KEYYesYesYesYesYes
CLERK_SECRET_KEYYesYesYesYesYes
CORS_ORIGINYesYesYesYesYes
SESSION_SECRETProdYesYesYesYes
ENCRYPTION_SECRETProdRequiredRequiredRequiredRequired
AGENT_SERVER_URLProdYesYesYesYes
ELASTICSEARCH_*OptionalOptionalOptionalOptionalOptional
TESTS_REPO_URLOptionalOptionalOptionalOptionalOptional
TURSO_*Required
SIGNING_*_B64Required
BACKEND_HOSTAutoYesNo*No
VITE_API_URLYesYesYes

* Render Standard plan supports BACKEND_HOST; Starter plan uses VITE_API_URL instead.