Tunnels

Expose a local port through the ngrok API. Pro or Cloud required. Cloudflare is not supported.

PortPilot can Expose (tunnel), Stop tunnel, and Restart tunnel through the ngrok API. This requires the Tunnels entitlement (Pro or Cloud).

It does not spawn the ngrok CLI, and it does not support Cloudflare Tunnel. The UI says unavailable for unsupported providers.

ngrok tunnel
ngrok tunnel

When to use it

Share a local or lab service over HTTPS/HTTP/TCP without opening the host firewall to the world. Prefer this over a blanket Allow TCP inbound when you only need a temporary public URL.

Prerequisites

  • Pro or Cloud
  • ngrok configured so the agent can call its local API (127.0.0.1:4040) and/or cloud API (PORTPILOT_NGROK_AUTHTOKEN / tunnels.json on the host)
  • Target port actually listening

How to use it

  1. Open the port.
  2. Expose (tunnel) (Desktop Create Tunnel). Choose HTTP / HTTPS / TCP when asked.
  3. Copy the public URL from the tunnel panel.
  4. Stop tunnel when finished. Restart tunnel recycles the same entitlement path.

CLI: portpilot tunnels, portpilot expose <port> [--protocol], portpilot tunnel stop. There is no CLI restart subcommand — use the UI.

Expected result

A public URL appears while the machine is online and ngrok accepts the session.

Tunnel troubleshooting

SymptomRecovery
Tunnel will not createConfirm Pro/Cloud; ngrok API reachable; Cloudflare is not a provider
Target port unavailableStart the process; portpilot port <n>
Provider authenticationFix ngrok authtoken / agent API on the host, not in PortPilot Cloud settings
DisconnectedMachine offline or ngrok session dropped — Restart tunnel when back online
Public URL unavailableStop and expose again; check ngrok dashboard
Port changedExpose the new listening port; old tunnel will not follow the bind
Machine offlineTunnels are not queued

Download PortPilot · FAQ · Support