Deploy harnessrouter
Self-hosted AI agent workspace with web UI
Just deployed
/data
Deploy and Host HarnessRouter on Railway
HarnessRouter is a self-hosted AI agent workspace that unifies a browser console, gateway, and runner in one Docker image. It supports multiple agent harnesses, streaming sessions, files, workspaces, and provider integrations while keeping credentials and durable state under your Railway project. A persistent volume preserves the local SQLite data and installed tools.
About Hosting HarnessRouter on Railway
Railway runs the published Docker Hub image as one HTTP service. The console is exposed publicly on port 3000, while the gateway and runner remain loopback-only inside the container. A Railway volume mounted at /data preserves application state across redeployments.
Tech Stack
- HarnessRouter Community Edition
- Next.js and React web console
- Python FastAPI gateway and runner
- SQLite local persistence
- Docker Hub image
harnessrouter/harnessrouter:0.20.1 - Railway service domain and persistent volume
Why Deploy HarnessRouter on Railway
Railway provides a fast one-click path to a managed Docker deployment with TLS, public routing, logs, restarts, and persistent storage. The single-service design keeps the console, gateway, and runner together, so there are no extra databases or internal services to configure for the self-hosted edition.
Common Use Cases
- Run AI coding agents from a browser-based console
- Connect Claude, OpenAI, Gemini, and other provider integrations
- Maintain durable agent workspaces and session files
- Expose the HarnessRouter API to internal products
- Experiment with multiple harness backends in one private deployment
Deployment Notes
- Railway routes the HTTP service through
PORT=3000; the image listens on0.0.0.0:3000. HR_AUTH_USERdefaults toharnessrouterand is exposed explicitly for the initial console login.HR_AUTH_PASSWORDis generated with a Railway secret expression. Change the password from the profile page after first login if desired.HR_DATA_DIR=/datamatches the persistent Railway volume mount. The first boot installs enabled agent CLIs into this volume and may take several minutes.- Add provider credentials through the HarnessRouter console after deployment. No provider API key is bundled in the template.
- The Docker image has its own entrypoint and does not need a Railway
startCommandoverride.
Dependencies for HarnessRouter on Railway
HarnessRouter is self-contained. It requires one Docker service, one public HTTP domain, and one persistent volume for its SQLite databases, files, workspaces, credentials, and first-run agent installations.
Deployment Dependencies
| Service | Image | Port | Volume |
|---|---|---|---|
| app | harnessrouter/harnessrouter:0.20.1 | 3000 | /data |
Template Variables
| Variable | Default |
|---|---|
PORT | 3000 |
HR_DATA_DIR | /data |
HR_AUTH_USER | harnessrouter |
HR_AUTH_PASSWORD | ${{secret(32, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}} |
Template Content
PORT
HR_DATA_DIR
HR_AUTH_USER
