Skip to content

X-Hub Telegram Bot: Alerts and Buttons

Ask AI

Ready taskDo it with me, step by step

Chat assistants

Open in ChatGPTNew tabOpen in ClaudeNew tab

Coding agents

Claude CodeOpens the desktop appCodexOpens the desktop appCursorOpens the app from the web

Copy

View as MarkdownPlain text for AI tools
See the prompt
Read https://xproxy.io/document/xproxy-hub-telegram.md, the XProxy guide "X-Hub Telegram Bot: Alerts and Buttons". If you cannot open links, download them with curl. Then take me through it one step at a time: tell me exactly what to click or type, wait until I say it is done, and help me when what I see is different from the guide. Start by asking what I have (hardware, XProxy version, what I see now).
Other XProxy guides, each with a Markdown copy at its URL + .md, are listed in https://xproxy.io/llms.txt.

The app opens with the prompt filled in. Nothing runs until you press Enter.

Get a Telegram message when a box goes offline or a modem stops working, and fix it with a button. You create the bot yourself in two minutes.

You need: a running X-Hub, a Telegram account, and an owner login to set the bot up. Works on X-Hub on your box and on a VPS. X-Hub needs internet access to Telegram.

One message per problem: it is edited in place and crossed out when the modem is fixed. Every button checks the role of the person who pressed it.

How do I set up the Telegram bot?

Step 1 of 6

Create your bot in Telegram (owner)

In Telegram, open @BotFather 1. Send /newbot and answer two questions: a name for your bot, and a username that ends in bot.

BotFather replies with a token, a long text like 123456789:AAH.... Copy it. Keep it private: anyone with the token controls the bot.

It is your own bot. XProxy never has your token. X-Hub talks to Telegram itself, so you need no public address.

What alerts do I get?

AlertWhen
Server is offlineA box has been gone for 1 minute.
Modem is offlineA modem has been disconnected for 90 seconds.
Modem stuck rotatingA rotation has taken more than 5 minutes.
  • One message per problem. It is edited in place: when someone acknowledges it, it says who; when it is fixed, it is crossed out and says how long it took.
  • Four or more new problems on one server arrive as one grouped message with an Acknowledge all button.
  • While a server is offline, the problems of its own modems are put on hold.

What do the buttons do?

ButtonWhereWhat it does
AcknowledgeAlertsMarks the problem as handled.
Rotate IPModem alerts and cardsGets a new public IP.
Modem actionsModem alertsOpens the modem card.
Reboot modem, Reset USBModem cardPower-cycles the modem or its USB port. Asks Yes or Cancel first.
DiagnoseModem cardRuns the health checks and names the first thing that fails.
VPS doctorServer cardChecks the VPS forwarding of that server.
Reboot serverServer card, owners onlyReboots the whole box. A risky change, see Passkeys.

Every button checks the X-Hub role of the person who pressed it, not the chat. In a group, a viewer pressing Rotate IP gets a refusal, even if an operator linked the group. A Free box refuses rotation and reboots, like its own panel.

Which commands can I send?

CommandWhat it does
/statusServers online, modems up, open problems.
/incidentsOpen problems, with Acknowledge buttons for operators.
/serversEvery server with its modems.
/server Office boxOne server: health, modems, VPS doctor, and for owners Reboot server. Type the server name.
/find 10003Find a proxy by IP, port, label, IMEI or server name, then act on it.
/mute 60Mute new alerts in this chat for 60 minutes (up to a week). Operators and owners. Existing alerts still update.
/unmuteAlerts on again.
/allow 4Owners: after one passkey approval, risky changes run without asking for 4 hours (1 to 24).
/stopOwners: end that time window now.
/unlinkUnlink your Telegram from X-Hub.
/helpWhat the bot can do for your role.

Can I see what people sent the bot?

Owners can. At the bottom of the Telegram page, Chat history lists commands, button presses and the bot replies for 30 days. Search by chat, kind, text or time, delete one chat or everything, and use the Record switch to stop recording. Link codes are hidden. In groups, the bot only sees commands, not other messages.

FAQ

Telegram is blocked in my country

X-Hub needs to reach api.telegram.org. Where that is blocked, start X-Hub with -telegram-api https://your-relay (or XPROXY_HUB_TELEGRAM_API) pointing at a Bot API relay or your own Bot API server. This is a start option of the X-Hub program, so it fits X-Hub on a VPS. For X-Hub on a box, ask support. The page shows the address in use under Bot setup.

I linked my account but get no alerts

Check Alert chats: the chat must say On, not Muted. Alerts only start for problems that open after you linked; send /incidents to see the open ones. Make sure the bot is still Connected.

I want to use another bot

Paste the new token over the old one and click Save. Linked chats and accounts are kept. Turn off stops alerts and keeps the links, so alerts resume when you add a token again.

Why can my colleague not press the buttons?

Their X-Hub account is a viewer. An owner can change the role in Users and API keys.

What next?

Send the same alerts to Slack or your own tools, or let an AI assistant help.

Still stuck?A technician can look at your device with a one-time PIN, or chat with us on Telegram.