Deploy Hermes Agent (Official Image)

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

Deploy Hermes Agent (Official Image)

Just deployed

Deploy and Host Hermes Agent (Official Image) on Railway

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:

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

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.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
116
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
81