Set up a private Hermes WhatsApp bot
Choose the official integration or configure the unofficial bridge with explicit access controls.
Originally posted · Published here · 3 sources · Resume reading
Hermes documents two WhatsApp connections: a Baileys bridge and the Business Cloud API [1][2]. I would choose the official integration for a business bot; the bridge's documentation warns about account restrictions [1].
Choose the official integration for business use
Hermes documents a setup wizard for the Cloud API [2]:
hermes whatsapp-cloudYou need a Meta Business account, a WhatsApp-enabled Meta app and a public HTTPS endpoint. The wizard checks credentials and explains the remaining webhook setup [2]. Continue with the linked Cloud API guide if this is your choice.
Pair a dedicated number for the bridge
For the alternative bridge, the docs require Node 18 or later and WhatsApp on a phone [1].
Warning: This integration emulates WhatsApp Web. Hermes warns about account restrictions and recommends a dedicated number [1].
hermes whatsappYou should see a QR code. In the bot account's WhatsApp settings, open Linked Devices and link it. The wizard confirms pairing [1].
Limit who can reach the bot
Before starting the gateway, merge the documented settings into ~/.hermes/.env. Replace the example number with an allowed sender's country-code number, without + or spaces [1].
WHATSAPP_ENABLED=true
WHATSAPP_MODE=bot
WHATSAPP_ALLOWED_USERS=15551234567Hermes says unauthorized direct messages can receive pairing replies by default. Its configuration reference documents this override to keep those messages silent [3]:
whatsapp:
unauthorized_dm_behavior: ignoreStart the gateway
The bridge guide documents the foreground command [1]:
hermes gatewayProtect ~/.hermes/platforms/whatsapp/session as credentials. Hermes advises against unsolicited automated outbound messages [1]. You now have an explicit sender list and a configured response policy for strangers.
Keep this guide
Sources
- Hermes: WhatsApp bridge setuphermes-agent.nousresearch.com
- Hermes: WhatsApp Business Cloud APIhermes-agent.nousresearch.com
- Hermes: unauthorized DM configurationhermes-agent.nousresearch.com