ngrok: Serve website from local system.

It is not an easy task to host a website and then do all the necessary tasks to keep it safe and secure. Now if you building something and for that, you have to give a demo and strict on timelines. Setting up the website and other tasks will consume a lot of time. If you want to save time and serve the time from local you can very easily use ngrok and then anyone in the world can see your website or application.

ngrok: Serve your website from local system.

It is not an easy task to host a website and then do all the necessary tasks to keep it safe and secure. Now if you building something and for that, you have to give a demo and strict on timelines. Setting up the website and other tasks will consume a lot of time. If you want to save time and serve the time from local you can very easily use ngrok and then anyone in the world can see your website or application.

ngrok has a free version where you can just download the binary and run the tunnel to forward your port and open it to the world. When you run ngrok it create a public endpoint and the traffic is forwarded to your system’s ngrok process and then with to corresponding port where your server is running. You can read more about it on the official website.

How to install and use?

Download the package from ngrok install website and then unzip the package. After that, you just have to fire the below command to serve from your systems.

./ngrok http 8000 

You will then get a public endpoint and then you can hit it in the browser to see your website. You will get a URL like this

54sd4dc33ce2.ngrok.io

There are a lot of other things that you can do. For example, you have your Raspberry Pi connected to the internet from some other location you can simply forward port 22 and create an endpoint to it. In this scenario, you can easily ssh to your raspberry pi from a different location.

The other use case can be running a server for your mobile app development.

This is not at all recommended for production use. As mentioned in the start itself ngrok can be used for demo, personal machine access, etc.

If you like the article please share and subscribe.


Gaurav Yadav

Gaurav is cloud infrastructure engineer and a full stack web developer and blogger. Sportsperson by heart and loves football. Scale is something he loves to work for and always keen to learn new tech. Experienced with CI/CD, distributed cloud infrastructure, build systems and lot of SRE Stuff.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.