Skip to content

Ngrok Guide

arielaram edited this page Nov 16, 2026 · 1 revision

Ngrok Guide

Ngrok gives the admin panel a public HTTPS address without opening any port on your router. Good for demos, or a home connection without a static IP.

While the tunnel runs, the panel is reachable by anyone who has the address. Use a strong owner password, and stop the tunnel when you do not need it.

1. Install and sign up

  1. Create a free account at https://ngrok.com.

  2. Download the Ngrok agent for your system from https://ngrok.com/download and put it in your PATH, or in the bot's folder.

  3. Copy your auth token from the Ngrok dashboard and register it once:

    ngrok config add-authtoken YOUR_NGROK_TOKEN

    This stores the token in Ngrok's own config file, not in the bot's .env.

2. Start the tunnel

The bot must already be running, with the panel on PANEL_PORT (default 3000).

ngrok http 3000

Ngrok prints a https://....ngrok-free.app address. Open it and sign in to the panel.

3. Use a config file (optional, static domain)

The source repository has website/deploy/ngrok/ngrok.yml.example. Copy it and set your free static domain, so the address stays the same after restarts:

version: "3"
tunnels:
  panel:
    proto: http
    addr: 3000
    domain: your-name.ngrok-free.app
    inspect: false

Start it with:

ngrok start panel --config ngrok.yml

Keep the auth token out of this file. Use ngrok config add-authtoken (above) or pass NGROK_AUTHTOKEN as an environment variable.

4. Source setup shortcut

If you run from source with Bun, bun run panel:ngrok starts the same tunnel with ngrok http ${PANEL_PORT:-3000}.

Limits and tips

  • The free plan may show a one-time warning page to visitors before the panel. That is Ngrok, not the bot.
  • Free addresses change each time unless you use a static domain.
  • Ngrok sees the panel's traffic. Do not use it for anything you would not send through a third party.
  • inspect: false stops Ngrok keeping a local request log that would contain sign-in data.
  • Keep PANEL_HOST=0.0.0.0 (the default) or 127.0.0.1. Both work, because Ngrok connects from this machine.

Combining with Nginx

You can use either or both. The panel works with Ngrok alone, and with Nginx alone. They do not depend on each other.

Stop the tunnel

Press Ctrl+C in the terminal running ngrok. The public address stops working immediately.

Clone this wiki locally