Skip to content

Deploy Forge Cloud

Service What to create Environment variables
Neon a project, with Neon Auth enabled DATABASE_URL (pooled), NEON_AUTH_URL
Redis a Redis 7+ database reachable over TCP REDIS_URL
E2B an API key E2B_API_KEY
Deepgram an API key DEEPGRAM_API_KEY
Cloudflare R2 a bucket and an S3 API token R2_ACCOUNT_ID, R2_BUCKET, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY
Model upstreams provider keys for the proxy ANTHROPIC_API_KEY, optionally OPENROUTER_API_KEY and OPENAI_API_KEY
Relay a long random secret shared with the relay RELAY_SECRET

Also set PUBLIC_URL, CONSOLE_URL, SITE_URL, RELAY_URL, CORS_ORIGINS and ADMIN_EMAILS, plus either FORGE_TARBALL (an npm pack of Forge Code) or FORGE_INSTALL_SPEC, so sandboxes can install Forge Code.

  1. Run npm install, then npm run migrate with DATABASE_URL set.
  2. Start the API (npm start -w server) and the worker (npm run worker -w server) on a Node 22 host.
  3. Deploy the relay: cd relay, then npx wrangler secret put RELAY_SECRET and npx wrangler deploy.
  4. Build and deploy the website and the console to Cloudflare Pages: npm run build, then npx wrangler pages deploy site/dist --project-name forge-site and npx wrangler pages deploy console/dist --project-name forge-console. Set VITE_API_URL and VITE_NEON_AUTH_URL when building the console.
  5. In Forge Code, point at the API with forge config set -g cloudUrl https://<your-api>.

docker compose up -d starts Postgres, Redis and an S3-compatible store. Set DEV_AUTH_SECRET to sign in to the console with any email instead of Neon Auth. It is for development only and is ignored when NODE_ENV=production.