Running ngrok without agents
ngrok offers different options using launching tunnels without downloading or running the ngrok agent. Each option is best suited for different use-cases:
SSH Reverse Tunnel
Launch ngrok tunnels by using the ssh with reverse tunneling (ssh -R
):
- Pros: This option works well in use-cases where you cannot install and download the ngrok agent, but can run SSH locally.
- Caveats (vs Agent): SSH Reverse Tunnels cannot run multiple tunnels at the same time and don't provide automatically reconnection in case of network outages.
Docker Container
This option packages the ngrok agent as a docker container, allowing you to work natively in Docker environments
- Pros: Great for use in Docker environment and infrastructure (i.e. alongside docker compose)
- Caveats (vs Agent): Limited compatibility to Docker environments.
ngrok Agent Libraries
With ngrok agent libraries, you can embed ngrok directly into your application allowing you to programmatically launch and manage ngrok ingress from your code.