Expose local services through self-hosted or public relays.No port forwarding. No inbound firewall rules. No manual DNS setup. No accounts.
> /plugin marketplace add gosuda/portal-tunnel> /plugin install portal-deploy@portal-tunnel
Portal is an open-source tunnel runtime and relay network for publishing services to the agentic web. It exposes local apps, APIs, tools, and agents through self-hosted or public relays, keeps routing and security policy in the local tunnel process, and eliminates the need for hosted vendor accounts or credit cards.
--ban-mitm blocks a relay for that exposure when exporter values differ.identity.json) with SIWE challenge signing.📖 Explore the Complete Product Capabilities: For the complete matrix of all 20+ supported capabilities across CLI, Agent, SDK, and Relay—including interface support and trust boundaries—see the Canonical Feature Inventory.
| Portal | ngrok | Cloudflare Tunnel | frp | |
|---|---|---|---|---|
| Public localhost URL | Yes | Yes | Yes | Yes |
| Self-hostable | Yes | Enterprise only | No | Yes |
| Open source | MIT | No | Client only | Apache 2.0 |
| Custom domain | Yes | Paid plans | Yes | Yes |
| End-to-end tenant TLS | Yes (uncached exposures) | No | No | No |
| MITM self-probe | Yes (TLS keying material export) | No | No | No |
| Multi-relay failover | Yes | Managed | Built-in | No |
| Account required | No | Yes | Yes | No |
| Native x402 payments | Yes | No | No | No |
macOS / Linux:
curl -fsSL https://github.com/gosuda/portal-tunnel/releases/latest/download/install.sh | bash
portal expose 3000
Windows (PowerShell):
$ProgressPreference = 'SilentlyContinue'
irm https://github.com/gosuda/portal-tunnel/releases/latest/download/install.ps1 | iex
portal expose 3000
Portal prints an HTTPS URL immediately. Additional common usages:
# Custom name and explicit relay
portal expose 3000 --name myapp --relays https://portal.example.com --discovery=false
# Mount multiple local services behind one domain
portal expose --name myapp \
--http-route /api=http://127.0.0.1:3001 \
--http-route /=http://127.0.0.1:5173
# Dedicated raw TCP port (Minecraft, SSH, databases)
portal expose localhost:25565 --name minecraft --tcp
# Prefer an IVNP overlay backhaul path
portal expose 3000 --overlay
The repository includes a portal-deploy plugin with shared skills (portal-expose and portal-connect) for Codex, Claude Code, and Cursor:
# GitHub CLI
gh skill install gosuda/portal-tunnel portal-deploy/portal-expose
# skills CLI
npx skills add gosuda/portal-tunnel --skill portal-expose
Ask your agent: "Expose my app on port 3000 with Portal and verify the public URL." See plugins/portal-deploy/README.md for full setup instructions.
When tunnels should run continuously in the background or as a system service:
portal agent run --config config.toml
portal agent dashboard --config config.toml
See the Portal Agent Guide for configuration syntax and OS service installation.
Deploy an open-source relay in seconds:
git clone https://github.com/gosuda/portal-tunnel
cd portal-tunnel && cp .env.example .env
docker compose up
See Deployment for DNS automation (ACME), TCP/UDP port ranges, and production policy configuration.
The ordinary uncached forwarding path works as follows:
Browser
-> Relay SNI router (reads ClientHello/SNI, forwards tenant ciphertext)
-> Reverse session
-> Portal tunnel (completes TLS handshake locally, derives session keys)
-> Local service
/v1/sign. The relay never receives session keys.Portal minimizes relay trust; it does not yet eliminate it. A malicious relay with the certificate private key can still impersonate an endpoint, and the self-probe checks only sampled connections. See the Security Model for guarantees and exceptions, or Keyless TLS Explained for the design rationale.
Portal includes the official public relay registry by default:
https://raw.githubusercontent.com/gosuda/portal-tunnel/main/registry.json
If you operate a public Portal relay, open a pull request to add your relay URL to registry.json.
See CONTRIBUTING.md.
MIT License - see LICENSE.
portal-tunnel is a Claude Code plugin with 3 hand-picked skills, indexed on Flowy in the Cloud & Infrastructure category. Install it with the command on its page. It includes portal-connect, portal-expose, portal-relay. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it