
Deploy Hermes Agent Telegram
Self-hosted Hermes Agent with Telegram messaging
hermes-agent
Just deployed
/opt/data
Deploy and Host self hosted Hermes Agent Telegram (Open-Source AI Agent) on Railway
This template is Hermes Agent aimed at Telegram: same nousresearch/hermes-agent:v0.22.0 digest pin, /opt/data volume, and OpenAI-compatible API, plus TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USERS so only your numeric IDs can drive the bot. One hermes gateway run process serves chat and /v1.
About Hosting Hermes Agent Telegram open-source software on Railway (self hosted Hermes Agent template)
One service starts hermes gateway run on port 8642 with health /health and volume /opt/data (config, memory, skills, sessions). API_SERVER_ENABLED=true, API_SERVER_HOST=0.0.0.0, API_SERVER_PORT=8642, API_SERVER_KEY generated per deploy, API_SERVER_CORS_ORIGINS=*, HERMES_API_URL=https://YOUR-DOMAIN/v1. Fixed also: PORT=8642, HERMES_ALLOW_ROOT_GATEWAY, RAILWAY_RUN_UID, HERMES_UID, HERMES_GID. Optional empty: OPENROUTER_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, TELEGRAM_BOT_TOKEN, TELEGRAM_ALLOWED_USERS. Model name for frontends is hermes-agent.
Why Deploy Hermes Agent Telegram, the ChatGPT agent alternative on Railway (Railway Free Trial)
ChatGPT agent lives inside OpenAI's product. Hermes runs in your container, keeps memory and skills on /opt/data, and answers on Telegram while your laptop is closed. Set an allowlist so strangers cannot trigger terminal tools. Railway's $5 trial covers the first deploy before monthly compute.
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 Telegram 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.
Railway vs Other Hosting Providers and VPS for Hermes Agent Telegram self hosting
| Provider | Setup effort | Telegram fit | Cost pattern |
|---|---|---|---|
| DigitalOcean | Droplet, Docker, TLS, supervision | Works if you expose or poll carefully | Predictable VPS; you patch |
| AWS | VPC, ECS/EC2, IAM, LB | Security groups and NAT add friction | Easy to overspend for one bot |
| Hetzner | Cheap VM, manual Docker | Fine if you already run bots there | Low compute, more ops time |
Railway removes systemd and reverse-proxy babysitting while keeping the same Hermes process model. You still set TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USERS yourself.
Common Use Cases for hosted Hermes Agent Telegram
Personal ops bot: BotFather token, your numeric user ID in TELEGRAM_ALLOWED_USERS, then ask for cron status, log summaries, or short scripts under /opt/data. Team channel: add several numeric IDs, keep the allowlist tight, share one volume of skills and memory. Dual door: Telegram for quick asks and Open WebUI / LobeChat / LibreChat on /v1 with Bearer API_SERVER_KEY and model hermes-agent so both paths share tools, memory, and FTS5 session search. Scheduled work: built-in cron fires jobs that can report back in Telegram.
Dependencies for Hermes Agent Telegram Docker hosted on Railway
No Postgres or Redis service. The image bundles gateway, tools, scheduler, and search. You need outbound network to Telegram and to a model provider. Set at least one of OPENROUTER_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, or use Nous Portal; without a model backend the process can start but cannot answer. /opt/data must be writable (UID/GID vars handle that). TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USERS are optional at deploy but required for the Telegram angle to work.
Deployment Dependencies for Managed Hermes Agent Telegram Service (AI Agent)
- nousresearch/hermes-agent:v0.22.0 pinned by sha256 digest
- Start command
hermes gateway run - Port 8642, health /health, volume /opt/data
- Generated API_SERVER_KEY
- Optional TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USERS (numeric IDs)
- At least one model provider key or Nous Portal for answers
Implementation Details for Hermes Agent Telegram (Using Hermes Agent official docker image)
Entrypoint runs hermes gateway run, which starts the messaging gateway and the API on 8642. Telegram uses long polling to Bot API, so you do not need a public webhook URL for chat; you do need a public URL if remote frontends call /v1. Requests through the API run with the full toolset (terminal, files, web search, memory, skills). Keep API_SERVER_KEY secret. The agent can run terminal commands inside the Railway container; the allowlist is your main human gate on Telegram.
How does Hermes Agent Telegram compare against other AI agent platforms
Hermes Agent Telegram vs OpenClaw
- Product: Both are MIT self-hosted personal agents. OpenClaw is a popular Node gateway; Hermes is Nous Research's agent with a learning loop.
- Telegram: Both can do chat channels. This template leads with TELEGRAM_* vars and a single
hermes gateway run. - Migration: Hermes documents
hermes claw migratefor OpenClaw users.
Hermes Agent Telegram vs Letta
- Memory: Letta centers editable memory blocks. Hermes uses agent-curated memory, skills from experience, and FTS5 session search.
- Messaging: Hermes ships a multi-channel gateway including Telegram in-process. Letta is more API-first.
- License: Letta Apache 2.0; Hermes MIT.
Hermes Agent Telegram vs OpenHands
- Interface: OpenHands is a coding-agent platform with a strong web/workspace focus. Hermes is chat-and-API first, with Telegram as a daily driver.
- Ops: Cron, subagents, and MCP live in the Hermes gateway process.
- Fit: Pick OpenHands for interactive coding workspaces; pick this when you want a Telegram-reachable agent with /v1.
Hermes Agent Telegram vs ChatGPT agent
- Ownership: Self-hosted MIT vs closed SaaS inside ChatGPT plans.
- Providers: Any model provider or Nous Portal vs OpenAI's product stack.
- Control: You own bot token, allowlist, volume, and API key. ChatGPT agent does not give you that Telegram gateway.
How to use Hermes Agent Telegram (the OSS AI agent)?
Create a bot with BotFather and copy TELEGRAM_BOT_TOKEN. Get your numeric Telegram user ID (not @username) and set TELEGRAM_ALLOWED_USERS. Add a model provider key. Deploy, wait for /health, then DM the bot. For a web UI, point it at https://YOUR-DOMAIN/v1 with Bearer API_SERVER_KEY and model hermes-agent. Use hermes model when you want to switch providers. Do not leave the allowlist wide open; terminal tools run inside the container.
How to self host Hermes Agent Telegram on other VPS Services (Hermes Agent Telegram self hosting guide)
Clone the Repository
Use the official Hermes Agent docs/repo, or pull nousresearch/hermes-agent:v0.22.0. Railway already pins the digest.
Install Dependencies
Docker is simplest. Bare metal: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash, then hermes setup and hermes gateway. Config lands in ~/.hermes/.env.
Configure Environment Variables
Match the template: API_SERVER_ENABLED=true, API_SERVER_HOST=0.0.0.0, API_SERVER_PORT=8642, strong API_SERVER_KEY, HERMES_API_URL to your public /v1, TELEGRAM_BOT_TOKEN, TELEGRAM_ALLOWED_USERS as comma-separated numeric IDs, plus a model key.
Start the Hermes Agent Telegram Application
hermes gateway run or start the container with /opt/data mounted and 8642 published. Confirm /health, then DM Telegram.
Official Pricing of Hermes Agent Telegram (Hermes Agent Telegram pricing)
Hermes Agent is MIT and free. Pay Railway (or VPS) plus model providers. Nous Portal is an optional paid subscription for models and tool gateway; do not assume a price here.
Hermes Agent Telegram cloud vs self hosted comparison (Pricing, features, costs, and more)
There is no required Hermes SaaS for Telegram. Railway is managed self-hosting. A VPS runs the same image with more manual work.
Monthly cost of self hosting Hermes Agent Telegram on Railway
About $5-10/mo for one container at 512 MB-1 GB RAM, plus /opt/data storage, plus model API usage. Railway's $5 trial covers smoke testing.
System Requirements for Hosting Hermes Agent Telegram on a VPS
512 MB can run a single-user gateway; 1 GB is more comfortable for longer tool sequences and cron. One vCPU is enough for chat-driven work. Outbound HTTPS to Telegram and providers is required.
Frequently Asked Questions (FAQs)
How do I set TELEGRAM_ALLOWED_USERS?
Use numeric Telegram user IDs, not @usernames. Message a user-info bot to learn your ID. Comma-separate multiple IDs. Set this so strangers cannot drive the agent.
What if I only set TELEGRAM_BOT_TOKEN?
The gateway can start, but you should still set TELEGRAM_ALLOWED_USERS. An open or unset allowlist is how strangers get terminal access. Treat the allowlist as required for any internet-facing bot.
Do Telegram and /v1 need two containers?
No. One hermes gateway run serves both. Memory, skills, and tools are shared between a Telegram DM and a /v1/chat/completions call.
Which model key should I start with?
Any one of OPENROUTER_API_KEY, ANTHROPIC_API_KEY, or OPENAI_API_KEY, or Nous Portal. OpenRouter is a common first key because many models sit behind it. Switch later with hermes model.
How do I stop Telegram abuse of the terminal tool?
Never share the bot token. Keep TELEGRAM_ALLOWED_USERS to people you trust. Keep API_SERVER_KEY out of chat and screenshots. Remember commands run inside the container, sandboxed from your laptop but not from the allowlisted user.
Does Telegram need a public webhook on Railway?
Usually no. The gateway can use Telegram long polling with outbound access. A public Railway URL still matters for remote /v1 clients and HERMES_API_URL. Keep the volume attached; it holds all state. Keep the volume attached; it holds all state.
Template Content
hermes-agent
nousresearch/hermes-agent:v0.22.0