PublicHost Documentation
PublicHost turns your local development server into a public HTTPS URL with a single SSH command. No account, no installation, no configuration — just an SSH client that you already have.
1. Install the CLI
One command, no accounts. See Installation below for Linux, macOS, and Windows.
bashcurl -fsSL https://publichost.run/install.sh | sh
2. Start something on localhost
For a quick test run a local HTTP server on port
3000:bash# Python python3 -m http.server 3000 # Node npx serve -p 3000
3. Open a tunnel
Replace
3000with the port your application is running on:bashpublichost run 3000
Prefer raw SSH, or don't want to install anything? The CLI is a thin wrapper around the same connection:
bashssh -p 2200 -R 0:localhost:3000 publichost.run
4. Use the URL from the banner
Once connected, PublicHost prints a banner similar to:
bash============================================================ Your tunnel is ready: https://swift-fox-123.publichost.run Live logs: https://publichost.run/channel/weblogs?token=abc123 ============================================================
Open
https://swift-fox-123.publichost.runin a browser or share it with a teammate.5. Close the tunnel
Press Ctrl+C or close the terminal. The subdomain is released automatically and will never be used again.
Installation
Requires Python 3.9+ and an ssh client, both already on most systems. The installer is idempotent — running it again upgrades the CLI in place.
Linux / macOS
curl -fsSL https://publichost.run/install.sh | sh
Windows (PowerShell)
irm https://publichost.run/install.ps1 | iex
Windows 10/11 ships an OpenSSH client that can be enabled from Settings → Optional Features if ssh isn't already on your PATH.
Run it
Once installed, open a tunnel to any local port — same command on every OS:
publichost run 3000 publichost run 8080 --subdomain my-app
CLI Usage
Basic tunnel
ssh -p <ssh_port> -R 0:localhost:<local_port> publichost.run
<ssh_port>— the SSH port of the PublicHost server (commonly22or2200).<local_port>— the port your local service is listening on.publichost.run— the SSH domain of the server.
Example
ssh -p 2200 -R 0:localhost:8080 publichost.run
No authentication required
PublicHost does not ask for a password or a key. The connection is accepted immediately and a random subdomain is assigned to you.
One-time subdomain
Every SSH connection receives a fresh, randomly generated subdomain such as swift-fox-123.publichost.run. The subdomain lives only as long as the SSH connection. When you disconnect, it is released and never reassigned.
Tunnel lifetime
By default a tunnel is kept open for up to 2 hours. If you need more time, extend it from the interactive banner session:
extend 60
This adds 60 minutes to the current tunnel lifetime. You can extend multiple times while the connection is active.
Multiple local services
You can request several remote forwards in a single SSH connection:
ssh -p 2200 \ -R 0:localhost:3000 \ -R 0:localhost:8080 \ publichost.run
Each forward gets its own subdomain.
Running in the background
Use -N to open the tunnel without starting an interactive shell:
ssh -p 2200 -N -R 0:localhost:3000 publichost.run
Add -o ServerAliveInterval=60 to keep the connection alive through NATs and firewalls:
ssh -p 2200 -N -o ServerAliveInterval=60 -R 0:localhost:3000 publichost.run
Persistent tunnels with autossh
For long-running tunnels install autossh and run:
autossh -M 0 -p 2200 -N -o ServerAliveInterval=60 -R 0:localhost:3000 publichost.run
Live Logs
PublicHost records every HTTP request that travels through your tunnel and streams it to a WebLogs page in real time.
Opening Live Logs
The tunnel banner contains a link like:
https://publichost.run/channel/weblogs?token=abc123
Open that URL while the tunnel is active to see requests as they happen.
What is shown
Each row in the live log contains:
- Timestamp — when the request was received.
- Method — HTTP method (
GET,POST,PUT,DELETE, etc.). - Path — the request path and query string.
- Status — the HTTP status code returned by your local service.
- Duration — how long the request took.
- Client IP — the original remote address.
Scope
Live logs belong to a single tunnel session. When the SSH connection closes, the log stream stops and the token becomes invalid. A new tunnel gets a new token.
Downloading logs
Completed tunnel sessions are archived as CSV files on the server. If you need historical logs, contact the server administrator or use the backend API.
Troubleshooting
Connection refused on the SSH port
- Check that you are using the correct SSH port.
- Verify the server firewall allows inbound connections on that port.
502 Bad Gateway for the tunnel URL
- Make sure your local service is still running on the port you forwarded.
- Make sure the SSH connection is still active.
Subdomain does not resolve
- DNS can take a few minutes to propagate.
- Confirm that
*.publichost.runresolves to the PublicHost server IP.
Security Notes
- Subdomains are single-use and expire with the connection.
- No shell, exec, SFTP, or other SSH features are exposed — the session is banner-only.
- Do not share your live-logs token publicly; it grants read access to request metadata for that tunnel.