Remote Access
“I give myself very good advice, but I very seldom follow it.”  ~  Alice 


Remote access to Home Assistant is required if you would like the Google Home integration to "see" devices that HA controls. It is of course also required if you need to see what's going on at home while you're away. You would also need a Dynamic DNS client to know the current internet address of your home network (unless you use Cloudflare Tunnels). 

While the most common method of remote access is opening ports in your firewall, it is also the most dangerous. For your security, there are only two rules: 


So how the hell do I access my Home Assistant instance remotely?


Introducing Cloudflare Tunnels. Cloudflare offers a free service that creates an encrypted "tunnel" from the Internet to Home Assistant (or any other application on your network). 

Cloudflare requires that you own an internet domain name that you can access and point the domain's DNS servers to servers owned by Cloudflare. Cloudflare sells domain names at cost and if you buy from them, they will automatically configure the DNS server addresses for you. I chose to keep my tunnels in a separate, obscure .ORG domain rather than using this primary domain. The .ORG domains are  cost-effective at around $10 per year. 

Cloudflare needs a cloudflared service (cloudflared = Cloudflare Daemon) running on your home network. It is open source and free. cloudflared can run as an integration on the Home Assistant machine if that's the only machine you have that runs 24/7. I run my daemon in a Docker container on my NAS which also runs 24/7. You have the option to run the service  on these platforms: