Overview
These scripts install, configure and uninstall Cloudflare Tunnel on OpenWrt — on a Raspberry Pi, aarch64 routers such as the GL.iNet GL-MT6000, or x86_64 machines. They download cloudflared directly from GitHub and handle tunnel setup and service configuration.
What’s included
install-cloudflared.sh— downloads cloudflared, walks you through tunnel setup (locally managed or managed from the Cloudflare dashboard), creates the init.d service, installs an updater with an optional daily cron job, and adds a hook that restores everything after a firmware sysupgradeuninstall-cloudflared.sh— removes the service, binary, updater, configs, cron job and sysupgrade entries
Prerequisites
- OpenWrt 24.10+ (opkg) or 25.12+ (apk) on a supported device
- Root access and an internet connection