---
title: "Deploy HarnessRouter"
description: "Web console and API for AI coding agents like Codex and Claude Code"
category: "AI/ML"
url: https://railway.com/deploy/harnessrouter-3
---

# Deploy HarnessRouter

Web console and API for AI coding agents like Codex and Claude Code

**[Deploy HarnessRouter on Railway](https://railway.com/template/harnessrouter-3)**

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

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### HarnessRouter https://raw.githubusercontent.com/HarnessRouter/harnessrouter/v0.41.26/ui/src/app/icon.png

- **Source:** https://github.com/aalfath/harnessrouter-railway-template
- **Health check:** /login
- **Public domain:** Yes

## Documentation

# Deploy and Host HarnessRouter on Railway

HarnessRouter is an open-source (Apache-2.0) web console and API for AI coding agents. It runs harnesses such as Pi, OpenCode, Codex, Claude Code and Hermes on your own model provider keys, keeps every task's transcript and files, and serves them through an OpenAI Responses-compatible API.

## About Hosting HarnessRouter

This template runs HarnessRouter Community Edition 0.41.26 as one service built from a public GitHub repo that pins upstream's official image by version and digest. A volume on `/data` holds the SQLite databases, task workspaces, the encrypted secret store and the agent CLIs, which upstream installs there on first start (20 s to 2 minutes). Sign in as `harnessrouter` with the generated `HR_AUTH_PASSWORD` from the service's Variables tab, then add a provider key under account menu → Bring your own key. On 0.5 GB of RAM only the Pi agent is installed; OpenCode, Codex and Claude Code need 1 GB or more.

## Common Use Cases

* Run Claude Code, Codex, Pi or OpenCode tasks from a browser with your own API keys
* Give your product backend one OpenAI Responses-compatible API for several coding agents
* Keep a shared, searchable history of agent tasks, transcripts and generated files

## Dependencies for HarnessRouter Hosting

* A model provider API key you bring (OpenAI, Anthropic, OpenRouter, Google, or any OpenAI- or Anthropic-compatible endpoint)
* A Railway volume for `/data` (created by the template)

### Deployment Dependencies

* [HarnessRouter on GitHub](https://github.com/HarnessRouter/harnessrouter) and its [self-hosting guide](https://github.com/HarnessRouter/harnessrouter/blob/v0.41.26/docs/self-hosting-guide.md)
* [Release 0.41.26](https://github.com/HarnessRouter/harnessrouter/releases/tag/v0.41.26)
* [Template repo](https://github.com/aalfath/harnessrouter-railway-template)

### Implementation Details

The template has one service, `HarnessRouter`, which runs upstream's console, gateway and agent runner in one container. Its start script:

* refuses to start without a password of 16+ characters (the template generates 32) or with `HR_AUTH_DISABLED=1`
* picks the agent CLIs from the service's RAM and volume: Pi below 1 GB RAM; Pi, OpenCode, Codex and Claude Code (plus Hermes on large volumes) from 1 GB. Set `HR_BACKENDS` to choose your own
* sizes concurrent agent tasks from the service's RAM and CPU, and exits non-zero on any stop so Railway restarts it

Optional variables: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY` or `OPENROUTER_API_KEY` add a provider without using the console. For API access, create a key under **API Keys** and call `https://YOUR-DOMAIN/api/harness/v1/responses` with `Authorization: Bearer YOUR-KEY`; send `"background": true` for tasks longer than a few minutes. Docker-based features (Environments, memory engines) aren't available on Railway. To update, apply Railway's update notice after reading the repo's `CHANGELOG.md`; data stays on the volume.

## Why Deploy HarnessRouter on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying HarnessRouter on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius 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.

Open this page in a browser: https://railway.com/deploy/harnessrouter-3
