mDNS service not discoverable with correct hostname #6572

Closed
opened 2026-02-16 18:04:37 -05:00 by yindo · 1 comment
Owner

Originally created by @j0nl1 on GitHub (Jan 17, 2026).

Originally assigned to: @thdxr on GitHub.

Description

The mDNS service publication was missing an explicit host configuration, which caused the service to not be
properly discoverable with the opencode.local hostname on the local network.

Current Behavior

  • The mDNS service is published without a host field, so it uses the system's default hostname instead of
    opencode.local
  • The CLI displays opencode.local without the port number, which is misleading

Expected Behavior

  • The mDNS service should be discoverable at opencode.local
  • The CLI should display the full address including the port (e.g., opencode.local:3000)

Steps to Reproduce

  1. Start the web server with mDNS enabled
  2. Try to discover the service using dns-sd -B _http._tcp or a Bonjour browser
  3. Notice the service is not advertised with opencode.local as the hostname

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @j0nl1 on GitHub (Jan 17, 2026). Originally assigned to: @thdxr on GitHub. ### Description The mDNS service publication was missing an explicit host configuration, which caused the service to not be properly discoverable with the opencode.local hostname on the local network. Current Behavior - The mDNS service is published without a host field, so it uses the system's default hostname instead of opencode.local - The CLI displays opencode.local without the port number, which is misleading Expected Behavior - The mDNS service should be discoverable at opencode.local - The CLI should display the full address including the port (e.g., opencode.local:3000) Steps to Reproduce 1. Start the web server with mDNS enabled 2. Try to discover the service using dns-sd -B _http._tcp or a Bonjour browser 3. Notice the service is not advertised with opencode.local as the hostname ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 18:04:37 -05:00
yindo closed this issue 2026-02-16 18:04:37 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 17, 2026):

This issue might be related to existing issues about hostname configuration and mDNS service discovery. Please check:

  • #6422: mDNS fails to initialize: 'Object is not a constructor' error with bonjour-service (CLOSED - may provide context on mDNS issues)
  • #7971: fix(desktop): Custom server.hostname config ignored - always connects to 127.0.0.1 (OPEN - related hostname configuration issues)
  • #5844: Bug: Web terminal fails when accessing via network IP instead of localhost (OPEN - related network/hostname handling)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 17, 2026): This issue might be related to existing issues about hostname configuration and mDNS service discovery. Please check: - #6422: mDNS fails to initialize: 'Object is not a constructor' error with bonjour-service (CLOSED - may provide context on mDNS issues) - #7971: fix(desktop): Custom server.hostname config ignored - always connects to 127.0.0.1 (OPEN - related hostname configuration issues) - #5844: Bug: Web terminal fails when accessing via network IP instead of localhost (OPEN - related network/hostname handling) Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6572