Pinafly

How to reserve a static domain in ngrok and lock it to your Google account

Create a domain on the Domains page of the ngrok dashboard, then run ngrok http with --domain and --oauth=google so only your email can open the tunnel. About 5 minutes. You need an ngrok account and the CLI signed in.

Verified 11 Oct 2026 5 steps Checked against the current interface
Guide me Steps show on your own ngrok page. Needs the free Pinafly extension.

Before you start

You need an ngrok account and the ngrok CLI signed in with your authtoken.

Time
About 5 minutes
  1. 1

    Open Domains

    Sign in to the ngrok dashboard and open Domains in the left menu.

    You should see: A list of your domains. A free account may already have one assigned.

  2. 2

    Create or copy a domain

    If the list is empty, click the button to create a domain. Copy the domain name, which ends in ngrok-free.app or ngrok.app.

    You should see: Your domain in the list.

  3. 3

    Start the tunnel on that domain

    In a terminal run ngrok http 3000 --domain your-domain.ngrok-free.app, replacing 3000 with the port your app listens on and the domain with the one you copied.

    You should see: ngrok shows your domain as the forwarding address, and opening it shows your app.

  4. 4

    Lock it to your Google account

    Stop the tunnel and start it again with --oauth=google and --oauth-allow-email=you@example.com added to the same command.

    You should see: Opening the domain in a private window asks you to sign in with Google, and only that address gets through.

  5. 5

    Check someone else cannot get in

    Open the domain in a private window and sign in with a different Google account.

    You should see: The sign-in is refused.

If it does not work

ngrok refuses the --oauth flag. Traffic policy options such as OAuth depend on your plan. Use --basic-auth user:password on the same command instead, which is weaker but still locks the address.

ngrok says the domain is not reserved to your account. Copy the domain from the Domains page of the account your authtoken belongs to, not one from another account.

How we checked

Verified 11 Oct 2026 against the live interface.

Something changed or looks wrong?

Ready to do it?

Run these 5 steps on your own ngrok page. Each step shows in a panel on the page, Next when you are ready.

Guide me