Expose "local" web server to internet with ngrok
I had a "local" web server that I wanted to share and collaborate with my friends. I was looking for ways to do so without the need to deploy it to the cloud. I came across ngrok
reverse proxy and it is exactly what I was looking for. While the concept is nothing new (used by a few other products), ngrok
makes the solution general purpose, and simple to set up, configure, and run it.
How does ngrok
work?
ngrok
uses a public endpoint and a secure tunnel from the public endpoint to the "local" webserver to expose it on the internet.
ngrok
agent initiates a secure tunnel to the public endpoint. Once the tunnel is set up, any traffic it receives on the public endpoint will be forwarded to the "local" web server making it available on the internet.
NOTE
Finally, if you plan to run ngrok
inside a docker container, I have a docker file and setup instructions available here.