



























@@ -152,6 +152,85 @@ To capture logs:
152152153153The log includes browser state transitions and result‑set changes.
154154155+## When to disable Bonjour
156+157+Disable Bonjour only when LAN multicast advertising is unavailable or harmful.
158+The common case is a Gateway running behind Docker bridge networking, WSL, or a
159+network policy that drops mDNS multicast. In those environments the Gateway is
160+still reachable through its published URL, SSH, Tailnet, or wide-area DNS-SD,
161+but LAN auto-discovery is not reliable.
162+163+Prefer the existing environment override when the problem is deployment-scoped:
164+165+```bash
166+OPENCLAW_DISABLE_BONJOUR=1
167+```
168+169+That disables LAN multicast advertising without changing plugin configuration.
170+It is safe for Docker images, service files, launch scripts, and one-off
171+debugging because the setting disappears when the environment does.
172+173+Use plugin configuration only when you intentionally want to turn off the
174+bundled LAN discovery plugin for that OpenClaw config:
175+176+```bash
177+openclaw plugins disable bonjour
178+```
179+180+## Docker gotchas
181+182+Bundled Docker Compose sets `OPENCLAW_DISABLE_BONJOUR=1` for the Gateway service
183+by default. Docker bridge networks usually do not forward mDNS multicast
184+(`224.0.0.251:5353`) between the container and the LAN, so leaving Bonjour on can
185+produce repeated ciao `probing` or `announcing` failures without making discovery
186+work.
187+188+Important gotchas:
189+190+- Disabling Bonjour does not stop the Gateway. It only stops LAN multicast
191+ advertising.
192+- Disabling Bonjour does not change `gateway.bind`; Docker still defaults to
193+`OPENCLAW_GATEWAY_BIND=lan` so the published host port can work.
194+- Disabling Bonjour does not disable wide-area DNS-SD. Use wide-area discovery
195+ or Tailnet when the Gateway and node are not on the same LAN.
196+- Reusing the same `OPENCLAW_CONFIG_DIR` outside Docker does not inherit the
197+ Compose default unless the environment still sets `OPENCLAW_DISABLE_BONJOUR`.
198+- Set `OPENCLAW_DISABLE_BONJOUR=0` only for host networking, macvlan, or another
199+ network where mDNS multicast is known to pass.
200+201+## Troubleshooting disabled Bonjour
202+203+If a node no longer auto-discovers the Gateway after Docker setup:
204+205+1. Confirm whether the Gateway is intentionally suppressing LAN advertising:
206+207+```bash
208+ docker compose config | grep OPENCLAW_DISABLE_BONJOUR
209+```
210+211+2. Confirm the Gateway itself is reachable through the published port:
212+213+```bash
214+ curl -fsS http://127.0.0.1:18789/healthz
215+```
216+217+3. Use a direct target when Bonjour is disabled:
218+- Control UI or local tools: `http://127.0.0.1:18789`
219+- LAN clients: `http://<gateway-host>:18789`
220+- Cross-network clients: Tailnet MagicDNS, Tailnet IP, SSH tunnel, or
221+ wide-area DNS-SD
222+223+4. If you deliberately enabled Bonjour in Docker with
224+`OPENCLAW_DISABLE_BONJOUR=0`, test multicast from the host:
225+226+```bash
227+ dns-sd -B _openclaw-gw._tcp local.
228+```
229+230+ If browsing is empty or the Gateway logs show repeated ciao watchdog
231+ cancellations, restore `OPENCLAW_DISABLE_BONJOUR=1` and use a direct or
232+ Tailnet route.
233+155234## Common failure modes
156235157236- **Bonjour doesn’t cross networks**: use Tailnet or SSH.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。