Home Assistant + Google Assistant over Cloudflare tunnel - possible?

Im trying to set up up Home Assistant over a Cloudflare Tunnel (unsecured in the first place, planning to move to one with a policy in the end) and this works fine, I can get to it from the internet…

The problem is that every time I route the traffic through the Cloudflare tunnel it break my integration with Google Assistant, so Google assistant can no longer control my Home Assistant…

Have other been able to use Cloudflare Tunnel AND still use their Google Home integration (Not Nabu Casa) to control Home Assistant?

I use a Cloudflare tunnel with a custom domain to connect to my home assistant, and I can control my ha using Google Home app and also my Google Nest speaker. Sometimes can have some delay but overal works great

Great… Would you mind sharing the settings you have for your tunnel? A “normal” tunnel with no policy doesnt work for me (ie, it should route without any restrictions). As soon as I route the traffic through the tunnel the Google Home app on my phone looses connection with the HA sensors and if I try to reconnect it fails when rendering the login screen.

(I’ve got a custom domain too, so our setup seems to be similar)

Edit: Actually, my setup isnt straight forward, as the flow is as follows:

Cloudflare Tunnel → Traefik (machine A) → Home Assistant (machine B)

My configuration its really simple


Probably the problem comes when google tries to authenticate, Trafeik redirections? Some modification in the headers?

Yes you are correct. It does on the oauth with Google - and it happens when going through Traefik.

I’ve set up another tunnel directly to the machine hosting HA (and no reverse proxy) and it works fine.

Thanks for your response. :+1:t2:

1 Like