in Review

Ngrok – Publish localhost securely

Ngrok allows users to deploy a secure tunnel to their own box. This allows for application sharing without the hassle of deploying application or sharing local network ips.

Ngrok acts as a NAT server sitting between your localhost and the internet. Ngrok generates http endpoints like http://f7f49fde.ngrok.io/.

To Get Started with ngrok.io Visit.

For a quick taste of ngrok use the gist below. Make sure to use linux or mac.

curl https://gist.githubusercontent.com/gabber12/8109d10ba732ac380502135489b28c97/raw/2811ebee68ce8ecefbdc37d54ec1805812427544/ngrok-demo.sh | bash -s linux

The snippet creates a Hello World flask application and intializes a ngrok tunnel.Once ngrok connects you can open the endpoint to access the application.



Ngrok handles a bunch of other stuff like

  • Authentication – Signup on ngrok.io and save auth token by ngrok authtoken {token}
  • Protocols – Out of the box ngrok allows for HTTP TLS and tcp based tunnels.
  • Custom domains – Custom domains can be reserved on ngrok by upgrading from free plan.

Ngrok also provides a neat dashboard to monitor account tunnels.

I myself found ngrok pretty useful for getting feedback on early stage projects, debugging mobile apps by routing traffic to a local setup and even connect to my machine at home through ssh.


Also published on Medium.

Write a Comment

Comment