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 -yDownload Ngrok:
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.zipUnzip the file:
unzip ngrok-v3-stable-linux-arm64.zipMake it executable:
chmod +x ngrokMove to global path:
mv ngrok $PREFIX/binVerify installation:
ngrok versionUsage Commands
Connect your account (add auth token):
ngrok config add-authtoken YOUR_TOKENExpose local HTTP server:
ngrok http 8080Expose another port:
ngrok http 3000Start TCP tunnel:
ngrok tcp 22Run with custom subdomain (if available):
ngrok http --domain=your-name.ngrok-free.app 8080View web interface (traffic inspection):
http://127.0.0.1:4040