Cloudflared¶
Cloudflared creates secure tunnels to expose your local services to the internet without opening ports on your router.
Package Information¶
| Property | Value |
|---|---|
| Package Name | cloudflared |
| Upstream | developers.cloudflare.com/cloudflare-one/connections/connect-networks/ |
| License | Apache-2.0 |
Prerequisites¶
- Cloudflare account (free tier available)
- Domain managed by Cloudflare DNS
Installation¶
Method 1: Token-based (Simpler)¶
- Follow the Cloudflare Tunnel Setup Guide steps 1.1–1.5
- Copy the provided command (e.g.
cloudflared.exe service install <token>) - Extract only the token part (the long alphanumeric string after
install) - Install cloudflared from Package Center
- Paste the token when prompted during installation
Method 2: Certificate-based¶
- Install cloudflared from Package Center
- Authenticate with Cloudflare:
- Create a tunnel:
- Configure
/var/packages/cloudflared/var/config.yml: - Configure DNS routing:
Service Management¶
- Start: Package Center or
synopkg start cloudflared - Stop: Package Center or
synopkg stop cloudflared - Logs:
/var/packages/cloudflared/var/log/
Troubleshooting¶
Tunnel Not Connecting¶
- Verify your Cloudflare token is correct (alphanumeric, no newlines or spaces)
- Check DNS routing is configured
- Review logs in
/var/packages/cloudflared/var/log/ - Try reinstalling with Erase all of the package data files checked
Service Stops Unexpectedly¶
The service may be killed by the OOM (Out of Memory) killer under low memory conditions. Options:
- Monitor memory usage and disable unneeded services
- Add a scheduled task to restart the service periodically:
Client Shows as Outdated¶
Cloudflare supports the previous year of cloudflared releases — the tunnel will continue working even if the version is not the latest. Updates are published when meaningful changes occur.
Related Packages¶
- Vaultwarden - Common use case for tunnels
- Home Assistant - Remote access via tunnel