openclaw - 💡(How to fix) Fix [Feature]: Add configurable bonjour/mDNS hostname to avoid name collisions in shared office networks [1 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#54910Fetched 2026-04-08 01:34:37
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Add a config option to set a custom mDNS/bonjour hostname per OpenClaw instance.

Root Cause

Add a config option to set a custom mDNS/bonjour hostname per OpenClaw instance.

Code Example

[bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=HIH-D-25527 (OpenClaw) (16)._openclaw-gw._tcp.local. state=probing)
[bonjour] restarting advertiser (service stuck in probing for 10003ms ...)

---

gateway:
  bonjour:
    hostname: "my-unique-name"  # defaults to machine hostname if unset
RAW_BUFFERClick to expand / collapse

Summary

Add a config option to set a custom mDNS/bonjour hostname per OpenClaw instance.

Problem to solve

In office environments where multiple OpenClaw instances run on the same LAN, all instances broadcast the same mDNS name (openclaw.local), causing continuous name collision conflicts.

The Bonjour watchdog keeps appending incrementing suffixes and logs spam every few seconds:

[bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=HIH-D-25527 (OpenClaw) (16)._openclaw-gw._tcp.local. state=probing)
[bonjour] restarting advertiser (service stuck in probing for 10003ms ...)

This cannot be suppressed through any existing config option.

Proposed solution

Add a config option such as:

gateway:
  bonjour:
    hostname: "my-unique-name"  # defaults to machine hostname if unset

This would allow each instance to advertise a unique mDNS name and avoid collisions entirely.

Alternatives considered

No response

Impact

  • Affected: Any office/team environment with multiple OpenClaw instances on the same LAN
  • Severity: Annoying — constant log spam, though core functionality still works
  • Frequency: Always, as long as multiple instances are on the same subnet
  • Consequence: Console is flooded with bonjour warnings every few seconds, making it hard to spot real issues in logs

Evidence/examples

No response

Additional information

No response

extent analysis

Fix Plan

To resolve the mDNS hostname collision issue, we will implement a custom hostname configuration option for each OpenClaw instance.

Step-by-Step Solution:

  1. Add a new configuration option: Introduce a hostname field under the gateway.bonjour section in the configuration file.
  2. Update the Bonjour service: Modify the Bonjour service to use the custom hostname when advertising the instance.
  3. Default to machine hostname: If the hostname field is not set, default to the machine's hostname.

Example Code:

# config.yaml
gateway:
  bonjour:
    hostname: "my-unique-name"
# bonjour_service.py
import socket

def get_hostname(config):
    """Get the custom hostname from the config or default to the machine hostname"""
    return config.get('gateway', {}).get('bonjour', {}).get('hostname', socket.gethostname())

def advertise_service(hostname):
    """Advertise the Bonjour service with the given hostname"""
    # Implement the Bonjour service advertisement logic here
    pass

# Usage
config = {'gateway': {'bonjour': {'hostname': 'my-unique-name'}}}
hostname = get_hostname(config)
advertise_service(hostname)

Verification

To verify the fix, start multiple OpenClaw instances with unique hostnames on the same LAN and check the logs for any Bonjour-related warnings or errors.

Extra Tips

  • Ensure that the custom hostname is unique across all instances on the same LAN to avoid collisions.
  • Consider adding validation for the hostname field to prevent invalid input.
  • Review the Bonjour service implementation to ensure it correctly handles the custom hostname.

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 [Feature]: Add configurable bonjour/mDNS hostname to avoid name collisions in shared office networks [1 participants]