Skip to main content

Download & Install

The fastest way to put anything on the internet.

You’re all set. What’s next?

Copy the policy below into a local policy.yaml file.

docker run -it \
  -v $(pwd)/policy.yaml:/etc/traffic-policy.yml \
  -e NGROK_AUTHTOKEN=<YOUR_AUTHTOKEN> ngrok/ngrok:latest \
  http host.docker.internal:80 \
  --traffic-policy-file /etc/traffic-policy.yml
contents of policy.yaml
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

Inspect every detail of your traffic

Watch the flow in real time, then dig into the headers, body, latency, response, and more for every request.

Configure your agent

Configure settings like multiple endpoints, load balancing, and traffic transformation with Traffic Policy.

Bring your own domain

Paid feature

Create a DNS CNAME record to use your own domain name for your endpoint URL.

docker run -it \
  -e NGROK_AUTHTOKEN=<YOUR_AUTHTOKEN> ngrok/ngrok:latest \
  http host.docker.internal:80 --url https://app.acme.com

Run as background service

Recover connectivity after unexpected software or hardware failures.

docker run -d --restart unless-stopped \
  -e NGROK_AUTHTOKEN=<YOUR_AUTHTOKEN> ngrok/ngrok:latest \
  http host.docker.internal:80