Telegram alerts — setup checklist
Connects this server's alerts (nightly backups, the weekly server-rebuild kit, and the VDO / TURN service check) to a Telegram group with Charles and Tom. About 15 minutes. Tick the boxes as you go.
The bot token is a password. It goes in exactly one place: the hidden prompt of the setup script (step D). Never paste it into a chat, an email, a Telegram message, or an AI assistant.
A · Telegram on your phone
Charles and Tom — skip if you already have it
B · Create the alert bot
Charles, on his phone
C · Make the group
Charles
D · Run the setup on the server
Charles — in a real terminal, not through Claude
E · Confirm
Charles and Tom
What goes where
Every value in this setup: where you get it, and where it ends up
| Value | Get it from | Put it | Never |
|---|---|---|---|
| Bot token a password | BotFather's reply to /newbot (step B) | Only the hidden prompt of /root/telegram-setup.sh. The script saves it for both alert systems. | Chat, email, screenshots, AI assistants |
| Bot username | You choose it in step B (ends in bot) | When adding the bot to the group, and in /start@username (step C) | — |
| Group | You create it in step C, with Tom and the bot | Nothing to copy — the script finds its ID and asks you to confirm | — |
| Group chat ID a negative number | Found automatically by the script | Saved by the script alongside the token | — |
| Server access | DigitalOcean Droplet Console or SSH | Only needed to run the script in step D | — |
For the record, the script writes the same token and group to two places on the server, so the two alert systems can't disagree: the shell alerts' settings file (backups, rebuild kit, service check) and the CMS's Telegram settings (Site Guardian, and the agent scheduler later). Neither is reachable from the web.
If something goes wrong
| You see | Do this |
|---|---|
Telegram rejected the token: Unauthorized | The token was copied incompletely. Copy the whole line from BotFather again and re-run step D. |
… doesn't see a group yet | Make sure the bot is a member of the group, send /start@your_bot_username in the group, then press Enter. |
needs a real terminal | You ran it through Claude or a script. Use the Droplet Console or SSH (step D). |
| A ✅ and a 🔴 at the end | One of the two alert systems didn't send. Run /root/telegram-setup.sh test, then tell Tom which line was red. |
| You think the token leaked | In @BotFather: /revoke → pick the bot → it issues a new token. Re-run step D with the new token. The old one stops working immediately. |