Remote Development: Execute Code on Remote Server, but Route Model API Calls & Authentication via Local Machine #6414

Open
opened 2026-02-16 18:04:09 -05:00 by yindo · 1 comment
Owner

Originally created by @xiaojueshi on GitHub (Jan 15, 2026).

Originally assigned to: @thdxr on GitHub.

Question

I'm developing in a hybrid environment where:

  1. Project code resides/runs on a remote server (for computational requirements or data constraints).
  2. The server is in a restricted internal network with no outbound access to model APIs (e.g., OpenAI, Anthropic) or authentication endpoints.
  3. I need OpenCode (installed locally on my Mac) to:
    • Connect to the remote server for code editing/synchronization.
    • Execute scripts on the remote server's environment (leveraging its resources).
    • But route all model API calls and authentication exclusively through my local Mac (which has internet access and stores credentials securely).

I previously tried directory mounting, but it broke script execution paths and dependencies.

Does OpenCode support this workflow natively?

Originally created by @xiaojueshi on GitHub (Jan 15, 2026). Originally assigned to: @thdxr on GitHub. ### Question I'm developing in a hybrid environment where: 1. **Project code resides/runs on a remote server** (for computational requirements or data constraints). 2. **The server is in a restricted internal network** with no outbound access to model APIs (e.g., OpenAI, Anthropic) or authentication endpoints. 3. **I need OpenCode (installed locally on my Mac) to:** - Connect to the remote server for code editing/synchronization. - **Execute scripts on the remote server's environment** (leveraging its resources). - **But route all model API calls and authentication exclusively through my local Mac** (which has internet access and stores credentials securely). I previously tried directory mounting, but it broke script execution paths and dependencies. **Does OpenCode support this workflow natively?**
Author
Owner

@github-actions[bot] commented on GitHub (Jan 15, 2026):

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

  • #7790: [FEATURE]: SSH-based remote server connections to OpenCode Desktop (comprehensive SSH transport proposal with daemon management)
  • #6461: [FEATURE]: Named Remote Connections with Session Origin Tracking (multi-environment development with transport URIs and daemon lifecycle)
  • #5608: [FEATURE]: OpenCode-Desktop Remote Workspace (remote development workflow similar to VS Code)
  • #8274: /connect doesn't work for openai when server is remote (authentication on remote servers)
  • #5380: TUI referencing local directory when using attach --dir to connect to a remote server (remote path handling)

These issues cover similar scenarios of running code/tasks on remote servers while maintaining local access to authentication and APIs. Your use case of hybrid execution (remote code execution + local API calls through a restricted network) might be addressed by features proposed in these tickets.

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

@github-actions[bot] commented on GitHub (Jan 15, 2026): This issue might be a duplicate of existing issues. Please check: - #7790: [FEATURE]: SSH-based remote server connections to OpenCode Desktop (comprehensive SSH transport proposal with daemon management) - #6461: [FEATURE]: Named Remote Connections with Session Origin Tracking (multi-environment development with transport URIs and daemon lifecycle) - #5608: [FEATURE]: OpenCode-Desktop Remote Workspace (remote development workflow similar to VS Code) - #8274: /connect doesn't work for openai when server is remote (authentication on remote servers) - #5380: TUI referencing local directory when using attach --dir to connect to a remote server (remote path handling) These issues cover similar scenarios of running code/tasks on remote servers while maintaining local access to authentication and APIs. Your use case of hybrid execution (remote code execution + local API calls through a restricted network) might be addressed by features proposed in these tickets. 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#6414