getting started
Introduction
What is zgrok and how it works
What is zgrok?
zgrok is a tunneling service that exposes your local development server to the internet through a public URL. It's built on the QUIC protocol for maximum speed and reliability.
When you run zgrok http 3000, your local server becomes accessible at a URL like https://a7f9x2--acme-shop.zgrok.io (a tunnel name, then your project) in under a second, with no configuration needed.
Why QUIC?
Unlike traditional TCP-based tunnels, zgrok uses QUIC (the protocol behind HTTP/3):
- Faster handshakes: QUIC folds the transport and TLS 1.3 handshakes into a single round trip, so a new connection carries data sooner than the separate TCP-then-TLS setup a plain tunnel pays for
- Better reliability: multiplexed streams prevent head-of-line blocking, so a lost packet on one request never stalls the others
- Built-in encryption: TLS 1.3 is mandatory in QUIC, so every tunnel is encrypted by default
- Resilient auto-reconnect: if your network drops, the CLI reconnects automatically with exponential backoff (up to 10 attempts) over a fresh QUIC handshake, instead of leaving you to restart the tunnel by hand
How it works
A tunnel is four moving pieces: your CLI, the QUIC connection, zgrok's relay, and the public URL it hands you.
| Step | Stage | What happens |
|---|---|---|
| 1 | CLI | zgrok http 3000 authenticates with your API key and opens a QUIC connection to the relay |
| 2 | QUIC tunnel | A persistent, encrypted connection is established to relay.zgrok.io:4433 and held open for the session |
| 3 | Relay | The server assigns a tunnel name inside your project and proxies each incoming HTTP request to your CLI over that connection |
| 4 | Public URL | Requests to https://<name>--<project>.zgrok.io reach your local server, and responses (plus a live request log) flow back the same way |
$ zgrok http 3000Tunnel Status: onlineForwarding: https://a7f9x2--acme-shop.zgrok.io → http://localhost:3000Inspect: http://127.0.0.1:4040[14:32:05] GET / 200 12ms[14:32:06] POST /api/webhook 200 45ms
When to use it
- Webhook development: receive Stripe, GitHub, or Slack webhooks on your local machine instead of deploying just to test one
- Demo sharing: hand a teammate or client a working URL to your work-in-progress, no deploy required
- Mobile testing: open your dev server from a phone on any network;
--qrprints a scannable QR code for the tunnel URL - Local AI: put Ollama, LM Studio, or another OpenAI-compatible server behind a public URL with
zgrok ai, authenticated by default and built for slow, long-running completions
zgrok at a glance
| Feature | zgrok |
|---|---|
| Protocol | QUIC (HTTP/3) |
| Free tunnels | 2 |
| Custom tunnel names | Pro |
| Request logging | Free |
| Request inspector | Free |
| Custom headers | Free |
| Pro price | $9/mo |
Next steps
- Installation: install the CLI
- Quick Start: create your first tunnel in under 2 minutes
- CLI Reference: every command and flag
- Request Inspector: see and replay every request through your tunnel
- Local AI: tunnel Ollama or LM Studio with
zgrok ai