# ERR_NGROK_6022: 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.

```text
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.

2. Install it:

```bash
ngrok config add-authtoken [your token]
```

Expected: `Authtoken saved to configuration file`.

3. Restart the tunnel:

```bash
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.
