Skip to content
Browse the docs
reference

Troubleshooting

Common issues and solutions

Connection issues

"Connection failed" on startup

Cause: Can't reach the relay server.

Solutions:

  • Check your internet connection
  • Verify DNS: nslookup relay.zgrok.io
  • If behind a corporate firewall, QUIC (UDP port 4433) may be blocked

Tunnel disconnects frequently

Cause: Unstable network connection.

Solutions:

  • zgrok auto-reconnects by default (up to 10 attempts)
  • Check your network stability
  • If on WiFi, try a wired connection

"API key required" error

Solutions:

  • Sign in: zgrok login
  • On a machine with no browser, save your key: zgrok config add-authtoken YOUR_KEY
  • Or pass it directly: zgrok http 3000 --api-key YOUR_KEY
  • Or set the environment variable: export ZGROK_API_KEY=YOUR_KEY

"GLIBC not found" or "libssl.so.3" on Linux

A zgrok that stops with one of these before doing anything is older than v0.30.4:

zgrok: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found
zgrok: error while loading shared libraries: libssl.so.3: cannot open shared object file

It cannot update itself, because it does not start. Run the installer again:

bash
curl -fsSL https://zgrok.io/install.sh | sh

Your settings and API key stay where they are. Why this happened.

Tunnel issues

"Tunnel limit reached"

Cause: You've hit your plan's tunnel limit (Free: 2, Pro: 10).

Solutions:

  • Close unused tunnels (Ctrl+C)
  • Check the dashboard for active tunnels
  • Upgrade to Pro for more tunnels

If a tunnel you already stopped is still counted, see the next section.

A stopped tunnel still counts against your limit

Cause: zgrok before v0.16.0 only listened for Ctrl+C. systemctl stop, docker stop and most CI runners stop a process with SIGTERM instead, which older versions ignored, so the tunnel was never closed properly and the server kept the slot until its idle timeout expired, about five minutes later. On Free, with two tunnels, that meant half your quota was unavailable after every restart.

From v0.16.0 a stop signal is handled the same way as Ctrl+C, and your terminal shows it:

→ Shutting down tunnel...
✓ Tunnel disconnected gracefully

The slot is free as soon as that second line appears, with no waiting.

Solutions:

  • Upgrade with zgrok update, then check zgrok --version reports 0.16.0 or newer
  • If you cannot upgrade yet, wait about five minutes after stopping, or disconnect the tunnel from the dashboard

Closing the terminal is a separate case: a tunnel started with nohup keeps running on purpose, so use kill or the dashboard to stop it.

Local server not responding (503 Service Unavailable)

Cause: Your local server isn't running on the specified port.

Visitors get a page naming the port, and your terminal says so once per outage:

↳ localhost:3000 is not responding — is your app running on that port?
[03:15:24] GET / 503 58ms

That notice is how you tell the two kinds of 503 apart: this one means zgrok could not reach your app, not that your app answered 503 itself.

Solutions:

  • Make sure your server is running: curl http://localhost:3000
  • Check the port matches: zgrok http 3000 should match your server port; the wrong port is by far the most common cause
  • If your server binds to 127.0.0.1 only, this is fine: zgrok connects to 127.0.0.1

A 502 or 504 is a different problem: those come from the zgrok server when the tunnel itself is unreachable or too slow to answer, not from your local app being down.

Custom tunnel name not working

Cause: The name might be taken or invalid.

Solutions:

  • Tunnel names must be 3-30 characters: lowercase letters, digits and single hyphens (no --, no leading or trailing hyphen)
  • Try a different name
  • Check if another tunnel in the same project is already using it

Request issues

CORS errors in browser

Solution: Use the --header flag:

bash
zgrok http 3000 --header "Access-Control-Allow-Origin: *"

Requests not showing in terminal log

Possible causes:

  • Request logging is disabled (--no-log or log_requests: false in config)
  • Requests are being blocked by IP whitelist
  • Basic auth is failing (if enabled)

Update issues

zgrok update fails

Solutions:

  • Check write permissions to the binary location
  • Try downloading manually from downloads.zgrok.io
  • On macOS, you may need: sudo zgrok update

I'm seeing 429 "Too many requests"

zgrok limits how fast a single account's tunnels can be driven: 3,000 requests per minute across all of your tunnels. This is a fair-use backstop, not a plan limit: it is the same on Free and Pro, and it sits well above what normal development traffic reaches.

The limit counts requests arriving at your tunnel, which is worth knowing because you do not control who calls a public URL. If something other than your own testing is driving the traffic, stop it at the source: a runaway script, a webhook retry loop, or a crawler that found the URL.

On the Pro plan you can also restrict who reaches the tunnel at all, which keeps that traffic from counting against the limit in the first place:

  • zgrok http 3000 --allow-ip 1.2.3.4 limits it to addresses you name
  • zgrok http 3000 --basic-auth user:secret puts a password in front of it

Both flags are Pro-only: passing either one on the Free plan refuses the tunnel rather than protecting it.

Tunnels are never disconnected by this: requests over the rate are refused with a 429 and the tunnel keeps serving as the rate falls back.

Still stuck?

Run the command again with -v and capture the output. That is what we need to see:

bash
zgrok http 3000 -v 2> zgrok.log

Everything zgrok prints goes to stderr, so that one redirect captures the whole session, and -v adds the QUIC and TLS handshake detail that explains a connection which never establishes. It stops short of recording request contents, so the log is safe to send.