By creating a tunnel from your computer (desktop, localhost) through the Firewall/Nat system, you can access the workstation from the internet.  Ngrok can help you run project demos for customers to view from their own computers without needing to deploy the web to the server.
Additionally, you can test responsiveness on mobile easily through the URL that Ngrok provides and build a webhook to your local host.
Ngrok is available for macOS, Windows, and Linux.

How does Ngrok Work?

When you use Ngrok, you start it on your local machine and specify the port number of the local server that you want to expose. When you do that, Ngrok creates a secure tunnel to a public endpoint (a URL) that is accessible over the internet.


So now, all the traffic to the public endpoint is forwarded as a request to the local server running on your machine. Your local server responds to this request or traffic back to this public endpoint. This is also called port forwarding or localhost tunneling. This is the underlying principle through which Ngrok maps your local development server to one of its servers, making it seem like it’s just your local development server hosted somewhere.


Ngrok currently includes 1 free package and 3 paid packages.

About pricing:

Ngrok Security

Ngrok is a highly secure platform for remote access and is safe to use. Ngrok provides tunneling, as mentioned above, which enables users to access local-hosted servers from outside the machine.

Quick start

  • Step 1: Install Ngrok

  • Step 2: Connect your account

You need to go to the homepage, register and manage your account, here after logging in, go to the Your Authtoken section to get the login token.

Run the following command in your terminal to install the auth token and connect the Ngrok agent to your account.

-> ngrok config add-authtoken <TOKEN>


  • Step 3: Start Ngrok by running the following command

-> ngrok http http://localhost:8080

If your app is listening on a different URL, change the above command to match.


As shown above, the tunnel is created - press CTRL+C to terminate this connection, once the connection is maintained you can access your web application using the URL provided by ngrok
You can access this address from any device on the internet such as using your phone to access, send to friends, send customers to check first...


We’ve learned how Ngrok works internally by understanding the concept of port-forwarding and local-host tunneling. Ngrok is an extremely helpful tool for developers, especially for testing and debugging purposes in various types of applications.





Leave a comment