Skip to main content
Share Localhost

Put your local app on a public URL.

Securely expose a web server on localhost to the internet, even from behind a NAT or firewall, with secure tunnels.

Then, inspect and replay every request in real-time.

Stop context switching and turn “how do I trigger that webhook again?” into a single click to replay.

Traffic inspector showing HTTP request details with one-click replay
Trusted by developers across the globe
  • Calendly
  • Cyera
  • Databricks
  • GitHub
  • Grafana
  • Harvey
  • Hugging Face
  • Mercor
  • Microsoft
  • Okta
  • Open AI
  • Perplexity
  • Ramp
  • Schneider Electric
  • Twilio
  • Vercel
  • Windsurf
  • Zoom
Get started

Get a public URL for your app right now.

ngrok is a standalone executable with zero runtime dependencies that works on every OS.

1

Install the ngrok agent

brew install ngrok
sudo unzip ~/Downloads/ngrok-v3-stable-darwin-arm64.zip -d /usr/local/bin
2

Add your authtoken

ngrok config add-authtoken "<YOUR_AUTHTOKEN>"
Don't have an authtoken? Sign up for a free account.
3

Start an endpoint

ngrok http 80
4

Open your URL at https://your-assigned-url.ngrok.app

That’s it! You didn’t need to open ports, provision a TLS certificate, or run your own reverse proxy.

1

Install the ngrok agent

winget install ngrok -s msstore
scoop install ngrok
Expand-Archive $HOME\Downloads\ngrok-v3-stable-windows-amd64.zip
2

Add your authtoken

ngrok config add-authtoken "<YOUR_AUTHTOKEN>"
Don't have an authtoken? Sign up for a free account.
3

Start an endpoint

ngrok http 80
4

Open your URL at https://your-assigned-url.ngrok.app

That’s it! You didn’t need to open ports, provision a TLS certificate, or run your own reverse proxy.

1

Install the ngrok agent

curl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc \  | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null \  && echo "deb https://ngrok-agent.s3.amazonaws.com bookworm main" \  | sudo tee /etc/apt/sources.list.d/ngrok.list \  && sudo apt update \  && sudo apt install ngrok
sudo tar -xvzf ~/Downloads/ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin
snap install ngrok
2

Add your authtoken

ngrok config add-authtoken "<YOUR_AUTHTOKEN>"
Don't have an authtoken? Sign up for a free account.
3

Start an endpoint

ngrok http 80
4

Open your URL at https://your-assigned-url.ngrok.app

That’s it! You didn’t need to open ports, provision a TLS certificate, or run your own reverse proxy.

1

Install the ngrok agent

docker pull ngrok/ngrok
2

Start an endpoint

docker run --net=host -it -e NGROK_AUTHTOKEN="<YOUR_AUTHTOKEN>" ngrok/ngrok:latest http 80
docker run -it -e NGROK_AUTHTOKEN="<YOUR_AUTHTOKEN>" ngrok/ngrok:latest http host.docker.internal:80
Don't have an authtoken? Sign up for a free account.
3

Open your URL at https://your-assigned-url.ngrok.app

That’s it! You didn’t need to open ports, provision a TLS certificate, or run your own reverse proxy.

1

Install the Docker Desktop Extension

Install the Docker Desktop Extension
2

Follow the in-app instructions to add your authtoken

Don't have an authtoken? Sign up for a free account.
3

Start an endpoint for a running container

4

Open your URL at https://your-assigned-url.ngrok.app

That’s it! The extension handles authentication and tunnel setup for you.

Traffic Policy

Secure your URL with authentication.

Instead of sharing localhost with the whole internet, lock it down to just the people or requests you authorize.

ngrok http 80 --traffic-policy-file policy.yml

policy.yml

on_http_request:  # redirect users to Google to log in  - actions:      - type: oauth        config:          provider: google   # allow logins *only* from acme.com  - expressions:      - "!actions.ngrok.oauth.identity.email.endsWith('@acme.com')"    actions:      - type: deny

policy.yml

on_http_request:  # verify webhook signatures from your provider  - actions:      - type: verify-webhook        config:          provider: github          # access your signing key from a secure ngrok vault          secret: ${secrets.get('webhook-vault', 'github-secret')}

policy.yml

on_http_request:  # redirect users to your OpenID provider to log in  - actions:      - type: openid-connect        config:          issuer_url: https://accounts.google.com          # access your OIDC details from a secure ngrok vault          client_id: ${secrets.get('auth-vault', 'oidc-client-id')}          client_secret: ${secrets.get('auth-vault', 'oidc-client-secret')}          scopes:            - openid            - email

policy.yml

on_http_request:  - actions:      - type: basic-auth        config:          credentials:            # add up to 10 username:password pairs            - user01:${secrets.get('basic-auth-vault', 'password01')}            - user02:${secrets.get('basic-auth-vault', 'password02')}
More about Traffic Policy
For teams

Security and control without slowing down your devs.

  • Standardize auth on every endpoint.
  • SIEM logging on every request.
  • ACL controls on what developers can expose.
SOC2 Type II
HIPAA & BAA
GDPR
CCPA
EU-US DPF
RBAC
SSO & SCIM
Audit logs
Data residency
Custom domains

So easy it feels like magic.

Get a public URL for localhost in less time than it took you to read this page. Just like 15.3 million other devs.

Scott Motte
@motdotla

ngrok is so effing amazing

Peter Vukovic
@pvukovic

Spent 3 hours looking for a good ngrok alternative. Let me save you some time: there isn’t a better ngrok alternative.

Lyzi Diamond
@lyzidiamond

OMG life changer. I can’t imagine how I lived without ngrok.

PS, it can be this easy in prod too...

No need to “upgrade” to a hodgepodge of ELBs, NLBs, firewall rules, DNS updates, nginx configs, and Cloudflare.

Check it out

Frequently asked questions

Answers come from ngrok.com and the ngrok docs, and can be wrong. Check the linked pages before you rely on one.