← Back to Notes
ngrokJuly 2, 2026

How to Set Up ngrok with a Permanent Free Domain

Use this whenever something running on your own machine (like a self-hosted n8n instance) needs to receive webhooks or messages from the internet, and you don't want to pay for cloud hosting just to get a public URL.

Steps

  1. Sign up free at ngrok.com, email only, no card required.
  2. In the dashboard, find your assigned dev domain, something like abc123xyz.ngrok-free.dev. This is yours permanently as long as the account exists.
  3. Install the ngrok CLI for your OS.
  4. Copy your authtoken from the dashboard and run:
    ngrok config add-authtoken YOUR_TOKEN
    
  5. Start the tunnel, pointing at whatever local port your service runs on:
    ngrok http --url=abc123xyz.ngrok-free.dev 5678
    
  6. Leave that terminal window open, closing it stops the tunnel.

Gotcha

The free static domain does not expire and does not rotate on restart, which used to be true of ngrok's older free tier. As of now, the free plan includes one permanent dev domain with no timeout on the endpoint, meaning it's genuinely safe to rely on for a personal project, not just for quick testing.

Quick reference

ngrok config add-authtoken YOUR_TOKEN
ngrok http --url=yourdomain.ngrok-free.dev PORT