New Add-on: Cloudflare Tunnel Client - Secure Remote Access made simple!
Hello Home Assistant community!
Iām excited to share a new add-on that makes setting up secure remote access to your Home Assistant instance, and, in general your home servers, incredibly simple using Cloudflare Tunnels!
What is it?
This add-on provides a simple, maintenance-free way to run a Cloudflare Tunnel client (formerly Argo Tunnel) directly in Home Assistant. No more port forwarding, no more complex network configurations, and most importantly - no more exposing your home network to the internet!
Key Features
Zero port forwarding required
End-to-end encryption
Simple one-token configuration
Leverage on add-onsā automatic startup and watchdog capabilities
Focused on security and simplicity
Uses Cloudflareās free tunnel service
Why I Created This Add-on
Iāve been using Cloudflare Tunnels to securely publish my websites without opening any ports on my home router, taking advantage of Cloudflareās robust DDoS protection and security features. I wanted to simplify my home network setup by hosting the tunnel directly within Home Assistant, leveraging its built-in features like:
Automatic updates
Watchdog monitoring
Simple configuration
Easy maintenance
Perfect For You Ifā¦
Youāre looking to:
Avoid opening ports on your router
Get enterprise-grade DDoS protection for free
Simplify your remote access setup
Enhance your Home Assistant security
Reduce maintenance overhead
Getting Started
Itās really this simple:
Add my repository to your Home Assistant add-on store:
Hi, yes itās free - by the way, Iām a NabuCasa subscriber too. Actually itās not so much about exposing Home Assistant, I agree that NabuCasa works and is more ānativeā to Home Assistant: itās more about exposing your (possible) others services you host.
The main reasons I adopted Cloudflare Tunnel are:
To me, Cloudflare Tunnel just āworksā, while NabuCasa continuously gives me network errors, even if I reviewed and tried every configuration set I could figure out.
I cannot say about security: Cloudflare is maybe the worldās biggest provider so I can easily trust it, but I assume that NabuCasa is leveraging on similar secure technologies (or even the very same )
With Cloudflare Tunnel you do have a specific URL, but using a custom domain that you must already own. In other words, if youāre the owner of the domain my-lovely-home.com you could setup in seconds the URL homeassistant.my-lovely-home.com or, if you prefer, my-lovely-home.com/homeassistant
The main reason is that with Cloudflare I could expose the others services I host in my Home network, e.g. a multimedia server (I use Plex), a NAS console, a self-hosted website, etc. It takes 1 minute to configure this, without touching anything in my home router configuration, and everything is managed in a single place (the Cloudflare dashboard).
With Cloudflare Tunnel I can configure easily but in details the routes to my servers. For instance, I can change the target IP or port, or switch protocol (HTTP, HTTPS, UDP, etc.) between the local tunnel client and the local server (the connection between the tunnel client and the Internet is always secured). So itās very flexible if I move something, and configuration changes are immediately effective, even without restarting anything. To give you an idea, Iāve:
www.my-lovely-home.com pointing to 192.168.0.123:443/mywebsite
plex.my-lovely-home.com pointing to 192.168.0.123:32400
nas.my-lovely-home.com pointing to 192.168.0.123:8081
ha.my-lovely-home.com pointing to 192.168.0.99:8123.
In sum, if you are interested in Home Assistant only, I would recommend NabuCasa; if instead you host several services, Cloudflare Tunnel is great.
Hi @matrover, thanks for pointing out! Actually I wasnāt aware of the existing addon.
In theory, I would say that the addon you mentioned is better, because it covers a broader set of options and use cases⦠the only problem is that in my use case (a Cloudflare Tunnel managed remotely from the Cloudflared Dashboard) it doesnāt work properly
Iāll raise an issue on that repository, in the meantime I see two main reasons to use mine:
Surprisingly straightforward getting the add-on to work if your already familiar with CF and /or their ZTNA. Would be nice if the add-on updated automatically though as the 2024.11.0 version is out of date and displaying the warning triangle in the CF dashboard.
Very simple to implement tunnel.
Occasionally hangs and needs to be restarted. Is there no watchdog option?
I keep parallel Ziertier vpn tunnel available so I can get into HA from the outside and restart the Cloudflare add-on.
For me this is not working. I thought perhaps this plugin would handle the ātrusted proxiesā IP range?
I can get this working if my tunnel passes the request through to an nginx reverse proxy manager first and that is listed in my trusted proxies, but I was hoping to be able to pass the tunnel directly through to HA.
Is there something Iām missing?
LOL. Iāve got it, I just needed to add Home Assistantās own IP address to the list of trusted proxies and it works fine.
Thanks for putting this add-on together for us @fredericks