Ngrok in Termux – Installation & Usage Commands

Ngrok in Termux – Installation & Usage Commands

Ngrok is a simple tool that creates a secure public URL for your local server. It allows you to access your local apps, APIs, or websites from anywhere on the internet. This is very useful for testing, development, and sharing projects directly from Termux without hosting them online.

Installation Commands

Update Termux and install required packages:

pkg update && pkg upgrade && pkg install wget unzip -y

Download Ngrok:

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

Unzip the file:

unzip ngrok-v3-stable-linux-arm64.zip

Make it executable:

chmod +x ngrok

Move to global path:

mv ngrok $PREFIX/bin

Verify installation:

ngrok version

Usage Commands

Connect your account (add auth token):

ngrok config add-authtoken YOUR_TOKEN

Expose local HTTP server:

ngrok http 8080

Expose another port:

ngrok http 3000

Start TCP tunnel:

ngrok tcp 22

Run with custom subdomain (if available):

ngrok http --domain=your-name.ngrok-free.app 8080

View web interface (traffic inspection):

http://127.0.0.1:4040
SHARE THIS POST: