-
Notifications
You must be signed in to change notification settings - Fork 64
Install Cloudflared Tunnel (DoH)
Contains the command-line client for Cloudflare Tunnel, a tunneling daemon that proxies traffic from the Cloudflare network to your origins. This daemon sits between Cloudflare network and your origin (e.g. a webserver). Cloudflare attracts client requests and sends them to you via this daemon, without requiring you to poke holes on your firewall --- your origin can remain as closed as possible
(Currently using package for arm platforms. If using amd or a other platform, please download correct package)
(Check: dpkg --print-architecture)
For 32bit OS
Download Cloudflared ARM 32bit:
Go to https://github.com/cloudflare/cloudflared/releases , right click on cloudflared-linux-arm and copy link. In terminal type "wget copiedlink" . For example:
wget https://github.com/cloudflare/cloudflared/releases/download/2021.12.4/cloudflared-linux-armRename and copy the cloudflared file to /usr/local/bin/ and update permissions:
sudo cp cloudflared-linux-arm /usr/local/bin/cloudflared && sudo chmod +x /usr/local/bin/cloudflaredFor 64bit OS
Download Cloudflared ARM 64bit:
Go to https://github.com/cloudflare/cloudflared/releases , right click on cloudflared-linux-arm64 and copy link. In terminal type "wget copiedlink" . For example :
wget https://github.com/cloudflare/cloudflared/releases/download/2021.3.0/cloudflared-linux-arm64Rename and copy the cloudflared file to /usr/local/bin/ and update permissions:
sudo cp cloudflared-linux-arm64 /usr/local/bin/cloudflared && sudo chmod +x /usr/local/bin/cloudflaredCheck version (after installing Cloudflared 64bit or 32bit):
cloudflared -v

Add user:
sudo useradd -s /usr/sbin/nologin -r -M cloudflaredDownload and save the cloudflared config file to /etc/default:
cd /etc/default && sudo wget https://raw.githubusercontent.com/trinib/Adguard-Wireguard-Unbound-Cloudflare/main/cloudflaredSet correct permissions:
sudo chown cloudflared:cloudflared /etc/default/cloudflared && sudo chown cloudflared:cloudflared /usr/local/bin/cloudflaredDownload the cloudflared service file and save it to /lib/systemd/system:
cd /lib/systemd/system && sudo wget https://raw.githubusercontent.com/trinib/Adguard-Wireguard-Unbound-Cloudflare/main/cloudflared.service && cd $h- Choose DNS provider[click here]
Enable the systemd service to run on startup, then start the service:
sudo systemctl enable cloudflared && sudo systemctl start cloudflaredCheck status:
sudo systemctl status cloudflared

ctrl + c to exit status window
Important
The cloudflared tool will not receive updates through the package manager. However, you should keep the program update to date. You can either do this manually, or automatically with cron script.
Open cron file:
crontab -ePaste command at end of file:
0 3 * * FRI sudo cloudflared update && sudo systemctl restart cloudflaredWill run at 3am every Friday.
