[FEATURE]: Adding Authentication to opencode server api #3410

Open
opened 2026-02-16 17:39:59 -05:00 by yindo · 5 comments
Owner

Originally created by @OpeOginni on GitHub (Dec 8, 2025).

Feature hasn't been suggested before.

  • 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.

Originally created by @OpeOginni on GitHub (Dec 8, 2025). ### 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.
yindo added the discussion label 2026-02-16 17:39:59 -05:00
Author
Owner

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

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] commented on GitHub (Dec 8, 2025): 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 <server> - 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.
Author
Owner

@rekram1-node commented on GitHub (Dec 8, 2025):

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

@rekram1-node commented on GitHub (Dec 8, 2025): I think someone made basic auth, their first pr caused issues but I think their new one should work
Author
Owner

@OpeOginni commented on GitHub (Dec 10, 2025):

Cool cool, thank you

@OpeOginni commented on GitHub (Dec 10, 2025): Cool cool, thank you
Author
Owner

@mynameistito commented on GitHub (Jan 13, 2026):

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

was this a plugin, or PR?

@mynameistito commented on GitHub (Jan 13, 2026): > I think someone made basic auth, their first pr caused issues but I think their new one should work was this a plugin, or PR?
Author
Owner

@ajoslin commented on GitHub (Jan 14, 2026):

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

was this a plugin, or PR?

Simple SDK PR, I've linked it to this issue now. #4740

@ajoslin commented on GitHub (Jan 14, 2026): > > I think someone made basic auth, their first pr caused issues but I think their new one should work > > was this a plugin, or PR? Simple SDK PR, I've linked it to this issue now. #4740
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3410