Ngrok in Termux: Simple Setup Steps

4.2/5 - (12 votes)

Did you know that we can use our Android device to create local servers? Well, you can do that with Ngrok in Termux. Ngrok in Termux is capable of creating a secure tunnel for your local servers. In the article, I explain to you about Ngrok in Termux, how to install Ngrok in Termux, and I will also give you some Ngrok Termux commands.

Ngrok in Termux

What is Ngrok?

Ngrok is a tool that is used for creating local servers. It means Ngrok creates a secure tunnel where you can share your local device files or anything on the internet. It makes your local files accessible from everywhere on the internet. Basically, Ngrok can make your device into a web server. 

How it works?

Ngrok gives your local file a temporary public URL that anyone can open on the internet.

how to install ngrok in termux?

Here are some simple steps to install Ngrok in Termux:

STEP1 : Download and install Termux latest version.

STEP2 : Open Termux and run the following commands:

  • update and upgrade Termux packages:-
apt update && apt upgrade -y 
  • Install wget package in your Termux:-
pkg install wget -y 

STEP3 : Download and install Ngrok Termux by running the following command:

wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.tgz && tar -xzvf ngrok-v3-stable-linux-arm64.tgz && ./ngrok
Ngrok Termux

After following these steps, Ngrok will successfully download and install on your Termux. Now let’s see how to setup ngrok in termux.

how to setup ngrok in termux?

To setup Ngrok in your Termux, you need Ngrok authtoken.

Now you have a question about what is Ngrok authtoken Termux and how to get Ngrok authtoken! Right? Don’t worry, I will give you some simple steps to get Ngrok authtoken Termux.

READ ALSO  Kali Linux Commands List - Basic | PDF | 2024

Here are the simple steps to get Ngrok authtoken for Termux:

  1. Go to Official Ngrok website (https://ngrok.com)
  2. Click the sign up for free button and create a Ngrok account by entering your name, email, and password. (You can also use sign up with Google option to create Ngrok account without typing your basic details).
  3. After opening an account, at the homepage, click on the three lines on the top left side. There, you can find your authtoken in the (your authtoken) option. 
    • Homepage> Three line> Your authtoken.
  4. Copy your authtoken.

Now open Termux and setup your Ngrok authtoken by running the following command:

./ngrok authtoken PASTE_YOUR_AUTH_TOKEN_HERE
Ngrok authtoken Termux

Replace ‘YOUR_AUTH_TOKEN_HERE’ with the actual authtoken that you copied from the Ngrok website.

Now you are ready to use Ngrok in your Termux. You can simply create a tunnel for your localhost by running a command like:

./ngrok http 4040
Ngrok Termux

This command will create a secure tunnel to port 4040 on your local device.

NOTE: Turn on your mobile hotspot before using Ngrok Termux.

Conclusion:

Ngrok is an excellent application for developers and testers because of its key feature of making local devices accessible from anywhere. In this article, I explained in simple language what Ngrok is and how to install Ngrok in Termux. By installing Ngrok in Termux, you will be able to share anything from your device with anyone on the internet. Ngrok will simply create a tunnel for your local host and provide you with a URL that you can share with anyone to access your local host. I also explained how to get Ngrok authtoken and how to setup Ngrok authtoken Termux in some simple steps.

READ ALSO  how to install ngrok in termux 2024
FAQ:
how to download ngrok in termux?

Copy and paste this one-line command to download Ngrok in Termux. 

  • apt update && apt upgrade -y && pkg install wget -y && wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.tgz && tar -xzvf ngrok-v3-stable-linux-arm64.tgz && ./ngrok
how to run ngrok in termux?

After installing Ngrok Termux, you can run Ngrok by typing this command:

  • ./ngrok

This command will run Ngrok and open a menu in your Termux.

how to add ngrok authtoken in termux?
  • Open Termux.
  • Run
    • ./ngrok authtoken PASTE_YOUR_AUTHTOKEN_HERE
  • Verify your authtoken by running again ./ngrok authtoken command.
how to unzip ngrok in termux?

To unzip Ngrok in Termux:

  • run
    • unzip ngrok-file-name.zip
how to start ngrok in termux?

To start Ngrok in Termux:

  • run
    • ./ngrok
    • ./ngrok http 4040

That’s it! You’ve started Ngrok in Termux on port 4040.

how to uninstall ngrok in termux?

Run this command to uninstall Ngrok from Termux:

  • rm ngrok
how to stop ngrok?

To stop Ngrok session, you can simply click Ctrl+c, and if it is running in the background, you can run $ pkill ngrok command.


proud owner of termuxcommands.com, Assam native. Tech enthusiast, sharing Termux and Linux expertise. Simplifying tech for all—from beginners to pros. Join me on this knowledge-sharing adventure!

Leave a Comment