---
title: "Deploy Hermes Agent"
description: "Hermes Agent: self-hosted AI agent for Telegram, Discord, Slack with memory"
category: "AI/ML"
url: https://railway.com/deploy/kit-hermes-build-0920
---

# Deploy Hermes Agent

Hermes Agent: self-hosted AI agent for Telegram, Discord, Slack with memory

**[Deploy Hermes Agent on Railway](https://railway.com/template/kit-hermes-build-0920)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/kit-hermes-build-0920/manifest.json

- **Creator:** Will
- **Category:** AI/ML

## Template content

### Hermes https://bogusz.co/external/hermes-icon.png

- **Image:** nousresearch/hermes-agent:v2026.9.14@sha256:99641e57ec762c59e54cb44aa6746b7fc68c18b3c5ddb088af54234c613d9294
- **Start command:** `/opt/hermes/docker/entrypoint-dispatch.sh sh -c 'cmp -s /opt/data/config.yaml /opt/hermes/cli-config.yaml.example && sed -i "/^  base_url: \"https:\/\/openrouter.ai\/api\/v1\"$/d" /opt/data/config.yaml; hermes dashboard --host 0.0.0.0 --port "$PORT" --no-open & dash=$!; trap "kill -TERM \$gw \$dash 2>/dev/null; wait; exit 0" TERM INT; while :; do hermes gateway run --external-supervisor & gw=$!; wait $gw; c=$?; [ "$c" -eq 75 ] || { kill -TERM $dash 2>/dev/null; exit "$c"; }; done'`
- **Health check:** /api/health
- **Public domain:** Yes

## Documentation

# Deploy and Host Hermes Agent with Railway

Hermes Agent is Nous Research's open-source, self-hosted AI agent: a gateway that talks to you on Telegram, Discord, Slack, WhatsApp and more, runs tools (shell, browser, files, web search), keeps long-term memory, learns reusable skills, and exposes an OpenAI-compatible API - all from one always-on container. This template deploys the official image pinned by digest with the web dashboard behind a generated login, a persistent volume for your agent's state, and a deployment healthcheck. **There is nothing to fill in.** After the deploy, open the public URL and log in as `admin` with the password in the `Hermes` service's Variables tab, then add a model provider key and a messaging platform from the dashboard.

**Plan requirements.** Measured on this exact image: the container idles around **330 MB** with the dashboard, gateway and API server running (measured after five idle minutes) and peaks around 365 MB at boot; each active conversation adds tens of MB. It fits every plan from Trial up; Hobby (8 GB) is the comfortable choice once you enable tools like the headless browser, which add a few hundred MB while they run.

## About Hosting Hermes Agent

Hermes runs three things in one container: the **gateway** (connects to your messaging platforms and runs the agent), the **dashboard** (web UI for configuration, provider keys, sessions and logs) and the **OpenAI-compatible API server** (`/v1/chat/completions` on port 8642 inside the container, protected by a generated bearer key). All state - config, provider keys, sessions, memory, skills - lives under `/opt/data` on the volume, so redeploys and upgrades keep your agent's memory. The dashboard is only reachable through the generated basic-auth login; upstream refuses to bind it publicly without one. The container starts as root and drops to the `hermes` user for every service, which is how the official image is designed to run.

## Common Use Cases

- A personal assistant on Telegram or Discord with persistent memory and the ability to run commands, browse and read files
- A team bot in Slack that answers from your docs and executes approved tool calls
- An always-on agent behind an OpenAI-compatible endpoint for your own apps, with the model choice and tools configured centrally
- Scheduled jobs (cron) that summarise, monitor or report back to a channel
- A sandbox for building and sharing agent skills without running anything on your laptop

## Dependencies for Hermes Agent Hosting

- `nousresearch/hermes-agent:v2026.9.14` (Docker Hub, pinned by digest) on an `/opt/data` volume

### Deployment Dependencies

- [Hermes Agent documentation](https://hermes-agent.nousresearch.com/docs) - [Docker guide](https://hermes-agent.nousresearch.com/docs/getting-started/docker), [Telegram setup](https://hermes-agent.nousresearch.com/docs/user-guide/messaging/telegram), [API server](https://hermes-agent.nousresearch.com/docs/user-guide/api-server)
- [Hermes Agent on GitHub](https://github.com/NousResearch/hermes-agent) (MIT)
- [Railway volumes](https://docs.railway.com/volumes)

### Implementation Details

**First run.** Open the `Hermes` service's public domain, log in with `admin` and `HERMES_DASHBOARD_BASIC_AUTH_PASSWORD` from the Variables tab. In the dashboard add a model provider (OpenRouter, Anthropic, OpenAI, Nous Portal, or any OpenAI-compatible endpoint) and, if you want a chat platform, its bot token and your allowed user IDs. The gateway restarts itself when configuration changes.

**Or configure by variables.** `OPENROUTER_API_KEY`, `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `TELEGRAM_BOT_TOKEN`, `TELEGRAM_ALLOWED_USERS` and `DISCORD_BOT_TOKEN` are all optional service variables; set any of them and redeploy. Telegram runs in polling mode by default, which works with no inbound configuration; upstream's docs describe webhook mode if you prefer.

**API server.** `API_SERVER_KEY` is generated for you. Inside the container the server listens on `0.0.0.0:8642`; to call it from another Railway service use the private domain (`http://hermes.railway.internal:8642/v1/...`) with `Authorization: Bearer YOUR_API_SERVER_KEY`. To expose it publicly, add a second HTTP domain targeting port 8642 in the service's Networking settings.

**Healthcheck.** Railway polls the dashboard's `/api/health` before routing traffic to a new deployment, so redeploys and upgrades cut over only once the process is up.

**Persistence.** Everything under `/opt/data` survives redeploys and restarts (verified). Back up the volume if the agent's memory matters to you; the dashboard also has an export.

**Upgrades.** The image is pinned. Change the `Hermes` service's image tag to a newer `vYYYY.M.D` release and redeploy; Hermes migrates its config on start.

**Risks.** The agent can run shell commands, browse and read files inside its container on your behalf - only allow-list people you trust on chat platforms. Pinned images receive security fixes when you upgrade, not automatically. Railway's fair-use policy applies to what the agent does.

### Why Deploy Hermes Agent 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 Hermes Agent 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.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/kit-hermes-build-0920
