- No bandwidth limit
- Easy to start
- No account / access token requires
- Domain will be changes when process exited
Is have any solution of the Cons? Yes. We can fix the process exited issue And also the domain changed issue --requires to buy a domain
Installation
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
sudo dpkg -i cloudflared-linux-amd64.deb
sudo apt-get install -f
Is installed ?
cloudflared --version
cloudflared tunnel --url localhost:8008
NB: A serious note if your port is localhost:80
then please only use ``cloudflared tunnel --url localhost`
Now if I terminate the process from terminal then the domain will change again π
We will use a linux tool called nohup
that stands for no hangup
and it will solves us
nohup cloudflared tunnel --url localhost:8008 &
NB: The &
at the end of the command makes the process run in the background.
The nohup created a file called nohup.out
in your current directory where you get the cloudflared tunneling logs.
On nohup.out file you will find the tunneling domain also.
#all running processes and filters for cloudflared
ps aux | grep cloudflared
# only PID(s)
pgrep cloudflared
# now kill the pid
kill PID
# for force kill
kill -9 PID
- If you stop our computer or restart then the domain will change
Yes we have but we need a custom domain and that need to config with cloudflare. But I think this our solution is enough.
If you want to know more about the domain config related things, then go here
π Cloudflared Tunnel Script
Easily expose your local server to the internet using Cloudflare Tunnel.
This script supports Linux, macOS, and Windows (via Git Bash).
π Quick Start
Clone or download the script:
Run the script:
π‘ Notes
Use Git Bash to run the script.
Keep the terminal open as long as you want the tunnel/domain to remain active.
π Script Link:
cf-tunnel.sh on GitHub