How to Install Ngrok in Termux?

Ngrok is a simple tool that creates a secure tunnel between your local device and the internet. It allows you to share localhost servers, test web applications, and access services running in Termux using a public URL from anywhere. Here are the commands to install Ngrok in Termux.

Installation Commands

Update Termux packages:

pkg update && pkg upgrade -y

Install required packages:

pkg install wget unzip -y

Download Ngrok:

wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.tgz

Extract Ngrok:

tar -xvzf ngrok-v3-stable-linux-arm64.tgz

Give executable permission:

chmod +x ngrok

Move Ngrok to Termux bin directory:

mv ngrok $PREFIX/bin

Check Ngrok version:

ngrok version

Usage Commands

Add your auth token:

ngrok config add-authtoken YOUR_TOKEN

Expose localhost port 8080:

ngrok http 8080

Expose localhost port 3000:

ngrok http 3000

Start TCP tunnel:

ngrok tcp 22
SHARE THIS POST: