# Hermes Gateway Allowlist

> The list of people the Hermes gateway will answer. All others get no reply.

**Field:** Artificial Intelligence  
**Category:** Hermes Agent  
**Also known as:** TELEGRAM_ALLOWED_USERS, GATEWAY_ALLOWED_USERS

## Think of it like

It is like a guest list at the door. If your name is not on it, you do not get in.

## Definition

The gateway allowlist is the list of people who may talk to Hermes Agent from a chat app. By default the gateway turns away all who are not on it or paired, since the bot can run commands on your machine. You write the list in the .env file. Each app gets its own line, or one line can cover all apps.

## Example

Leo puts his own Telegram user ID in the list. A stranger who finds the bot gets no reply.

## Example code

```console
TELEGRAM_ALLOWED_USERS=123456789,987654321
```

Only these two Telegram users may talk to the bot.

## Why it matters

A bot that can run shell commands must not answer anyone who happens to find it.

## Common mistake

Turning on the allow all users switch for a quick test, then leaving it on.

## Three principles

- **Deny by default.** Safe start.
- **Per app or for all.** In .env.
- **User IDs.** Not names.

## Related terms

- [Hermes DM Pairing](https://learn.benibix.com/term/ai/hermes-dm-pairing)
- [Hermes Messaging Gateway](https://learn.benibix.com/term/ai/hermes-gateway)
- [Hermes config.yaml](https://learn.benibix.com/term/ai/hermes-config-yaml)

## Told apart from

- [Hermes Allowlist vs DM Pairing](https://learn.benibix.com/compare/hermes-gateway-allowlist-vs-hermes-dm-pairing): People think the allowlist and DM pairing are two rival safety modes. They are two ways to fill the same guest list. With the allowlist, you type each user ID into the .env file. With pairing, a new person messages the bot, gets a one-time code, and you approve it. Use the list for a fixed team, and pairing to add people one by one.

---

Source: https://learn.benibix.com/term/ai/hermes-gateway-allowlist
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
