How to install ngrok in termux


Hi, guys in this post I will show how to install Ngrok in Termux? Installing Ngrok in Termux is not a difficult process. It's kinda very simple. Before installing Ngrok we must know What is Ngrok? and How it works? So here is the simple explanation on how to install Ngrok in Termux.

What is Ngrok?

How to install Ngrok in Termux, Before getting into Ngrok installation process, let's see it's definition. So basically, Ngrok is a reverse proxy that creates a secure "tunnel" from a public endpoint for a web service running locally.

In other words, you can use Ngrok to expose a port on your system, for example, the port on which your application or website is running, to a public URL.

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?

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

You might be thinking about how to use Ngrok in Ethical hacking? Basically, you can take the reverse shell and reverse connection of any device remotely through the TCP tunneling with Ngrok.

How to install Ngrok in Termux?

1. First of all, open your Termux and then type the below command to update and upgrade your Termux repositories.

pkg update && pkg upgrade -y

2. Now type the below command. The below command will install zip and wget packages in your Termux. Whereas zip will be used to unzip the Ngrok zip folder and wget will be used for downloading Ngrok.

pkg install zip wget -y

3. Now type the below command as it is to download Ngrok in your Termux.


Wait for downloading to be finished. It may take up to 2 to 5 minutes to download Ngrok depending upon your Internet speed.

4. Now we need to unzip the Ngrok folder by typing the below command.


5. After Unzipping give Ngrok permission to read, write and execute by typing the following command

chmod +x ngrok

6. Now open the Ngrok website by clicking the link below:

After opening the Ngrok website click on the Signup button, and then create a new account on Ngrok.

Now you need to confirm your Ngrok account. In order to confirm the Ngrok account simply open your Email. There you will see Ngrok email simply open that mail and click on confirm account button.

7. Now login to Ngrok with your Email Id and Password. After logging in to Ngrok you will see an auth token there. Then simply type below command in your Termux And replace <YOUR_AUTH_TOKEN> with your auth token.

./ngrok authtoken <YOUR_AUTH_TOKEN>

Note: Replace <YOUR_AUTH_TOKEN> with your auth token.

Running above command will add your auth token to your ngrok.yml file. Connecting an account will list your open tunnels in the dashboard, give you longer tunnel timeouts.

8. After doing all the above steps now finally Ngrok has successfully installed in your Termux. Now type the below command to see how to use Ngrok in Termux.

./ngrok help

Note: If your device doesn't connect to Ngrok or its showing reconnecting, then simply open your mobile hotspot and run Ngrok again.

Here is a video From our YouTube channel on How to install Ngrok in Termux:

Thanks for reading the post, If you have any questions related to Ngrok then feel free to comment below.


  1. Your code made me to install ngrok sucessfully!
    Thanks bro.
    Happy Hacking !


Post a comment

Previous Post Next Post