openclaw - 💡(How to fix) Fix Bonjour mDNS probe causes supervisor double-boot on macOS (+30s startup) [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73804Fetched 2026-04-29 06:14:55
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
1
Author
Participants
Timeline (top)
commented ×2subscribed ×1

Error Message

Setting OPENCLAW_DISABLE_BONJOUR=1 in ~/.openclaw/.env eliminates the double-boot. The gateway's own error log output recommends this env var, so the escape hatch exists — but the default behavior is broken on macOS.

Root Cause

  • #33609 — Bonjour/mDNS name-conflict loop (VM environments, different root cause)
  • #28174 — Feature request to disable mDNS/Bonjour

Fix Action

Workaround

Setting OPENCLAW_DISABLE_BONJOUR=1 in ~/.openclaw/.env eliminates the double-boot. The gateway's own error log output recommends this env var, so the escape hatch exists — but the default behavior is broken on macOS.

For setups behind a reverse proxy (Caddy, nginx), mDNS discovery is unnecessary, making Bonjour pure overhead.

RAW_BUFFERClick to expand / collapse

Bug Description

On macOS (Mac Mini M4 Pro, macOS 15.x), the bundled Bonjour/mDNS plugin triggers a probe/announce loop that causes the gateway supervisor to restart the process a second time, adding ~30 seconds to every gateway startup.

Steps to Reproduce

  1. Run OpenClaw gateway via launchd (or any process supervisor) on macOS
  2. Restart the gateway (launchctl kickstart -k)
  3. Observe gateway logs — two separate "http server listening" events appear per restart, 22-31 seconds apart
  4. The supervisor sees the first boot's mDNS failure as a crash and restarts the entire process

Expected Behavior

Gateway starts once, logs one "http server listening" event, ready in <10 seconds.

Actual Behavior

Gateway starts, Bonjour mDNS probe/announce fails, supervisor restarts the process. Two "http server listening" events logged. Total startup time inflated from ~6s to ~37s. This repeats for approximately three cycles before Bonjour gives up.

Workaround

Setting OPENCLAW_DISABLE_BONJOUR=1 in ~/.openclaw/.env eliminates the double-boot. The gateway's own error log output recommends this env var, so the escape hatch exists — but the default behavior is broken on macOS.

For setups behind a reverse proxy (Caddy, nginx), mDNS discovery is unnecessary, making Bonjour pure overhead.

Environment

  • OpenClaw v2026.4.26
  • macOS Sequoia 15.x, Mac Mini M4 Pro
  • Gateway managed via launchd LaunchAgent
  • Caddy reverse proxy in front of gateway

Related Issues

  • #33609 — Bonjour/mDNS name-conflict loop (VM environments, different root cause)
  • #28174 — Feature request to disable mDNS/Bonjour

Suggestion

Consider defaulting Bonjour to disabled when a reverse proxy or gateway.bind config is detected, or at minimum on macOS where the supervisor interaction is problematic.

extent analysis

TL;DR

Setting the environment variable OPENCLAW_DISABLE_BONJOUR=1 can prevent the Bonjour/mDNS plugin from causing a probe/announce loop and subsequent gateway restarts on macOS.

Guidance

  • To immediately mitigate the issue, set OPENCLAW_DISABLE_BONJOUR=1 in ~/.openclaw/.env as suggested by the gateway's error log output.
  • Verify the fix by restarting the gateway and checking for only one "http server listening" event in the logs.
  • Consider configuring your setup to detect when a reverse proxy or specific gateway.bind config is in use and automatically disable Bonjour in such cases to prevent similar issues.
  • Review related issues #33609 and #28174 for more context on Bonjour/mDNS problems and the request to disable it by default in certain scenarios.

Example

No specific code snippet is necessary for this fix, as it involves setting an environment variable.

Notes

This solution directly addresses the described issue on macOS with OpenClaw v2026.4.26 but may not apply to other versions or environments. The suggested workaround is based on the information provided in the issue and the existing environment variable escape hatch.

Recommendation

Apply the workaround by setting OPENCLAW_DISABLE_BONJOUR=1, as it directly addresses the problem without requiring version upgrades or code changes, and it is explicitly recommended by the gateway's own error log output.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Bonjour mDNS probe causes supervisor double-boot on macOS (+30s startup) [2 comments, 2 participants]