Self-hosting
Self-hosted camelRun v2 configuration reference
Cloudflare Worker bindings, secrets, and environment variables, plus camelfsd flags and environment variables for camelRun v2.
This page lists every runtime binding, secret, and flag read by the camelRun v2 Worker (worker/src/types.ts) and camelfsd (camelfsd/cmd/camelfsd/main.go).
Cloudflare Worker bindings
Configured in wrangler.jsonc (or your production Wrangler config):
| Binding | Type | Purpose |
|---|---|---|
TENANT_DO | Durable Object (TenantDO) | Per-tenant SQLite store for keys, providers, billing, usage, definitions, repos, channels, webhooks, and rate buckets |
AGENT_DO | Durable Object (AgentDO) | Per-agent SQLite store for config, messages, compactions, runs, events, inputs, schedules, workflows, and voice sessions |
VOICE_CALL_DO | Durable Object (VoiceCallDO) | Optional Durable Object class for managed realtime voice calls (/v2/voice/calls) |
MEDIA_BUCKET | R2 Bucket | Optional R2 bucket for generated images, transcriptions, TTS audio, and resized tool images |
EVENTS_QUEUE | Queue producer & consumer | Optional Cloudflare Queue for async webhook and channel reply delivery |
IMAGES | Cloudflare Images binding | Optional binding used to scale down oversized image attachments before model calls |
SVG_RENDERER | Service Fetcher | Optional Worker service binding backing POST /v2/images/render and the render_image built-in |
Worker secrets and environment variables
Store secrets with wrangler secret put or --secrets-file (kept outside version control). Never commit production secrets to wrangler.jsonc.
Core security and CamelFS
| Variable | Required | Description |
|---|---|---|
ADMIN_SECRET | Yes | Shared secret checked in X-Admin-Key for POST /v2/tenants and POST /v2/billing/credits |
VAULT_SECRET | Yes | Master key used to derive the AES-GCM key sealing provider keys, agent tokens, webhook secrets, and channel secrets |
CAMELFS_URL | Yes | Base HTTP(S) URL of the camelfsd service (for example http://127.0.0.1:8790 locally) |
CAMELFS_SIGNING_KEY | Production | Ed25519 signing key formatted as <kid>:<base64url-ed25519-seed> (or PKCS8 PEM) used to mint short-lived camelfs+jwt tokens |
CAMELFS_DEV_TOKEN | Dev only | Shared bearer fallback for local camelfsd development when CAMELFS_SIGNING_KEY is unset |
TOOL_IDENTITY_ISSUER | For signed MCP | Issuer URL placed in iss of runtime tool JWTs (for example https://run.camelai.com/v2) |
TOOL_IDENTITY_PRIVATE_JWK | For signed MCP | JSON Ed25519 private JWK (kty: "OKP", crv: "Ed25519", x, d, kid). Public half is served at GET /v2/.well-known/jwks.json |
Models, providers, and voice
| Variable | Description |
|---|---|
DEFAULT_MODEL | Default model ID when an agent or run omits model (code fallback: azure/gpt-6.2-sol) |
AZURE_OPENAI_SOL_ENDPOINT | Azure OpenAI resource endpoint serving the gpt-6.2-sol deployment |
AZURE_OPENAI_SOL_API_KEY | API key for the platform Azure gpt-6.2-sol deployment |
OPENAI_API_KEY | Platform OpenAI API key (models, transcription, speech, images, moderation, realtime voice) |
ANTHROPIC_API_KEY | Platform Anthropic API key |
GEMINI_API_KEY | Platform Google Gemini API key |
OPENROUTER_API_KEY | Platform OpenRouter API key |
ELEVENLABS_API_KEY | Platform ElevenLabs API key (voice search and realtime calls) |
VOICE_OPENAI_BASE_URL | Optional base URL override for OpenAI Realtime API |
VOICE_ELEVENLABS_BASE_URL | Optional base URL override for ElevenLabs API |
VOICE_PUBLIC_URL | Optional public base URL used for ElevenLabs callback URLs |
AGENT_VOICE_SESSIONS_PER_TENANT | Maximum concurrent active voice calls per tenant (default 50) |
camelfsd flags and environment variables
Each flag accepts a matching CAMELFSD_* environment variable:
| Flag | Environment variable | Default | Description |
|---|---|---|---|
--listen | CAMELFSD_LISTEN | 127.0.0.1:8790 | HTTP listen address |
--data-dir | CAMELFSD_DATA_DIR | ./data | Data directory for local backend and VM sockets/workspaces |
--backend | CAMELFSD_BACKEND | local | Storage backend: local (SQLite + FS) or aws (DynamoDB + S3) |
--vm-driver | CAMELFSD_VM_DRIVER | local | VM driver: local, firecracker, or remote |
--public-keys | CAMELFSD_PUBLIC_KEYS | (empty) | Comma-separated <kid>:<base64url-32-byte-ed25519-pubkey> entries verifying Worker JWTs |
--dev-token | CAMELFSD_DEV_TOKEN | (empty) | Shared bearer token for local development |
--host-token | CAMELFSD_HOST_TOKEN | (empty) | Shared token authenticating outbound compute hosts |
--s3-bucket | CAMELFSD_S3_BUCKET | (empty) | S3 bucket for content-addressed trees and blobs (--backend=aws) |
--ddb-repos-table | CAMELFSD_DDB_REPOS_TABLE | camelfs-repos | DynamoDB table for lineages, refs, and leases (PK, SK) |
--ddb-vms-table | CAMELFSD_DDB_VMS_TABLE | camelfs-vms | DynamoDB table for VM sessions, exec receipts, and hosts (PK, SK) |
--firecracker-bin | CAMELFSD_FC_BIN | firecracker | Path to the firecracker binary |
--firecracker-jailer | CAMELFSD_FC_JAILER | (empty) | Path to the matching Firecracker jailer binary |
--firecracker-kernel | CAMELFSD_FC_KERNEL | (empty) | Absolute path to the Firecracker guest kernel image |
--firecracker-rootfs | CAMELFSD_FC_ROOTFS | (empty) | Absolute path to the Firecracker guest rootfs ext4 image |