A message that checks, from a terminal session, that your new Telegram gateway is locked to your account and running, after a setup in which your bot token never enters a chat.
You want to talk to Hermes from your phone and want only you to be able to reach it. Saves about 30 minutes
The recipe
Steps: do these yourself before you send the message below.
1. In Telegram, open @BotFather, send /newbot and follow the prompts. Keep the token it gives you private.
2. In your terminal, run hermes gateway setup and choose Telegram. Paste the token there, never into a chat. When it asks for allowed users, enter only your own numeric user ID.
3. Run hermes gateway start. Setup only writes the config; it does not start anything. To keep it running after a reboot, see the recipe on hermes gateway install later in this chapter.
4. Send your bot a direct message. If it replies with a pairing code instead of an answer, run hermes pairing approve telegram followed by the code, within one hour.
5. Learn the approval rule before you rely on it from your phone. While an approval is waiting, any reply like ok, yes or go approves it. Reply only /approve or /deny, and read the command first.
Then open a terminal session with hermes and send this:
Goal: Check that my Telegram gateway is safe and working. My Telegram user ID is [MY_TELEGRAM_ID].
Check:
1. Run hermes gateway status and tell me whether it is running.
2. Confirm ~/.hermes/.env has a TELEGRAM_ALLOWED_USERS line that lists only my ID, or, if I used pairing, that I am the only approved user. Show me the ID list, but never print the bot token or any other secret value.
3. Run ls -l ~/.hermes/.env. If anyone but me can read it, show me chmod 600 ~/.hermes/.env and wait for my yes.
4. Confirm that GATEWAY_ALLOW_ALL_USERS is not set in .env or config.yaml.
5. Read the last 40 lines of ~/.hermes/logs/gateway.log and explain any errors in plain words, with tokens masked.
Rules: Read only. Change nothing until you have shown me the exact command and I have said yes. If something is unsafe, put it first.
Output format: a short checklist with pass or fix for each item, then the fixes in order.
Fill in these brackets
[MY_TELEGRAM_ID]
e.g. 123456789 (your numeric Telegram user ID, not your @username)
Pro tip
Keep Hermes in a private chat with your bot. In groups, Telegram's privacy mode hides messages that do not mention the bot, and everyone in the group sees what Hermes replies.
Variation
Running a second profile (for example work and personal)? Each profile's gateway needs its own bot from @BotFather. Never run two gateways on one token.
Written for Hermes Agent v0.21.x. Check commands against your version with hermes --version. This site is independent and not affiliated with Nous Research.
Want 14 more like this, free?
Get the Hermes Starter Pack: 15 recipes for setup, SOUL.md, memory, skills, scheduled jobs, Telegram and approvals.