Run an always-on AI agent on Telegram or Discord
Short answer: deploy an agent gateway that runs continuously on Railway and holds outbound connections to your chat apps. Tracklayer’s Hermes Agent template runs Hermes Agent v0.21.7 from Nous Research, so you can message it on Telegram, Discord or Slack, or chat in the browser. Memory, skills and schedules persist on a volume. You supply an LLM provider key, and the provider bills model usage.
Deploy Hermes Agent on RailwayWhen to host an agent yourself
A chat assistant on your laptop stops when the laptop sleeps. A hosted gateway stays reachable. The template’s README lists these uses:
- a personal research and productivity assistant you reach from chat apps or a phone browser,
- scheduled jobs such as daily briefings, website monitoring and recurring reports sent to a chat,
- web tasks that need a real browser, such as reading dynamic pages or checking a deploy,
- a team helper in a Slack or Discord channel limited to approved members.
AI agent templates people deploy on Railway
| Template | Creator | Deployments | Services |
|---|---|---|---|
| LibreChat | LibreChat | 6,762 | 5 |
| Hermes Agent by Nous Research | lovexbytes's Projects | 6,413 | 1 |
| OpenClaw | Techulus | 5,167 | 1 |
| Hermes Agent | Heimdall | 4,092 | 1 |
| Bytebot | Bytebot | 3,440 | 4 |
| OpenClaw - Railway Template | Codetitlan | 2,508 | 1 |
| AnythingLLM | Timothy Carambat's Projects | 1,972 | 1 |
| Hermes | Heimdall | 1,881 | 1 |
Railway marketplace data as of 2026-11-19. Full ranking: Best AI agent templates on Railway.
Names rarely show which version is pinned, how the interface is protected or whether state sits on a volume. Open each template page and check.
Deploy Hermes Agent, step by step
These steps use Tracklayer’s Hermes Agent template.
- Deploy the template and enter your LLM provider key when asked. It creates two services: Hermes, which runs the gateway, the official dashboard, Hermes WebUI and a headless Chromium, and a small Caddy proxy that gives the WebUI its own HTTPS address.
- Open the dashboard. Go to the Hermes service URL and sign in as
adminwithHERMES_DASHBOARD_BASIC_AUTH_PASSWORDfrom Variables. Choose your default model. The stock default is a premium model, so pick one that fits your budget. - Open web chat. Go to the Hermes WebUI service URL and enter
HERMES_WEBUI_PASSWORD. Allow about a minute after a deploy. On a phone, use Add to Home Screen. - Connect Telegram, Discord or Slack. Add a bot token at deploy time, or later under Channels in the dashboard. For Telegram, BotFather issues the token.
- Message your bot. Unknown users get a pairing code that you approve on the Pairing page, or you can pre-approve IDs with
TELEGRAM_ALLOWED_USERS. - Add providers and schedules. Use API Keys for more providers and Cron for scheduled jobs.
Persistence
A Railway volume at /opt/data holds config, sessions, memory, skills, WebUI state and the agent’s workspace. Redeploys keep it. Both web interfaces and the bot share the same memory, skills and sessions, so a conversation started on Telegram appears in the WebUI sidebar.
Cost
Railway bills usage, and Hermes is the main consumer. The template’s resource figures are estimates, not measurements; the README does not claim to have measured the WebUI process.
- Idle: about 0.95 GB of memory for the Hermes service, roughly $11 per month in total.
- Typical use: about 1.7 GB on average with peaks near 3 GB while Chromium runs or several chats stream, roughly $22 to $24 per month.
- Storage: the volume is estimated at 0.5 GB idle and 2 to 3 GB in typical use.
- The template lists Hobby as the minimum plan, because Trial’s 1 GB per service cannot hold the gateway, dashboard and WebUI together.
Model usage is billed by your LLM provider, and that can exceed the Railway bill if you use a premium model.
Security notes
- Both interfaces can read and change API keys and run tools, and the WebUI includes a web terminal. Keep both passwords private.
- The WebUI never starts without a password.
- For an internet-facing dashboard, upstream recommends Nous Portal OAuth: run
hermes dashboard registerthroughrailway sshand setHERMES_DASHBOARD_OAUTH_CLIENT_ID. - The OpenAI-compatible API server is disabled by default.
- Hermes Agent and Hermes WebUI are MIT licensed. The template is a community template, not affiliated with Nous Research or the WebUI maintainers.
Scaling and upgrades
Keep one replica and scale vertically. For separate personas, use Hermes profiles inside the same service. To upgrade, change the pinned images in services/hermes/Dockerfile and services/webui-proxy/Dockerfile, and move Hermes Agent and Hermes WebUI together to versions released close to each other. If the release notes say so, run hermes config migrate through railway ssh. Do not run hermes update inside the container.
Other options
OpenClaw (Clawdbot) is another open-source agent platform with a gateway and Control UI. Its template deploys one service with a password-protected setup wizard at /setup where you enter model credentials and channel tokens for Telegram, Discord or Slack. State is stored on a volume at /data. The template’s listing gives no version, licence or resource figures, so check the OpenClaw documentation and the template’s repository before relying on it, and check the service variables for the setup password.
For the full ranking, see AI agent templates on Railway.
FAQ
What do I need before deploying Hermes Agent?
A Railway account and an LLM provider key. The template asks for an OpenRouter key, and other providers such as Anthropic or OpenAI can be added later. A bot token for Telegram, Discord or Slack is optional at deploy time, because you can add it later in the dashboard, and the browser chat works without one. Model usage is billed by your provider, not by Railway.
How do I log in to Hermes?
For the dashboard, open the Hermes service URL and sign in as admin with HERMES_DASHBOARD_BASIC_AUTH_PASSWORD from the Hermes service's Variables tab. For web chat, open the Hermes WebUI service URL and use HERMES_WEBUI_PASSWORD, found on the same Variables tab. The WebUI needs about a minute after each deploy.
How do I stop strangers from using my bot?
Unknown users who message the bot receive a pairing code, which you approve on the dashboard's Pairing page. To skip pairing for people you trust, set TELEGRAM_ALLOWED_USERS (or the Discord or Slack equivalent) with their IDs.
How much does it cost on Railway?
The template's own estimate, not a measurement, is about $11 per month idle and about $22 to $24 per month in typical use, based on Railway's list prices. It lists Hobby as the minimum plan. Your LLM provider bills separately, and the stock default model is a premium one, so choose a model that fits your budget.
Is my agent's memory kept across redeploys?
Yes. Config, sessions, memory and skills live on a Railway volume at /opt/data. Hermes is a single-writer process, so run one replica and never point two gateways at one data directory.