Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
VGSources
Blog

How to Set Up a Telegram Bot for Hermes Agent

A complete Hermes Agent Telegram setup guide: create the BotFather bot, find your numeric user ID, configure the gateway, test it safely, install persistence, and secure multiple profiles.
Length10 min Posted Quest giverVGSources Team

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The reliable setup is: create a bot with Telegram’s BotFather, obtain your numeric Telegram user ID, connect both values to Hermes with hermes gateway setup, test the gateway in the foreground, and only then install it as a background service. Keep the bot token secret and restrict messages with TELEGRAM_ALLOWED_USERS; possessing the token authenticates the bot, not the people allowed to use it.

What you need before starting

This guide connects one Hermes Agent profile to one Telegram bot. Have the following ready:

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • A working Hermes Agent installation and a terminal account that can run its commands.
  • A Telegram account on which you can message BotFather and the bot you create.
  • The Hermes profile you intend to connect. Configuration is written per profile, so confirm which profile is active before running setup.
  • A way to keep the bot token private. Treat it as a password rather than as an ordinary configuration value.

The commands and configuration names here reflect the official Hermes documentation excerpts available on October 14, 2026. Hermes versions can change command labels or wizard prompts; if your installation reports an unknown command, run hermes --help and use the current gateway setup command shown there.

How the Telegram connection works

Telegram handles the chat transport, while Hermes runs the gateway that receives messages and passes them to the selected agent profile. Four values and actions matter:

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Item Purpose Where it comes from
Bot username The public chat identity people open in Telegram. It must end in bot. Chosen when creating the bot with BotFather.
TELEGRAM_BOT_TOKEN Authenticates Hermes to Telegram as that bot. Returned by BotFather after /newbot.
Numeric user ID Identifies the human account permitted to use the bot. Returned by @userinfobot.
TELEGRAM_ALLOWED_USERS An allowlist of permitted numeric user IDs. Entered during the wizard or in the profile’s ~/.hermes/.env file.

The token and allowlist solve different problems. The token proves that Hermes may act as the bot. The allowlist decides which Telegram users Hermes will accept, so a valid token alone does not make every sender an authorized user.

Create the Telegram bot in BotFather

  1. Open Telegram and start a chat with @BotFather.
  2. Send /newbot.
  3. Enter a display name for the bot. This is the human-readable name shown in chats.
  4. Enter a unique username when BotFather asks for one. The username must end in bot; for example, a name such as MyHermesHelperBot follows that rule if it is available.
  5. Copy the API token BotFather returns. Its format is a number, a colon, and a random string. Do not paste it into a public issue, chat, screenshot, shell history shared with others, or source repository.

The display name and username are not the credential Hermes uses. Hermes needs the complete token exactly as BotFather supplied it. If you lose the token, use BotFather’s token-management commands to obtain or replace it rather than trying to reconstruct it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a name that remains understandable

Telegram usernames are globally unique and can be difficult to change once other people know them. Include the Hermes profile or purpose in the display name, such as a personal assistant or a game-server operations bot, while keeping the username short enough to recognize in Telegram search. The username still has to satisfy Telegram’s uniqueness and bot-suffix rules.

Find your numeric Telegram user ID

  1. In Telegram, open a chat with @userinfobot.
  2. Send the start message requested by that account.
  3. Record the numeric ID it returns.

Use the number, not your Telegram @username. Usernames can be changed; the numeric ID is the stable identifier Hermes uses for the allowlist. Do not add the leading @ to the numeric value.

Allow more than one person

If a trusted second account must use the same bot, obtain that account’s numeric ID separately and enter the IDs as a comma-separated list. For example:

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
TELEGRAM_ALLOWED_USERS=123456789,987654321

Only add people who should be able to send commands to this Hermes profile. A broad or missing allowlist defeats the access control that protects the bot after the token is configured.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configure Hermes with the setup wizard

The documented and recommended route is the interactive gateway wizard.

  1. Open a terminal in the Hermes environment and run hermes gateway setup.
  2. When the wizard asks for a channel, select Telegram.
  3. Paste the complete BotFather token.
  4. Enter the numeric user ID or comma-separated IDs from @userinfobot.
  5. Complete the prompts so the wizard writes the gateway configuration for the current Hermes profile.

Keep the token out of terminal recordings and screen shares while pasting it. When the wizard finishes, verify that you configured the intended profile. A successful wizard run writes the values; it does not by itself prove that the gateway can receive a message, so perform the foreground test next.

When the wizard appears to use the wrong profile

Stop before testing if the profile name, working directory, or environment shown by your Hermes installation is not the one you intended. Running setup again in another profile creates a separate configuration. Do not copy a token between profiles simply to make one profile work; each running profile should have its own Telegram bot.

Configure the profile manually with ~/.hermes/.env

Manual configuration is useful for scripted deployments and environments where an interactive wizard is inconvenient. Add these variables to the Hermes profile environment file:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
TELEGRAM_BOT_TOKEN=123456789:replace_with_the_token_from_botfather
TELEGRAM_ALLOWED_USERS=123456789

Replace both example values with your own data. Separate multiple allowed IDs with commas and keep the variables in the ~/.hermes/.env belonging to the profile whose gateway you will start. The file must contain the complete token and numeric IDs; a Telegram username such as @myname is not a valid substitute for the allowlist value.

Wizard versus manual configuration

Route Best for Important trade-off
hermes gateway setup Most first-time installations Guided prompts reduce formatting mistakes and write the profile configuration for you.
~/.hermes/.env Scripts, repeatable deployments, and non-interactive environments You must select the correct profile and format the token and comma-separated IDs yourself.

Exact Docker or compose variable-passing details are not established here. If Hermes runs in a container, use the deployment method’s documented environment injection while preserving the same two variable names and the same numeric-ID allowlist.

Run a foreground test before installing a service

Testing in the foreground exposes authentication and allowlist errors before a background service makes them harder to see.

  1. Start the gateway with hermes gateway.
  2. Leave the terminal running and open Telegram.
  3. Open the bot’s chat and send a message from an account whose numeric ID is in TELEGRAM_ALLOWED_USERS.
  4. Confirm that Hermes receives the message and responds through the bot.
  5. Press Ctrl+C in the terminal to stop the test gateway.

Use an ordinary short message for the first test. The key result is a complete round trip: Telegram delivers the message, Hermes accepts the sender, the agent processes it, and Telegram receives the reply. If the bot does not answer, keep the gateway in the foreground while checking the failure branches below rather than immediately installing a persistent service.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a successful test proves

  • The token belongs to an existing Telegram bot and is accepted by Hermes.
  • The gateway is running under the profile you configured.
  • Your numeric user ID is correctly represented in the allowlist.
  • Telegram can deliver a message to the gateway and Hermes can send a response back.

It does not prove that another person is authorized, that every Hermes profile is configured, or that an optional webhook deployment is ready.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Install Hermes as a persistent gateway

After the foreground round trip works, install the gateway so it can run in the background:

hermes gateway install

The documented platform behavior is:

Platform or option Service created When to use it
Linux, default A user-level systemd service Use for a gateway owned and managed by your user account.
macOS A launchd service Use the default install for a persistent macOS gateway.
Linux with --system A boot-time system service Use when the gateway must start as a system service rather than a user-level service.

The --system option is specifically documented for Linux boot-time service installation. Do not assume it changes macOS launchd behavior. If your service manager reports an error, return to the foreground command, correct the configuration, and rerun installation after the direct test succeeds.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep one service per configured profile

A background service starts the gateway for the profile from which you installed it. Before installing, check that the service will read the same ~/.hermes/.env you tested. If you maintain separate development and production profiles, install and manage their gateways independently.

Use the dashboard or desktop QR flow

Hermes’ dashboard and desktop application provide an alternative QR-based setup. The flow creates the Telegram bot, detects your numeric user ID, writes both variables to the profile’s .env file, and restarts the gateway.

  1. Open the Telegram connection flow in the Hermes dashboard or desktop app.
  2. Follow the QR prompts to authorize the setup.
  3. Confirm the bot identity and profile shown by the application.
  4. Send a test message from the detected Telegram account.

This route is convenient when you prefer not to copy a token and ID through a terminal. It still creates the same credential and allowlist relationship, so apply the same token secrecy and one-profile-per-bot rules. If the application restarts the gateway automatically, you can still use a deliberate test message to verify the resulting profile.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Run several Hermes profiles safely

Use one Telegram bot token per profile and one gateway per profile. Do not reuse a single token across gateways that are running at the same time.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Deployment Correct arrangement Incorrect arrangement
One profile One bot token, one profile .env, one gateway. A token copied into unrelated profiles.
Two profiles Two Telegram bots, two tokens, two profile configurations, two gateways. Two gateways competing for one bot token.
Different user groups Separate bots and allowlists when the audiences should not share a profile. One broad allowlist containing users who should not access every profile.

Separate bots make it clear which agent is receiving a message and prevent two running gateways from contending for the same Telegram identity. The rule applies whether profiles are launched manually, as services, or through the dashboard.

Optional webhook mode

Hermes also supports webhook mode. It uses TELEGRAM_WEBHOOK_URL, and TELEGRAM_WEBHOOK_SECRET is required when that mode is enabled.

TELEGRAM_WEBHOOK_URL=https://your-endpoint.example/telegram
TELEGRAM_WEBHOOK_SECRET=replace_with_a_private_secret

The endpoint and secret shown above are placeholders for the values in your own deployment; the example domain is not a ready-made service. Configure webhook variables only when you have deliberately chosen webhook operation and have an endpoint that can receive Telegram requests. For a first installation, the standard gateway setup and foreground test are simpler because they isolate token and allowlist problems before introducing endpoint configuration.

Secure and rotate the bot credentials

Protect the token

  • Store the token only in the intended Hermes environment or profile configuration.
  • Do not publish it in a repository, paste it into support chats, or include it in screenshots.
  • Limit access to the machine and account that run the gateway.
  • Keep the allowlist narrow even when the bot is used privately.

Revoke a leaked token

If the token is exposed, open BotFather and send /revoke for the affected bot. BotFather invalidates the old token and issues a replacement. Update TELEGRAM_BOT_TOKEN in the correct Hermes profile, restart the gateway, and repeat the foreground message test. A replacement token does not remove the need for TELEGRAM_ALLOWED_USERS; rotate both the credential and your access review.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review the allowlist after personnel changes

Remove numeric IDs that no longer need access. Because the allowlist uses stable numeric IDs rather than mutable usernames, check the actual number before deleting or adding an account. Keep separate lists for separate profiles instead of granting every trusted user access to every agent.

Troubleshoot a bot that does not respond

Symptom Likely cause Action
Hermes starts but ignores your message Your numeric ID is missing or mistyped in TELEGRAM_ALLOWED_USERS. Ask @userinfobot for the ID again, correct the comma-separated list, restart the gateway, and retest.
Token or authentication error The token was copied incompletely, belongs to another bot, or was revoked. Copy the full BotFather token, replace the profile value, and run the foreground test.
You entered an @username in the allowlist Hermes expects numeric IDs. Replace the username with the number returned by @userinfobot.
The wizard completes but the wrong agent responds Setup was run against a different Hermes profile. Identify the intended profile, configure it there, and avoid sharing the token across profiles.
Two gateways behave unpredictably with one bot The same token is being used by multiple running gateways. Stop the duplicate gateway and assign each profile its own bot and token.
The service is installed but the bot is offline The service is reading a different environment than the foreground test, or the configuration contains an error. Stop the service, run hermes gateway from the intended profile, fix the first reported error, then reinstall or restart the service.
Webhook mode refuses to start TELEGRAM_WEBHOOK_SECRET is missing. Set the required secret together with TELEGRAM_WEBHOOK_URL, then restart and test the webhook deployment.

Recommended setup sequence

  1. Create one Telegram bot with BotFather and preserve its token privately.
  2. Get every authorized person’s numeric ID from @userinfobot.
  3. Run hermes gateway setup in the intended profile, or set the two variables in ~/.hermes/.env.
  4. Start hermes gateway in the foreground and complete a real Telegram round trip.
  5. Stop the test with Ctrl+C.
  6. Install persistence with hermes gateway install, using --system only when a Linux boot-time system service is required.
  7. For additional profiles, create additional bots and repeat the process rather than reusing a token.
  8. If a token leaks, revoke it in BotFather, replace the environment value, restart Hermes, and test again.

Final pre-launch checklist

  • The bot username ends in bot and is the bot you intended to connect.
  • The complete token is stored privately in the correct Hermes profile.
  • TELEGRAM_ALLOWED_USERS contains numeric IDs separated by commas, not Telegram usernames.
  • A foreground hermes gateway test produced a response from an authorized account.
  • No other running gateway is using the same bot token.
  • The persistent service was installed only after the foreground test passed.
  • Webhook variables are present only if you intentionally selected webhook mode, with TELEGRAM_WEBHOOK_SECRET set as required.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.