HTTP Tunnels
HTTP is the default mode for Port Buddy. It is used for web applications and APIs.
Usage
portbuddy 3000
This command exposes your local web server running on port 3000 and prints the public URL it was given, such as https://otter-4821.portbuddy.dev. Because HTTP is the default, the mode can be left out; pass one explicitly when you need raw TCP or UDP instead.
The tunnel stays open until you stop the CLI. Traffic reaches your machine over HTTPS even though your local server speaks plain HTTP — the certificate is ours and is terminated at the edge.
Choosing what to expose
A bare port means localhost on that port. You can also name a different host on your network, or point at a local server that already speaks TLS.
portbuddy 3000 # localhost:3000 portbuddy 192.168.1.10:8080 # another machine on your LAN portbuddy https://localhost:8443 # local server with its own certificate
Picking the subdomain
Every account has one or more subdomains, managed on the Domains page. Ask for a specific one with --domain, giving either the label or the full hostname:
portbuddy --domain=my-app 8080 portbuddy --domain=my-app.portbuddy.dev 8080
The subdomain has to already belong to your account — this requests one, it does not claim a new one — and it must not be in use by another running tunnel.
Leave the option out and Port Buddy picks for you. If you have used a subdomain for this same local host and port before, you get that one back, so restarting a tunnel usually keeps the URL your colleagues already have. If several subdomains are free and none of them matches, the CLI stops and lists the candidates rather than guessing.
What the tunnel carries
- WebSocket connections upgrade through the same tunnel, so live-reload, chat and realtime apps work unchanged.
- Requests are capped at 10 MB, which is worth knowing before you test a large file upload.
- Each request is printed in your terminal as it arrives. Pass
-nto turn that log off. - The CLI heartbeats while connected; if the process dies, the tunnel is closed for you within seconds rather than lingering.
Going further
- Swap the generated subdomain for a domain you own — see custom domains.
- Keep the URL to yourself by putting a passcode in front of it — see private tunnels.
- Keep a tunnel up after you close the terminal by installing it as a background service.