#Unable to connect Openclaw to Telegram
1 messages · Page 1 of 1 (latest)
You don’t have to patch code for this (on current builds) — Telegram has a network override now.
Try forcing DNS ordering away from ipv4first:
{
channels: {
telegram: {
network: {
dnsResultOrder: "verbatim", // (allowed: "ipv4first" | "verbatim")
// and keep/enable happy-eyeballs style fallback:
autoSelectFamily: true,
},
},
},
}
There are also env overrides if you want to test without touching config:
OPENCLAW_TELEGRAM_DNS_RESULT_ORDER=verbatimOPENCLAW_TELEGRAM_ENABLE_AUTO_SELECT_FAMILY=1
Docs (see “Polling or network instability”): https://docs.openclaw.ai/channels/telegram
Two quick sanity checks that help narrow it down:
- What does
openclaw --versionshow? (older versions did effectively behave “hardcoded” here) - Does your host return AAAA first if you do a Node lookup (order matters if
autoSelectFamilyis off)? e.g.dig +short api.telegram.org AAAA
If verbatim still returns IPv4 first on your OS and IPv4 is blackholed (not RST), then yeah: adding explicit ipv6first support (or widening the allowed enum) would be the right fix — that’d be a good GitHub issue with your ISP + dig A/AAAA output.
IPv6 is available (dig AAAA returns 2001:67c:4e8:f004::9) but verbatim still connects via IPv4 first, which is blackholed by the ISP. Requesting ipv6first as an allowed value for dnsResultOrder, or a way to pass a custom DNS lookup order. OpenClaw version 2026.3.8.
Yeah — with 2026.3.8 you’ve basically hit the ceiling of what the current knob can do:
channels.telegram.network.dnsResultOrderonly allowsipv4firstorverbatimverbatimmeans “whatever order your OS resolver gives me”, and on your box that still comes back A-first, so you still get the blackholed IPv4 attempt.
Things to try right now (no code changes)
- Force happy-eyeballs on (if it isn’t actually being applied)
Even if DNS returns IPv4 first,autoSelectFamily=trueshould quickly race IPv6.
Set it explicitly + via env to remove ambiguity:
{
channels: {
telegram: {
network: { autoSelectFamily: true, dnsResultOrder: "verbatim" },
},
},
}
Env (temporary):
OPENCLAW_TELEGRAM_ENABLE_AUTO_SELECT_FAMILY=1OPENCLAW_TELEGRAM_DNS_RESULT_ORDER=verbatim
If it still hangs on IPv4 only, that’s a strong hint the underlying Telegram HTTP path isn’t getting autoSelectFamily applied the way we expect.
- Use a proxy (boring but works)
If you can reach anything over IPv6, run a SOCKS/HTTP proxy on a VPS (or anywhere not blocking TG IPv4) and set:
channels.telegram.proxy: "socks5://user:pass@host:1080"
Docs mention this as the standard escape hatch.