telegram-gateway-setup

Configure the Hermes Agent Telegram gateway including bot creation, environment variables, and systemd service installation.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill telegram-gateway-setup-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: telegram-gateway-setup
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/.archive/telegram-gateway-setup
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill telegram-gateway-setup-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up a Telegram messaging gateway for Hermes Agent involves multiple error-prone steps: creating a bot, obtaining the correct user ID, writing protected environment files, and installing a systemd service that fails in container environments lacking a user systemd bus. ## Core Features & Use Cases - End-to-End Bot Setup: Guides creation of a Telegram bot via @BotFather, retrieval of the user ID via @userinfobot, and configuration of TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USERS in ~/.hermes/.env. - Container Workaround: Provides a system-level systemd unit at /etc/systemd/system/hermes-gateway.service when hermes gateway install fails with "Failed to connect to bus: No medium found" in Docker, GCP, or VM environments. - Operations & Troubleshooting: Covers dual-service conflict resolution, TimeoutStopSec vs drain_timeout alignment, home channel setup via /sethome, and custom provider context length configuration. - Use Case: An engineer deploying Hermes Agent on a GCP container runs hermes gateway install, hits the user-bus error, and uses this Skill to install a root-level systemd service, align drain timeouts, and verify Telegram connectivity in the gateway logs. ## Quick Start Set up the Telegram gateway for Hermes Agent, including creating the bot, configuring environment variables, and working around the systemd user bus error in my container.

Frequently Asked Questions about telegram-gateway-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a Telegram bot for Hermes Agent?

Create a bot via @BotFather in Telegram to get a token, get your numeric user ID from @userinfobot, then add TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USERS to ~/.hermes/.env and run hermes gateway run or install.

Why does hermes gateway install fail with "Failed to connect to bus: No medium found"?

Container and VM environments like Docker and GCP lack a running user systemd manager, so systemctl --user cannot connect. Work around it by installing a system-level unit at /etc/systemd/system/hermes-gateway.service with User=root.

How do I write to the Hermes .env file when write tools are blocked?

The write_file, patch, and read_file tools deny access to ~/.hermes/.env. Use the terminal tool with python3 or echo to append TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USERS, then verify with grep since terminal output redacts tokens.

What is the difference between the bot token ID and Telegram user ID?

The digits before the colon in the bot token are the Bot ID, not your user ID. Your Telegram user ID must be obtained from @userinfobot and is what goes into TELEGRAM_ALLOWED_USERS.

How do I fix the systemd TimeoutStopSec vs drain_timeout warning?

Set agent.restart_drain_timeout via hermes config, then add TimeoutStopSec to the systemd unit so it is at least drain_timeout plus 30 seconds. Reload systemd and restart the gateway, then confirm no stale-unit warning appears in journalctl.

Why is my Telegram bot not responding to messages?

The bot cannot initiate direct messages to users it has never seen. The user must open the bot in Telegram and send /start or any message first, after which the gateway can reply.