opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: Adding Authentication to `opencode server` api

Open OpeOginni opened this issue 1 month ago • 2 comments

Feature hasn't been suggested before.

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

If someone has an opencode server on a remote instance with a public URL, they should be able to simply add some sort of auth to it.

Maybe for serving opencode server --port 7800 --passkey super-shush-password

Then when attaching its added opencode run --attach https://opencode.com --passkey super-shush-password

Thinking of this as I plan to integrate just the server part of opencode as a service, but needs to make sure only the creator of an instance should have access.

I could work on this feature, but needs to be approved as needed.

OpeOginni avatar Dec 08 '25 19:12 OpeOginni

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

  • #988: Feature request: add MCP remote using oauth - Similar request for adding OAuth authentication to remote connections
  • #878: Feature Request: Connect TUI to Existing opencode serve Instance - Addresses connecting to headless servers which would benefit from authentication
  • #3165: Add --session flag to attach command to continue session via already running headless server - Related to remote server instance access
  • #3188: opencode run --attach - Proposes attaching to a headless server, directly related to remote instance use case
  • #4028: Inquiry: Programmatic access or Node.js SDK for OpenCode - Related to API/SDK access to running OpenCode instances

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

github-actions[bot] avatar Dec 08 '25 19:12 github-actions[bot]

I think someone made basic auth, their first pr caused issues but I think their new one should work

rekram1-node avatar Dec 08 '25 20:12 rekram1-node

Cool cool, thank you

OpeOginni avatar Dec 10 '25 11:12 OpeOginni