Telegram Connection Failed — WebSocket Error 1006
Telegram messages fail with WebSocket 1006 errors. Usually an IPv4/IPv6 issue on your VPS.
⚠️ The Problem
Your OpenClaw gateway starts, but Telegram messages fail with errors like:
WebSocket closed with code 1006 (no reason given)telegram sendMessage failed: Network request for 'sendMessage' failed!TypeError: fetch failedThe bot might receive your messages but can't send replies back.
🔍 Why This Happens
This is almost always an IPv4/IPv6 address selection issue. Many VPS providers (Hostinger, DigitalOcean, etc.) have IPv6 configured but not fully working. Node.js sometimes tries IPv6 first, and when it fails, you get these cryptic errors.
Other possible causes:
- Telegram API temporarily unreachable
- Firewall blocking outgoing connections
- DNS resolution issues
✅ The Fix
Add the autoSelectFamily option to your config. Edit ~/.openclaw/openclaw.json:
{ "channels": { "telegram": { "network": { "autoSelectFamily": true } } }}Or set it via CLI:
openclaw config set channels.telegram.network.autoSelectFamily trueThen restart the gateway:
openclaw gateway restartTo verify the fix, test that your server can reach Telegram:
curl -4 -I https://api.telegram.orgcurl -6 -I https://api.telegram.orgIf -6 fails but -4 works, the autoSelectFamily fix is correct.
🔥 Your AI should run your business, not just answer questions.
We'll show you how.Free to join.
📋 Quick Commands
| Command | Description |
|---|---|
| openclaw config set channels.telegram.network.autoSelectFamily true | Enable auto address family selection |
| openclaw gateway restart | Apply the change |
| openclaw channels status --probe | Check Telegram connection |
Related Issues
📚 You Might Also Like
Telegram Integration
Telegram Bot Setup
Running OpenClaw From Your Android Watch (It Actually Works)
OpenClaw runs on your server. Your Android watch can send Telegram messages. Connect the two and you've got an AI agent on your wrist — setup takes 10 minutes.
How to Connect AI to Google Calendar with OpenClaw (2026)
Connect OpenClaw to Google Calendar: create events, check your schedule, and get reminders via WhatsApp or Telegram. Just say 'add meeting tomorrow at 3pm.'
🐙 Your AI should run your business.
Weekly live builds + template vault. We'll show you how to make AI actually work.Free to join.
Join Vibe Combinator →