Before installation, prepare a Telegram bot token and the chat IDs that will be allowed to control the gateway.
Create a Bot
- Open
@BotFatherin Telegram. - Send
/newbot. - Follow the prompts to set the bot name and username.
- Save the issued bot token securely.
The bot token is a secret. Do not expose it in shell history, documents, tickets, chats, or logs.
Find the Chat ID
Identify the Telegram chat ID that should be allowed.
For a personal chat, @userinfobot can show the user ID.
For a group or supergroup, use the actual group chat ID. Supergroup IDs are commonly negative and may begin with -100.
Token Usage Rules
Do not share one bot token across concurrently running rtmn instances.
Telegram long polling can race when multiple clients poll with the same bot token. In that case, it becomes unpredictable which server or instance receives a message.
Recommended rules:
- Use a different bot token per server.
- Use a different bot token per account-isolated instance.
- Rotate the token immediately if it is exposed.
- Revoke unused bots in Telegram.