Skip to main content

Ngrok

Ngrok is a tool that enables developers to expose a local web server to the Internet with minimal effort. Ngrok will create a secure tunnel from a public URL to our locally running web server. Ngrok is easy to install and works on all major operating systems. Download ngrok from its official website and install it.

Install and use

On Linux or OSX you can unzip ngrok from a terminal with the following command. On Windows, just double click ngrok.zip.

$ unzip /path/to/ngrok.zip

Now you can create a secure HTTP tunnel by providing the port number on which your web server is running. For example, your web server is running on port number 5000. you can launch your HTTP tunnel with the following command line.

$ ./ngrok http 5000

After launching the secure HTTP tunnel, ngrok will display a UI in your terminal with the public URL of your tunnel along with some other information shown below.

ngrok by @inconshreveable                                       (Ctrl+C to quit)

Session Status online
Session Expires 7 hours, 59 minutes
Update update available (version 2.3.35, Ctrl-U to update
Version 2.3.34
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://c654b286.ngrok.io -> http://localhost:5000
Forwarding https://c654b286.ngrok.io -> http://localhost:5000

Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00

If the provided information is not enough, kindly visit ngrok official website.