Skip to content

[FEATURE]:Document Portal as an optional HTTPS tunnel for OpenCode Web #53922

Description

@gosunuts

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

Summary

I'd like to propose adding Portal as an optional remote-access method for opencode web.

Portal is an MIT-licensed, self-hostable reverse tunnel that provides public HTTPS access to localhost without requiring an account, personal domain, or inbound port forwarding.

Motivation

OpenCode already provides a browser interface with configurable ports and HTTP Basic authentication.

Portal could make it easier to access a local OpenCode instance from a phone or another computer while keeping the server bound to 127.0.0.1.

Proposed integration

Phase 1 — Documentation only

Document a minimal setup:

export OPENCODE_SERVER_PASSWORD="$(openssl rand -hex 32)"
opencode web --port 4096

In another terminal:

portal expose 4096

Portal provides a public HTTPS URL, while OpenCode retains responsibility for authentication.

Before publishing, the example should be verified for Basic Auth, API requests, event streaming, browser Origin/CORS behavior, and secure-context functionality.

Phase 2 — Optional native integration

If there is interest, consider exposing the Portal URL or QR code in OpenCode's web interface.

This would remain entirely optional, without introducing a mandatory runtime dependency.

Previous integration

A similar documentation-first integration was recently merged into herdr-web-ui #229.

I'm maintaining Portal and would be happy to prepare and validate a documentation PR if this sounds useful.

The existing authentication model and remote-access options would remain unchanged.

Activity

  1. opencode-agent commented on Oct 8, 2026

    @opencode-agent
    Contributor

    Thanks for the proposal! You're suggesting the docs show how to put opencode web behind Portal, so a local instance can be reached over HTTPS from a phone or another computer while OpenCode keeps handling authentication through OPENCODE_SERVER_PASSWORD. You'd also like to explore showing the tunnel URL or a QR code in the web UI later.

    Maintainers will consider whether and how to document this, for example as a general section on remote access through a reverse tunnel. I'd suggest waiting for their feedback before opening a PR.

    Related issues:

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions