Cloudflared is the official command-line tool from Cloudflare that lets you securely connect your device to Cloudflare’s global network. It can create secure tunnels, expose local web servers to the internet, authenticate with Cloudflare services, and help developers test and share local applications from the terminal.
Features of Cloudflared tool:
- Create secure Cloudflare Tunnels for local applications.
- Expose local web servers to the internet with a public URL.
- No port forwarding or firewall configuration required.
- Connect to Cloudflare’s global network from the terminal.
- Manage Cloudflare Tunnel and Access commands.
- Lightweight, fast, and easy to install in Termux.
- Free to use for testing, development, and learning purposes.
Install Cloudflare
Below are the simple commands to install Cloudflared in Termux. Run each command one by one to complete the installation.
Update Termux packages.
pkg update && pkg upgrade -y
Install Cloudflared.
pkg install cloudflared -y
Verify the installation.
cloudflared --version
Cloudflared is now installed and ready to use.
Use Cloudflared in Termux
After installing Cloudflared, you first need to start a local web server using Python or any other web server running on your preferred port.
Install Python.
pkg install python -y
Start a simple local web server on port 4040.
python -m http.server 4040
Open a new Termux session and create a Cloudflare Tunnel.
cloudflared tunnel --url http://localhost:4040
Press CTRL + C to stop the tunnel.
Login to your Cloudflared account (optional).
cloudflared tunnel login
Display the Cloudflared help menu.
cloudflared -h
Display the installed version.
cloudflared version
Update Cloudflared.
cloudflared update
Use the Tunnel command.
cloudflared tunnel
Use the Access command.
cloudflared access
When you create a tunnel, Cloudflared generates a public trycloudflare.com URL that securely forwards requests to your local web server. Anyone with the generated URL can access the local server while the tunnel is running.
Cloudflared Overview
Cloudflared is a simple and useful tool for creating secure tunnels from the terminal. It lets you share local web servers with a public URL, it is easy to test websites and learn Cloudflare Tunnel features from Termux.



