Installing the ngrok agent
The ngrok agent is available on many platforms and through many popular package managers. Visit the ngrok download page for specific installation instructions based on your setup.Standalone binary
The ngrok agent is available as a standalone binary with no runtime dependencies. Download it directly from the ngrok download page. The agent supports the following platforms:| OS | Supported architectures |
|---|---|
| Windows | 64-bit, 32-bit (x86-64, x86) |
| macOS | Intel, Apple Silicon (x86-64, arm64) |
| Linux | x86-64, x86, arm, arm64, mips, mips64, mips64le, mipsle, ppc64, ppc64le, s390x |
| FreeBSD | x86-64, x86, arm |
ngrok update command, even if you didn’t install it with a package manager.
Docker
ngrok provides pre-built docker images for the ngrok Agent with instructions for getting started. An example command for starting a tunnel to port80 on the host machine looks like this.
- Debian Linux
- Windows or Mac
Basic usage
The ngrok docker image wraps the ngrok agent executable. Read the documentation for the ngrok agent CLI docs for all commands.Run an ngrok Agent pointed at localhost:80
Choose a URL
If you don’t choose a URL, ngrok will assign one for you.Add a Traffic Policy
Traffic Policy is a configuration language that offers you the flexibility to filter, match, manage, and orchestrate traffic to your endpoints.traffic-policy.yml
Run in the background
Use a configuration file
Run the ngrok agent with the config file./ngrok.yml from the host machine:
Pull the ngrok container image
Traffic Inspection
Traffic Inspector
Use Traffic Inspector on your ngrok dashboardLocal web inspection on localhost:4040 (Legacy)
The agent serves this web interface on port 4040 so you’ll need to publish it as well with-p 4040:4040
http://localhost:4040, you may need to map your host port 4040 to port 4040 on the container, for example: