Installing Cloudflared in Termux for Android (ngrok Alternative) – 2026
Updated Repository Link
https://github.com/rajbhx/cloudflared-termux
What Is Cloudflare?
Cloudflare, Inc. is an American content delivery network (CDN) and DDoS protection company founded in 2010. It works as a reverse proxy between visitors and the hosting provider, improving security, performance, and reliability.
Basic Usage
Once installed, Cloudflared can expose a local service to the internet.
cloudflared -url localhost:PORT
Example:
cloudflared -url localhost:8000
Alternative command:
cloudflared tunnel localhost:PORT
Installation
Make sure your Termux app is fully updated before proceeding.
Installation Commands
Follow the steps below to install Cloudflared using the rajbhx/cloudflared-termux script.
1. Update Termux and install Git
pkg update && pkg upgrade
pkg install git
2. Clone the Cloudflared Termux repository
git clone https://github.com/rajbhx/cloudflared-termux
3. Enter the directory
cd cloudflared-termux
4. Make the installer executable
chmod +x Cloudflared-termux_@rajbhx.sh
5. Run the installer
bash Cloudflared-termux_@rajbhx.sh
After installation completes, cloudflared will be available globally in Termux.
Notes
- Always review scripts before running them
- Cloudflared is a reliable alternative to ngrok
- Useful for local web servers, APIs, and testing
Bye 👋