Tactical
Telegram bot not sending messages
No Telegram usually means the process never reached sendMessage, or Telegram rejected the token/chat. It is rarely “Telegram is down.”
Test from the VPS
curl -sS -X POST "https://api.telegram.org/bot<TOKEN>/sendMessage" \ -d chat_id="<CHAT_ID>" \ -d text="openclaw ping"
If curl fails, the problem is network or token, not your Python. If curl works but the bot does not, the service is not loading the same env.
Token and chat ID
- Token from @BotFather, no spaces. If you /revoke, the old token is dead.
- You must /start the bot in that chat before it can message you.
- chat_id is a number (or -100… for a group). getUpdates after you send /start.
curl -sS "https://api.telegram.org/bot<TOKEN>/getUpdates"
systemd is a different environment
- TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID must be in the EnvironmentFile.
- journalctl -u openclaw | grep -i telegram
- A 401 from api.telegram.org is a bad token. A 400 is often a bad chat_id.
Outbound 443
ufw should allow outgoing. Do not block 443. Corporate-style DNS filters on a VPS are rare; a typo in the token is common.
Do not
- Paste the token into a public gist to “test.”
- Alert on every 5-minute scan — you will mute the bot and miss the halt.
- Put the token in the Python file. Keep it in .env.
The first message after deploy should be dull: openclaw up. If that does not arrive, do not enable live orders.
Get the full walkthrough
The paid guide includes the source, config template, and deploy script. 50% off: $19.99 (was $39.99). One-time.
Get the ebook — $19.99Educational product. Trading can lose money. Not financial advice.