
Deploy Archon
Archon: AI coding workflows with Claude Code, Codex and Pi, behind a login
Just deployed
Just deployed
Deploy and Host Archon on Railway
Archon is an open-source tool for running AI coding as fixed workflows: you describe the steps in YAML (investigate an issue, plan, implement, review, open a PR), and Archon runs them with Claude Code, Codex, GitHub Copilot or Pi agents, with build and merge queues and triggers from cron, GitHub, Slack or Telegram. This template runs Archon 0.12.1 on a server, on Postgres, with its web login turned on.
About Hosting Archon
Archon on a public URL runs coding agents on your subscriptions and your repositories, so the login comes first. Archon's own web login (Better Auth) only turns on with Postgres and a secret, and this template sets both: every /api call then needs a session. Sign-up is limited to ARCHON_AUTH_ALLOWED_EMAILS, and the owner account (ARCHON_ADMIN_EMAIL with the generated ARCHON_ADMIN_PASSWORD) is created on the first start while Archon listens on localhost only, so the public URL never shows an unclaimed sign-up. BETTER_AUTH_URL is set to the public domain, because Railway terminates HTTPS in front of the app and the login otherwise rejects your browser's origin.
The official image already handles the volume: it fixes the ownership of /.archon (workspaces, worktrees, artifacts) and drops to its non-root user. Conversations, runs and users live in Postgres.
To give the agents something to work with, set CLAUDE_CODE_OAUTH_TOKEN (run claude setup-token on your computer to use your Claude subscription) or CLAUDE_API_KEY, CODEX_API_KEY for Codex, or OPENROUTER_API_KEY for the Pi agent and any OpenRouter model. GH_TOKEN lets workflows clone, push and open pull requests.
Before publishing I tested it on Railway. /api/health answered, the API returned 401 without a session, and Archon reported sign-up as allowlist-only. The owner signed in through Archon's login, I set the default agent to Pi with openrouter/openai/gpt-5-mini, started a conversation and asked for one exact word, and the agent replied with it in 4 seconds. After restarting Archon and Postgres, sign-in worked and both conversations, with that reply, were still there. I didn't run Claude Code or Codex in the test, since I had no keys for them there.
Pi needs its model tiers set before it can answer (Archon ships tier defaults only for Claude and Codex): AI Settings, then Model Tiers, in the web UI.
Idle, it used about 0.15 GB of RAM for Archon and 0.1 GB for Postgres, a few dollars a month on Railway's usage pricing. Workflows use more while agents run, and the browser tool starts a Chromium.
Common Use Cases
- Turning GitHub issues into reviewed pull requests with a fixed workflow instead of one-off agent chats
- Scheduled maintenance runs, such as dependency updates or test fixes, that keep going while your laptop is closed
- One place for a team to run Claude Code and Codex workflows on shared repositories, each person signed in
Dependencies for Archon Hosting
A Claude subscription or Anthropic API key, an OpenAI key, or an OpenRouter key for the agents, and a GitHub token for repository work.
Deployment Dependencies
- Archon: https://github.com/coleam00/Archon
- Image:
ghcr.io/coleam00/archon:0.12.1 - Docs: https://archon.diy
- The wrapper this template builds: https://github.com/dektionstudio/railway-template-images/tree/main/archon
Implementation Details
ARCHON_URL # open this
ARCHON_ADMIN_EMAIL / ARCHON_ADMIN_PASSWORD # the owner account, created on the first start
ARCHON_AUTH_ALLOWED_EMAILS # who may sign up; add teammates here
/.archon # the volume: workspaces, worktrees, artifacts
ARCHON_ADMIN_PASSWORD is only used to create the owner account. If you add a custom domain, set BETTER_AUTH_URL to it and redeploy.
Why Deploy Archon on Railway?
Your coding workflows run on a server with a login in front, next to their database, and keep running when you close the laptop. Railway bills the RAM and CPU the agents use while they work, not a fixed machine.
Template Content
ARCHON_ADMIN_EMAIL
Your email: the owner account, created on the first start
