Are you ready to take your mobile development skills to the next level?
What is Ngrok?
Ngrok a cross-platform application that allows developers to expose their local web servers to the internet
before we start, ensure you have:
Install termux in your device
create a ngrok account ngrok
Basic knowledge of terminal commands
Step1: Update and Upgrade Termux Packages
First, we need to update and upgrade the existing Termux packages to ensure we have the latest versions.
pkg update && pkg upgrade -y
Step2: Download Ngrok Latest Version
Go to ngrok download documentation download
Choose the ARM version of Linux and initiate the download.
Step3: Open downloaded file in termux
Open your file manager, locate the downloaded file, and click on it
Click the OPEN DIRECTORY button
Step4: Extract Ngrok
Open termux
If your downloaded file is in ZIP format, enter the following commands:
pkg install wget -y
unzip YOUR_FILE_NAME && mv ngrok ~
cd ..
If your downloaded file is in TGZ format, enter the following commands:
tar -xzvf YOUR_FILE_NAME && mv ngrok ~
cd ..
Step5: Add Ngrok Authtoken
Obtain the auth token as follows:
After obtaining the auth token, enter the following commands:
Ngrok needs to be configured with your authentication token.
./ngrok authtoken PAST_YOUR_AUTHTOKEN
Step6: Start Ngrok
Now, you can start using Ngrok to expose your local server. For example, to expose a local web server running on port 3000, use:
./ngrok http 3000
Top comments (0)