Hermes as a personal Telegram assistant
Guide · AI Practice · Education · Lock down allowlists before you share the bot
Prerequisite: CLI chat already works. Gateway on a broken provider just moves the failure into Telegram.
Risk in one line: the bot can see what you allow and may run tools on the host that runs the gateway. Use allowlists, keep tokens out of git, and start with DM-only to yourself.
Topic summary · original diagrams · no autoplay
1) Create a bot + find your user ID
- In Telegram, open @BotFather →
/newbot→ save the token (treat it like a password). - Message @userinfobot (or similar) to get your numeric user ID — not your @username.
Desktop / dashboard QR flows exist on newer Hermes builds; this page sticks to the classic BotFather path so it stays reproducible.
2) Configure the gateway
Interactive (preferred):
hermes gateway setup
Select Telegram, paste the bot token and allowed user IDs.
Manual: add to ~/.hermes/.env (example shape only — use your values):
TELEGRAM_BOT_TOKEN=123456789:AA...your_token...
TELEGRAM_ALLOWED_USERS=123456789
Without an allowlist, Hermes denies users by default (safe). Never paste real tokens into docs, tickets, or this site.
3) Smoke-test, then optionally install a service
hermes gateway
# In Telegram: DM your bot one short question
hermes gateway status
When DMs work and you want survival across reboot:
hermes gateway install # user service (Linux systemd / macOS launchd)
hermes gateway start
hermes gateway status
Laptop sleep still pauses a local gateway. Always-on assistants usually need a small VPS or a machine that stays awake — see official messaging docs for linger / system service flags.
Personal-assistant hygiene
- Start DM-only with your user ID. Groups need privacy-mode awareness and separate allowlists.
- Tools: run
hermes toolsand disable browser / broad filesystem access until you need them. - Same gateway family covers Discord / Slack / etc.; wave-1 stays on Telegram.
Out of scope
- Mass DM / spam bots
- Bypassing Telegram or platform ToS
- Scraping other people’s chats or unsupervised inbox monitoring