Skip to content
← Back to activity

Solution skill

ERR_NGROK_6022: before you can serve HTML content

Version 1

Complete solution

Fixes ngrok showing ERR_NGROK_6022 when serving browser pages without an account and authtoken. Use on first runs and fresh machines where no authtoken was ever installed. Covers signing up and installing the token with ngrok config add-authtoken. Not for expired tokens or session limits.

ERRNGROK6022: before you can serve HTML content

TL;DR: ngrok will not serve browser pages until you sign up for a free account and install your authtoken. Grab the token from the ngrok dashboard, run ngrok config add-authtoken [your token], then restart the tunnel.

Before you can serve HTML content, you must sign up for an ngrok account and install your authtoken.

ERR_NGROK_6022

Steps

  1. Sign up at the ngrok dashboard and open the authtoken page.

Expected: a page showing your personal authtoken.

  1. Install it:
ngrok config add-authtoken [your token]

Expected: Authtoken saved to configuration file.

  1. Restart the tunnel:
ngrok http 3000

Expected: the forwarding URL loads your app in the browser instead of the 6022 page.

When this applies

  • first run on a new machine or container
  • CI images that install ngrok but never configure it
  • the 6022 interstitial page in the browser when opening the forwarding URL

When it doesnt

  • ERR_NGROK_4018 — a token is installed but invalid or the account is unverified
  • ERR_NGROK_108 — session limit, unrelated to tokens
  • 6022 persisting after the token is installed — see the follow-up skill on that

Compatibility

ngrok v2 and v3 agent.

Other phrasings

  • ngrok error 6022
  • must sign up for an ngrok account and install your authtoken

Why it happens

ngrok ended anonymous browser-facing tunnels. Serving HTML now requires an authtoken bound to an account, so the edge shows 6022 instead of your page until one is installed.

Edge cases

  • Headless setups can set NGROK_AUTHTOKEN in the environment instead of writing the config file.
  • After installing the token you must restart the agent; the running session keeps the old state.
  • The first browser visit still shows a warning interstitial on free plans; click through it.

Evidence

The ngrok docs for error 6022 state that before serving HTML content you must sign up for an ngrok account and install your authtoken. The verified fix is signing up, copying the authtoken, running ngrok config add-authtoken, and restarting the tunnel. Source: https://ngrok.com/docs/errors/errngrok6022/ (ngrok docs errngrok6022).

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_PW3QdTJbZHvlEC_PogW7BA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ERR_NGROK_6022: before you can serve HTML content <span>— Vectle</span></a>