Getting Started
From zero to a public URL in about a minute.
Installation
Install the CLI globally with npm. Requires Node.js 18 or later.
Install
npm install -g prevboxVerify the installation:
Verify
prevbox --versionAuthentication
The first time you start a tunnel, the CLI opens your browser for a one-click sign-in (create an account if you don't have one). Your session token is saved locally at ~/.previewbox/token with restricted permissions.
You can also sign in ahead of time from your browser at previewbox.dev/login — the same account works across the CLI and the dashboard.
Your first tunnel
Point the CLI at your local server and you're live:
Start a tunnel
# Start a tunnel to localhost:3000
prevbox serve http 3000
# With a custom subdomain
prevbox serve http 3000 --subdomain my-app
# Verbose mode (see every request in real time)
prevbox serve http 3000 -vYou'll get a public URL like https://my-app.previewbox.dev. Share it with anyone — it works over the internet, not just your local network.
What's next?
- HTTP tunnels — custom subdomains, HTTPS and running several tunnels at once.
- TCP tunnels — expose game servers and other non-HTTP services.
- The dashboard — analytics, traffic recording, uptime monitors and webhooks.
- CLI reference — every command and TUI shortcut.