ngrok: An Introduction and Practical Use Cases

Palanikumar Veerachamy
AIA Singapore Technology Blog
3 min readJun 21, 2023

‘ngrok’ is a tool that allows developers to expose a web server running on their local machine to the public internet. Before getting into the technical details , let me explain one of the use cases I encountered.

I was tasked with creating a webhook for the “Telegram” app. The purpose was for every time a user sends a message to a particular group or bot in Telegram, the message should be sent to our backend service. Now that my development is done and the backend service is running locally, I need to test it. The problem is that I need a public HTTPS URL to create a webhook in the Telegram app. This is where ‘ngrok’ comes in, as it helps to expose my local URL to the public internet.

Now, let’s see how to expose your local URL to the internet through Ngrok. First, download ‘ngrok’ to your local machine and then run the following command

It creates a secure tunnel between the local machine and the ngrok server, which can then be accessed by anyone with the ngrok URL.

One of the key benefits of ‘ngrok’ is its ease of use. Simply download and install the Ngrok client, run a command, and you’re ready to go. The tool also includes a web interface that allows you to inspect traffic passing through the tunnel, making it easy to debug any issues.

Ngrok is also highly secure. It uses industry-standard encryption to protect the traffic passing through the tunnel, ensuring that your data is safe from unauthorized access. This is particularly important when working on sensitive projects that require extra security.

Another advantage of ‘ngrok’ is its flexibility. It offers a range of customization options, such as password protection for tunnels or the ability to use custom domains for public URLs.

Overall, ‘ngrok’ is a great tool for IT professionals who need a simple and secure way to expose local development servers to the internet. It can save time and effort in testing web applications, and its security features provide peace of mind when working on sensitive projects.

In conclusion, whether you’re a beginner or an experienced developer, ‘ngrok’ is definitely worth checking out. Give it a try and see how it can improve your workflow. If you have any questions or comments, feel free to leave them below.

--

--

Palanikumar Veerachamy
AIA Singapore Technology Blog

Believe in learning by sharing. Learning is an endless journey, let's explore it