---
title: "Deploy Omnigent"
description: "Omnigent: run Claude Code, Codex and Pi as a team, with a host on Railway"
category: "AI/ML"
url: https://railway.com/deploy/omnigent-1
---

# Deploy Omnigent

Omnigent: run Claude Code, Codex and Pi as a team, with a host on Railway

**[Deploy Omnigent on Railway](https://railway.com/template/omnigent-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/omnigent-1/manifest.json

- **Creator:** Dektion
- **Category:** AI/ML
- **Total deploys:** 3

## Template content

### Postgres https://devicons.railway.com/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:17

### Omnigent https://raw.githubusercontent.com/omnigent-ai/omnigent/a8676d23e88df7918f4f8ef1c7c4e3186e710354/editors/vscode/media/omnigent-icon.png

- **Image:** ghcr.io/omnigent-ai/omnigent-server:v0.18.0
- **Health check:** /health
- **Public domain:** Yes

### Host https://raw.githubusercontent.com/omnigent-ai/omnigent/a8676d23e88df7918f4f8ef1c7c4e3186e710354/editors/vscode/media/omnigent-icon.png

- **Image:** ghcr.io/omnigent-ai/omnigent-host:v0.18.0
- **Start command:** `/bin/bash -c 'mkdir -p ~/.omnigent; grep -qs "^host:" ~/.omnigent/config.yaml || printf "host:\n  name: railway\n" >> ~/.omnigent/config.yaml; until curl -fsS -o /dev/null "$OMNIGENT_URL/health"; do echo "waiting for $OMNIGENT_URL"; sleep 5; done; if printf "%s\n%s\n" "$HOST_LOGIN_USERNAME" "$HOST_LOGIN_PASSWORD" | omnigent login "$OMNIGENT_URL" >/dev/null 2>&1; then echo "signed in to $OMNIGENT_URL as $HOST_LOGIN_USERNAME"; else echo "sign-in failed, using the saved token"; fi; exec omnigent host --no-open --non-interactive "$OMNIGENT_URL"'`

## Documentation

# Deploy and Host Omnigent on Railway

[Omnigent](https://github.com/omnigent-ai/omnigent) is an open-source server for running coding agents as a team: Claude Code, Codex, Pi, Cursor, OpenCode and others work in shared sessions you open from a browser or your phone, with accounts, policies (spend caps, approvals) and scheduled tasks. It's built by the Databricks AI team, Neon and contributors. This template runs the Omnigent 0.18.0 server on Postgres, plus a host on Railway, so sessions keep running when your laptop is closed.

## About Hosting Omnigent

Omnigent splits into a server (web UI, accounts, sessions, Postgres) and hosts, the machines where the agents run. Upstream expects every user to start a host on their own laptop. This template adds one more: the `Host` service runs Omnigent's official host image, which ships the Claude Code, Codex and Pi CLIs, signs in as the admin and registers itself as `railway`. Pick it in the host picker when you start a session.

The first admin is created on the first start from `OMNIGENT_ACCOUNTS_INIT_ADMIN_USERNAME` and the generated `OMNIGENT_ACCOUNTS_INIT_ADMIN_PASSWORD`. Without that, Omnigent's first-run form (`POST /auth/setup`) stays open on the public URL until someone claims it, and upstream's own Railway notes warn about exactly that. Teammates join through invite links (Admin, Members, Invite); there's no open sign-up.

To give the agents a model, set `CLAUDE_CODE_OAUTH_TOKEN` (run `claude setup-token` on your computer to use your Claude subscription) or `ANTHROPIC_API_KEY` for Claude Code, `OPENAI_API_KEY` for Codex, or `OPENROUTER_API_KEY` for Pi with any OpenRouter model, on the Host service. `GIT_TOKEN` lets agents clone private repos and push.

Before publishing I tested it on Railway. `/health` answered, `/auth/me` returned 401 without a session, and the first-run form returned 409 because the admin already existed. The admin signed in and made an invite link, and a second account registered with it and signed in. The Host came up online as `railway`. I started a Pi session on it with `openai/gpt-5-mini` through OpenRouter and asked for one exact word, and Pi replied with it in 4 seconds; a second session with no model chosen used Pi's own OpenRouter default and answered too. After restarting the server, the Host and Postgres, both accounts signed in, the Host reconnected under the same host id, and the earlier sessions still had their replies. I didn't run Claude Code or Codex in the test, since I had no keys for them there.

Idle, the server used about 0.18 GB of RAM, the Host 0.18 GB and Postgres 0.12 GB. Each open Pi session kept about 0.2 GB on the Host (two took it to 0.57 GB), so close sessions you're done with. The host image is big (1.75 GB compressed, since it carries every agent CLI), and the Host's first deploy took about two minutes in my test.

## Common Use Cases

- Starting a Claude Code or Codex session from your phone and checking on it later, with the work running on Railway
- A small team sharing agent sessions, each person signed in, with spend caps and approvals set by the admin
- Scheduled agent tasks that need a machine that's always on

## Dependencies for Omnigent Hosting

A Claude subscription or Anthropic key, an OpenAI key, or an OpenRouter key for the agents. A GitHub token for private repositories.

### Deployment Dependencies

- Omnigent: https://github.com/omnigent-ai/omnigent
- Images: `ghcr.io/omnigent-ai/omnigent-server:v0.18.0` and `ghcr.io/omnigent-ai/omnigent-host:v0.18.0`
- Docs: https://github.com/omnigent-ai/omnigent/blob/main/deploy/README.md

### Implementation Details

```
OMNIGENT_URL                               # open this
OMNIGENT_ACCOUNTS_INIT_ADMIN_USERNAME      # the first admin, created on the first start
OMNIGENT_ACCOUNTS_INIT_ADMIN_PASSWORD      # its password (generated)
/data                                      # server volume: artifacts, cookie secret, admin state
/root                                      # Host volume: sign-in token, agent logins, workspaces
```

The Host signs in with the admin password on every start. If you change that password in Omnigent, update `HOST_LOGIN_PASSWORD` on the Host service too. You can still connect your own laptop as another host with `omnigent login ` and `omnigent host `.

## Why Deploy Omnigent on Railway?

The server, its database and an always-on host sit in one project, with HTTPS and the login set up. Railway bills the RAM and CPU the agents use while they work, not a fixed machine.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Möbius v0.1 Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.

Open this page in a browser: https://railway.com/deploy/omnigent-1
