---
title: "Deploy Hermes Agent (Official Image)"
description: "Nous Research's Hermes Agent: memory on a volume, API with a key, Telegram"
category: "AI/ML"
url: https://railway.com/deploy/hermes-agent-official-image
---

# Deploy Hermes Agent (Official Image)

Nous Research's Hermes Agent: memory on a volume, API with a key, Telegram

**[Deploy Hermes Agent (Official Image) on Railway](https://railway.com/template/hermes-agent-official-image)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/hermes-agent-official-image/manifest.json

- **Creator:** Dektion Studio
- **Category:** AI/ML
- **Total deploys:** 1

## Template content

### hermes-agent https://raw.githubusercontent.com/NousResearch/hermes-agent/5307e93252ac655cd13fadbd561c0995142138c6/apps/desktop/assets/icon.png

- **Image:** nousresearch/hermes-agent:latest
- **Start command:** `/opt/hermes/docker/entrypoint-dispatch.sh sh -c 'if [ -n "${MODEL:-}" ]; then hermes config set model "$MODEL"; fi; exec hermes gateway run'`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Hermes Agent (Official Image) on Railway

[Hermes Agent](https://github.com/NousResearch/hermes-agent) is Nous Research's open-source (MIT) AI agent. It keeps memory across conversations and writes its own skills, and you can talk to it from Telegram or any OpenAI-compatible app. This template runs Nous Research's official Docker image with its own process supervisor, and keeps everything Hermes stores on a volume.

I made it after reading the configs of the Hermes templates already on Railway. The most deployed one built on the official image mounts its volume at `/data`, but Hermes keeps its memory and sessions in `/opt/data`, so a redeploy wipes them. It also lets any Telegram user talk to the bot, and every message spends the owner's API credits. Here the volume is on `/opt/data`, Telegram only answers the user IDs you list, and the only public endpoint is Hermes's API behind a generated key.

## About Hosting Hermes Agent (Official Image)

The deploy form asks for an OpenRouter API key. Set `MODEL` too if you want a specific model. When the deploy is done, copy `HERMES_API_URL` and `API_SERVER_KEY` from the Variables tab and point any OpenAI-compatible client at them, with the model name `hermes-agent`:

```bash
curl https://YOUR-DOMAIN/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_SERVER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "hermes-agent", "messages": [{"role": "user", "content": "Hello"}]}'
```

For Telegram, create a bot with @BotFather, put its token in `TELEGRAM_BOT_TOKEN` and your numeric user ID in `TELEGRAM_ALLOWED_USERS`, and redeploy.

What I tested before publishing: `/health` answers without a key, while the API and the session list return 401 without it. A chat completion through Hermes came back in 2.9 seconds with exactly the text I asked for. After a restart the session from that chat was still there. The container used 196 MB of RAM at idle and 301 MB at its peak, a few dollars a month.

## Common Use Cases

- An agent with memory and tools behind an OpenAI-compatible API, so Open WebUI or your own code can use it like a model
- A personal assistant on Telegram that remembers past conversations and runs scheduled jobs

## Dependencies for Hermes Agent (Official Image) Hosting

An OpenRouter API key, or an Anthropic or OpenAI key set after the deploy. A Telegram bot token if you want to chat there.

### Deployment Dependencies

- Hermes Agent: https://github.com/NousResearch/hermes-agent
- Docs: https://hermes-agent.nousresearch.com/docs/
- Image: `nousresearch/hermes-agent:latest`
- OpenRouter keys: https://openrouter.ai/keys

### Implementation Details

Pick the model with care. Every message carries Hermes's own instructions and tool definitions, about 11,500 tokens in my test before your text. On `openai/gpt-4o-mini` that cost a fraction of a cent per message. Hermes's default model is Claude Opus, which costs many times more per token. `MODEL` is applied on every start; leave it empty if you'd rather change the model yourself with `hermes config set model` in a `railway ssh` shell.

Hermes can run shell commands inside its container, and so can anyone holding `API_SERVER_KEY`. Hermes prints a warning about this at startup. Treat the key like a password, and keep `TELEGRAM_ALLOWED_USERS` to people you trust.

The web dashboard is off. Nous Research's docs say its username and password login isn't suitable for direct exposure on the public internet, and a Railway domain is exactly that.

## Why Deploy Hermes Agent (Official Image) on Railway?

Hermes keeps running when your laptop is closed, which matters for scheduled jobs and a Telegram bot. The idle cost is a few dollars a month; the model provider bill depends on how much you use it.


## 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/hermes-agent-official-image
