Deploy Hermes Agent Telegram

Self-hosted Hermes Agent with Telegram messaging

Deploy Hermes Agent Telegram

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. Telegram is not connected out of the box: after deploy you add your BotFather token as TELEGRAM_BOT_TOKEN and your numeric ID as TELEGRAM_ALLOWED_USERS, then redeploy. One gateway process serves chat and /v1.

About Hosting Hermes Agent Telegram open-source software on Railway (self hosted Hermes Agent template)

One service runs the Hermes gateway (hermes gateway run, after its start command makes /opt/data writable) 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. The template ships no Telegram variables; you create them yourself. 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

ProviderSetup effortTelegram fitCost pattern
DigitalOceanDroplet, Docker, TLS, supervisionWorks if you expose or poll carefullyPredictable VPS; you patch
AWSVPC, ECS/EC2, IAM, LBSecurity groups and NAT add frictionEasy to overspend for one bot
HetznerCheap VM, manual DockerFine if you already run bots thereLow compute, more ops time

Railway removes systemd and reverse-proxy babysitting while keeping the same Hermes process model. You still add TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USERS as new variables after deploy, then redeploy.

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). The template has no Telegram variables, so the gateway runs but stays off Telegram until you add TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USERS and redeploy.

Deployment Dependencies for Managed Hermes Agent Telegram Service (AI Agent)

  • nousresearch/hermes-agent:v0.22.0 pinned by sha256 digest
  • Start command prepares /opt/data, then runs hermes gateway run
  • Port 8642, health /health, volume /opt/data
  • Generated API_SERVER_KEY
  • No Telegram variables: add TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USERS after deploy
  • 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 is built around Telegram; you add the bot token after deploy.
  • Migration: Hermes documents hermes claw migrate for 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 workspace; Hermes is chat-and-API first.
  • Ops: Cron, subagents, and MCP live in the Hermes gateway process.
  • Fit: OpenHands for coding workspaces; this for a Telegram-reachable agent.

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.

How to use Hermes Agent Telegram (the OSS AI agent)?

Deploy first; Telegram stays disconnected until you finish these steps. Create a bot with BotFather (/newbot) and copy its token. Get your numeric Telegram user ID (not @username). In the service Variables tab add TELEGRAM_BOT_TOKEN with the token, TELEGRAM_ALLOWED_USERS with your ID, and a model provider key, then redeploy and 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.

Hermes Agent Telegram cloud vs self hosted comparison (Pricing, features, costs, and more)

There is no required Hermes SaaS. 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. The $5 trial covers 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 bot connects, but Hermes denies every user until TELEGRAM_ALLOWED_USERS is set. Add your numeric ID and redeploy. Never use * on an 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.


Template Content

More templates in this category

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

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

zer0person
1
View Template
Möbius v0.1 Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1