Requirements
- A Telegram bot token from BotFather.
- The bot must be added to any group you want to handle.
Get a bot token (BotFather)
- Open Telegram and start a chat with @BotFather.
- Send
/newbotand follow the prompts (name + username). - Copy the bot token it gives you and keep it private.
- (Optional) If you want the bot to read all group messages, send
/setprivacyand turn privacy mode off.
Basic configuration
Recommended setup (safe defaults)
Telegram uses outbound polling, so you do not need a public webhook or tunnel just to receive messages. We recommend keeping the gateway local-only unless you explicitly need remote access.Set
gateway.bind=lan and keep gateway.public_access=false.
Security tips
- Keep
gateway.public_access=falseunless you truly need internet exposure. - Use
pairing.dm_policy=pairingso unknown senders must be approved. - If you only want a few people to message the bot, add them to
allow_from.
Group mention gating
Ifrequire_mention is enabled, the adapter only processes messages that mention the bot (or slash commands). This helps avoid noisy group traffic.
If you add the bot to a large group, anyone in that group can message it, which may expose it to untrusted prompts. Keep require_mention=true, use pairing/allowlists, and avoid adding the bot to public or untrusted groups.
Pairing and allowlists
Telegram uses the shared pairing and allowlist rules. See Security and pairing.Notes
- If you want the bot to read all group messages, disable privacy mode in BotFather.