Skip to content

OpenCode Web cannot be accessed via network IP address instead of localhost #15273

Description

@mifhud

Description

I’m experiencing an issue where OpenCode Web cannot be accessed using the server’s IP address. I'm running with command: opencode web using config opencode.json

  "server": {
    "port": 4000,
    "hostname": "0.0.0.0",
    "mdns": true
   }

Issue:
When accessing OpenCode Web using my network ip:

My network ip:
Wireless LAN adapter Wi-Fi:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::3fca:d1be:84c4:53e5%18
IPv4 Address. . . . . . . . . . . : 192.168.100.192
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::1%18
192.168.100.1

http://192.168.1.100:4000/ or http://192.168.100.192:4000/

The page does not load (browser shows timeout / This site can’t be reached)

However, accessing via localhost works correctly.

Plugins

No response

OpenCode version

1.2.15

Steps to reproduce

Start OpenCode Web server using config opencode.json

  "server": {
    "port": 4000,
    "hostname": "0.0.0.0",
    "mdns": true
   }

Ensure it is running and accessible locally.

Try accessing via http://:4000.

The connection fails.

Expected Behavior:
OpenCode Web should be accessible via the server’s IP address when properly exposed.

Actual Behavior:
Cannot access via IP address.

Thanks

Screenshot and/or share link

No response

Operating System

WSL Ubuntu-22.04

Terminal

Windows Terminal and wezterm

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions