How to Install Ngrok on Ubuntu 22.04 LTS

In this tutorial, we wil learn how to install ngrok on Ubuntu 22.04 LTS. Ngrok is a globally distributed reverse proxy fronting your web services running in any cloud or private network, or your machine. It is a tunneling tool used to expose a locally running application to the internet. You can download it for free with all of the functionality.

And explore our locally hosted web server running on port 8081. Here, we are going to change the default port number 80 to 8081. As our web server runs on port 8081, you should use this command: $ ./ngrok http 8081.

When you run this command, you should see an output similar to the following:

Ctrl+C to quit)   http://localhost:4040/ to inspect, replay, and modify your requests  
Session Status                online
Account                       tecdhee (Plan: Free) 
Version                       3.0.6
Region                        India (in)
Latency                       114ms
Web Interface       
Forwarding           -> http://localhost:8081
Connections                   ttl     opn     rt1     rt5     p50     p90
                              1       0       0.01    0.00    5.32    5.32

So here my local web server is already running on my local machine. Only we have to deploy the ngrok.

Create a Ngrok account

So, first of all, we must create a ngrok account to use the services. Go to the official website and create an account. If you have already an account just login it.

Create a Ngrok account

Download ngrok

Here you have to download the ngrok first. It is available for macOS, Windows, Linux, and FreeBSD. You can download directly r you can use wget command also.

Ngrok Deshboard

Extract the ngrok file

After downloading the ngrok binary you have to extract the .tgz file.

So go to the Download directory and run the following commands in the terminal.

$ cd Downloads$ tar -xvf ngrok.x.x.x.tgz

Extract Ngrok file in UbuntuConfigure the ngrok

You will find the all details in the dashboard.  You have to copy your auth token from the dashboard. And run the following command in the terminal. Only your auth token will be changed.

$ ./ngrok config add-authtoken [auth token]

Install Ngrok on Ubuntu 22.04 LTS

Run your ngrok

Now run the ngrok using the following command.

./ngrok http 8081

Install Ngrok on Ubuntu 22.04 LTS

Now you can open the ngrok link anywhere in the world. And you can use your local web server.

Install Ngrok on Ubuntu 22.04 LTS

This is the way how you can download and run the ngrok on Ubuntu 22.04 and use your local web server anywhere in the world.


You can watch this video on how to install ngrok on Ubuntu 22.04 LTS step by step without any error.


Thank you for reading this post and keep connected to TECH DHEE to continue enjoying excellent posts. Share your views about this post in the comment section below. If you still have any queries, throw them in the comment section. If you find this post helpful, don’t hesitate to share this post on your social network. It will only take a moment, and also it is quite easy and useful for others.

Leave a Comment