How to install ngrok

Ngrok is an excellent online port forwarding tool. Using this tool you can host a page online and make it usable by anyone. And the special feature of this is that it is completely free.

In this post we will see how to install ngrok tool on termux without any error.

What is Ngrok?

ngrok is a cross-platform application that enables developers to expose a local development server to the Internet with minimal effort. The software makes your locally-hosted web server appear to be hosted on a subdomain of, meaning that no public IP or domain name on the local machine is needed.

In other word’s, Ngrok is a reverse proxy that creates a secure “tunnel” from a public endpoint for a web service running locally.

Basically, Ngrok creates a tunnel, where its function is to redirect external connections to your localhost.

How ngrok works?

Let’s assume you have a web server running on your machine. Now you intend to share, with a colleague, the address of a website that you developed, but as it is on the private network. To do this, just use Ngrok. Considering that the webserver is at port 8080, you only need to execute the following command.

					ngrok http 8080

What you can do with Ngrok?

  1. Share website to a colleague that is running on a private network;
  2. Create a TCP server on your device;
  3. Port forwarding;
  4. Testing mobile apps connected to your locally running backend;
  5. Stable addresses for your connected devices that are deployed in the field;
  6. Running personal cloud services from your home;
  7. And also you can use Ngrok in Ethical hacking.

How to install ingrok on termux

Installing this tool in termux is quite simple, but it requires the assistance of a tool, therefore we must first install the pre-installed tools necessary for this tool.


We need to install the two most important package required to run this tool.

1. Wget

This wget package is used to download a tool or a zip or rar file directly to termux. To install this tool on your termux run the following command.

					pkg install wget
How to install ngrok
Install wget package on termux


This unzip package is used to expand a zip file. Install the unzip tool with the below commands.

					pkg install unzip
How to install ngrok
install unzip package on termux

Install Ngrok

Now you need to go to the ngrok site and create an account for yourself then copy the ngrok download link in your account and type the following and paste it in your termux.

					wget (your ngrok download link)
How to install ngrok
Get ngrok download link
How to install ngrok
output for download the ngrok tool on termux

Now to unzip the downloaded ngrok zip file, type in your termux as shown below and press enter.

					tar -xvzf (your ngrok zip file name)
How to install ngrok
output for unzip ngrok tool on termux

Now you need to give the ngrok tool the necessary permission to run on your termux so type the following command

					chmod +x ngrok
How to install ngrok
Output for giving permission to ngrok tool

Now you have to login your ngrok account again in the browser and copy the authtoken for yourself and paste the termux.

How to install ngrok
output for copy ngrok authtoken
How to install ngrok
Output for installing the ngrok authtoken

ngrok installation is complete Now run the following command to execute ngrok on your termux.

					./ngrok http 4444
How to install ngrok
Output for executing the ngrok on termux

That’s all done, that’s how you should install ngrok tool on your Termux. On some phones ngrok may not work properly then turn on the hotspot on your mobile and alternatively run your termux using the command given above.

I hope this post is very useful for you and if you have any doubts about this post you can ask me by command.

Latest articles

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

Skip to content