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

To Get Started with Visit.

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

curl | 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 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