A web interface for managing Cloudflare Tunnel routes on OpenWrt routers.
- π Web UI Management - Manage Cloudflare Tunnel routes through LuCI web interface
- π Easy Configuration - Add, edit, and remove routes without SSH access
- π One-Click Apply - Generate config and restart cloudflared with a single button
- π Built-in Instructions - DNS setup guide included in the interface
- βοΈ UCI Integration - All settings stored in standard OpenWrt configuration
- OpenWrt 24.10 or newer
cloudflaredpackage installed- A configured Cloudflare Tunnel (see setup instructions below)
ssh [email protected]
opkg update
opkg install cloudflared- Go to https://one.dash.cloudflare.com
- Navigate to Networks β Tunnels
- Click Create a tunnel
- Choose Cloudflared tunnel type
- Name your tunnel and save the tunnel ID and credentials
Create the credentials file on your router:
mkdir -p /etc/cloudflared
cat > /etc/cloudflared/cert.json << 'EOF'
{
"AccountTag": "your_account_id",
"TunnelSecret": "your_tunnel_secret",
"TunnelID": "your_tunnel_id"
}
EOFReplace the values with your actual tunnel credentials from Cloudflare.
Download the latest release and install:
cd /tmp
wget https://github.com/Concept211/luci-app-cloudflared-manager/releases/download/v1.2.0/luci-app-cloudflared-manager_1.2.0_all.ipk
opkg install luci-app-cloudflared-manager_1.2.0_all.ipkOr install via LuCI:
- Go to System β Software
- Click Upload Package...
- Select the downloaded
.ipkfile - Click Upload
/etc/init.d/cloudflared enable
/etc/init.d/cloudflared start- Navigate to Services β Cloudflare Tunnel in LuCI
- Click Add to create a new route
- Enter:
- Hostname: Your full domain (e.g.,
app.example.com) - Service URL: Your internal service (e.g.,
http://192.168.1.100:8080)
- Hostname: Your full domain (e.g.,
- Click Save
- Click Apply & Restart Cloudflared
After adding a route, you must create a corresponding DNS record in Cloudflare:
- Go to your Cloudflare dashboard
- Select your domain
- Go to DNS β Records
- Click Add record:
- Type:
CNAME - Name: subdomain (e.g.,
appforapp.example.com) - Target:
YOUR_TUNNEL_ID.cfargotunnel.com - Proxy status: Proxied (orange cloud βοΈ)
- Type:
- Click Save
Your service should now be accessible at https://app.example.com!
Here's an example setup for multiple services:
| Hostname | Service URL | Description |
|---|---|---|
jellyfin.example.com |
http://192.168.1.100:8096 |
Jellyfin media server |
nas.example.com |
http://192.168.1.101:5000 |
NAS web interface |
home.example.com |
http://192.168.1.1 |
Router admin panel |
Make sure you click the "Apply & Restart Cloudflared" button after saving changes.
- Verify the DNS record is created in Cloudflare
- Check that the DNS record is Proxied (orange cloud)
- Verify cloudflared is running:
/etc/init.d/cloudflared status - Check logs:
logread | grep cloudflared
Clear browser cache and restart services:
rm -rf /tmp/luci-*
/etc/init.d/rpcd restart
/etc/init.d/uhttpd restartopkg remove luci-app-cloudflared-managerThis will remove the web interface but keep your cloudflared installation and configuration.
If you want to build the package yourself:
# Clone this repository
git clone https://github.com/yourusername/luci-app-cloudflared-manager
cd luci-app-cloudflared-manager
# Build package (requires OpenWrt build environment)
./build.shContributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
- Created by Concept211
- Built for OpenWrt
- Uses Cloudflare Tunnel (cloudflared)
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check existing issues for solutions
- Initial release
- Web UI for managing tunnel routes
- Automatic config generation
- UCI integration
- Built-in setup instructions
- cloudflared - Cloudflare Tunnel client
- OpenWrt - The Linux distribution for embedded devices

