allow overriding web client deployment path / bundle web client with opencode binary. #3960

Open
opened 2026-02-16 17:42:05 -05:00 by yindo · 1 comment
Owner

Originally created by @paperclover on GitHub (Dec 29, 2025).

Originally assigned to: @thdxr on GitHub.

Question

https://github.com/sst/opencode/blob/1658a3ff59b9ebacb95221fab69b4d3cecca08fd/packages/opencode/src/server/server.ts#L2629

this is both a stability and privacy concern.

  • i've had situations where my docker deployment of an opencode server fails to hit this proxy url sometimes. also, if this hosted deployment gets an update that isn't compatible with the current server, it will break.
  • c.req.path includes the project's path, leaking it to the external server. this isn't a big deal for me since i work on projects that are publicly accessible

i found this because i was trying to add a patch to the web interface, with the first question being "how do i run it in dev mode". for contributing, it would be very useful if this url could be overridden to always refer to the local bundle copy.

can that be done? i'd be fine opening a pr to sort that out (additionally making sure that dev mode works; it appears to not work when replacing the URL)

Originally created by @paperclover on GitHub (Dec 29, 2025). Originally assigned to: @thdxr on GitHub. ### Question https://github.com/sst/opencode/blob/1658a3ff59b9ebacb95221fab69b4d3cecca08fd/packages/opencode/src/server/server.ts#L2629 this is both a stability and privacy concern. - i've had situations where my docker deployment of an opencode server fails to hit this proxy url sometimes. also, if this hosted deployment gets an update that isn't compatible with the current server, it will break. - `c.req.path` includes the project's path, leaking it to the external server. this isn't a big deal for me since i work on projects that are publicly accessible i found this because i was trying to add a patch to the web interface, with the first question being "how do i run it in dev mode". for contributing, it would be very useful if this url could be overridden to always refer to the local bundle copy. can that be done? i'd be fine opening a pr to sort that out (additionally making sure that dev mode works; it appears to not work when replacing the URL)
Author
Owner

@github-actions[bot] commented on GitHub (Dec 29, 2025):

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

  • #6311: [FEATURE]: Allow for Custom Server URL on hosted web - Discusses allowing custom server URLs when OpenCode is served on different paths
  • #6063: Serve on custom port / remote server broken - Reports issues with the web frontend being hardcoded to localhost:4096 and not working with custom ports/remote servers

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

@github-actions[bot] commented on GitHub (Dec 29, 2025): This issue might be a duplicate of existing issues. Please check: - #6311: [FEATURE]: Allow for Custom Server URL on hosted web - Discusses allowing custom server URLs when OpenCode is served on different paths - #6063: Serve on custom port / remote server broken - Reports issues with the web frontend being hardcoded to localhost:4096 and not working with custom ports/remote servers 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#3960