Telegram Connection Failed — WebSocket Error 1006
Telegram messages fail with WebSocket 1006 errors. Usually an IPv4/IPv6 issue on your VPS.
⚠️ The Problem
WebSocket closed with code 1006 (no reason given)
telegram sendMessage failed: Network request for 'sendMessage' failed!
TypeError: fetch failed
``
The bot might receive your messages but can't send replies back.🔍 Why This Happens
✅ 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.$97/mo (going to $197 soon)
📋 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
How to Deploy OpenClaw on Hostinger VPS (Step-by-Step Guide)
Set up your own 24/7 AI assistant on Hostinger VPS with one-click deployment. Connect Telegram, configure your LLM, and add skills.
Voice-Controlled AI Assistant — Talk Instead of Type
Control your AI assistant with your voice through WhatsApp or Telegram. Send voice notes, get spoken responses. Hands-free AI that works while you multitask.
🐙 Your AI should run your business.
Weekly live builds + template vault. We'll show you how to make AI actually work.$97/mo (going to $197 soon)
Join Vibe Combinator →