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.
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.jsonon the host) - Target port actually listening
How to use it
- Open the port.
- Expose (tunnel) (Desktop Create Tunnel). Choose HTTP / HTTPS / TCP when asked.
- Copy the public URL from the tunnel panel.
- 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
| Symptom | Recovery |
|---|---|
| Tunnel will not create | Confirm Pro/Cloud; ngrok API reachable; Cloudflare is not a provider |
| Target port unavailable | Start the process; portpilot port <n> |
| Provider authentication | Fix ngrok authtoken / agent API on the host, not in PortPilot Cloud settings |
| Disconnected | Machine offline or ngrok session dropped — Restart tunnel when back online |
| Public URL unavailable | Stop and expose again; check ngrok dashboard |
| Port changed | Expose the new listening port; old tunnel will not follow the bind |
| Machine offline | Tunnels are not queued |