Skip to content

Serve on custom port / remote server broken #6063

Closed

Description

@gempir

Description

I've tried this on 3 different computers now. The frontend doesn't work for me anymore. I don't understand how this broke, because I used to have it working. But even reverting to older versions doesn't work.

The frontend seems to be "hardcoded" to send requests to
http://localhost:4096/global/health
http://localhost:4096/global/event

Which fail when the serve is either remote or a custom port is used.

OpenCode version

1.0.193

Steps to reproduce

  1. opencode serve -p 8075
  2. open http://127.0.0.1:8075

Screenshot and/or share link

Image

Operating System

macOS 26.2

Terminal

Alacritty

Activity

  1. github-actions commented on Dec 23, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Both issues describe the same root cause where the frontend hardcodes requests to localhost:4096 instead of using the actual server address. Feel free to ignore if your specific case differs.

  2. gempir commented on Dec 23, 2025

    @gempir
    Author

    My bad this seems to be #5928

  3. gempir commented on Dec 23, 2025

    @gempir
    Author

    I'll reopen this because this issue isn't fixed on the latest version 1.0.196 and the other issue is closed.
    I think the fix PR got reverted

  4. reopened this on Dec 23, 2025
  5. added a commit that references this issue on Dec 25, 2025
    8ca9a6c
  6. gempir commented on Dec 27, 2025

    @gempir
    Author

    Still broken on, even after #6181

    easy reproducer on current version:

    bunx opencode-ai@1.0.204 serve --port 3123

  7. mosajjal commented on Dec 27, 2025

    @mosajjal

    can confirm this is broken for me too

  8. Kiricon commented on Dec 28, 2025

    @Kiricon

    Still broken for me as well.

  9. gempir commented on Dec 29, 2025

    @gempir
    Author

    I cannot reproduce it anymore. It works for me now. Even on bunx opencode-ai@1.0.204 serve --port 3123 this.

    I don't really get how the behaviour is changing without the version changing. Is there some part of the code that's not part of the versioned npm package?

  10. mosajjal commented on Dec 30, 2025

    @mosajjal

    in 1.0.209 it seems to be fixed?

  11. gempir commented on Dec 30, 2025

    @gempir
    Author

    It works just fine in 1.0.204 too, I think this isn't version related. There has to be some external factor.

    6352 Talks about some proxy, maybe it's related, not sure.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions