I am running Home Assistant in a Docker container on a Raspberry Pi 4. I am trying to use a Cloudflare Tunnel I set up to access my instance from a custom domain home-assistant.mydomain.com.
Since I couldn’t get a Cloudflared Docker image to work on my Raspberry Pi 4, I set up the tunnel using the Cloudflare CLI.
I also created a public hostname to be accessed via this tunnel: home-assistant.mydomain.com
exactly. If you installed cloudflared somehow and somewhere different, you need to adapt trusted_proxies to fit your environment. I guess the 400 error will be logged with the proxy IP on HA Core, did you check the logs for a corresponding entry?
May I ask why the Cloudflare Add-on is not working for you? Maybe you can outline which parts of the documentation are not detailed enough so we can improve this parts.
I am using Home Assistant Container on a Raspberry Pi 4.
I know that we can’t use addons with Home Home Assistant Container as I am hosting a couple of other applications on the Pi. Is there a way to use the Cloudflare Add-on with Home Assistant Container?
I needed an armv7 image of Cloudflared for my Pi. Found this Docker image but I got stuck not understanding how to configure the tunnels properly. Any help with some steps here would be appreciated.
Logger: homeassistant.components.http.forwarded
Source: components/http/forwarded.py:123
Integration: HTTP (documentation, issues)
First occurred: 3:37:51 PM (2 occurrences)
Last logged: 3:37:51 PM
Received X-Forwarded-For header from an untrusted proxy [MY IP ADDRESS]
I’ve got this same issue as originally described. I’m running HA in Docker on a Synology NAS and have setup Cloudflared similarly. I get the exact same 400 error (formatting wise and all).
I have (already had) the http integration exactly as you have it… but no cigars for me so I’m not sure its the solution. Was there anything else you did?
It suddenly works when I wake up today. I did nothing and simply keeps the setting in config.yaml.
Exactly same issue here.
Before I add the aforesaid http integration, I got a 400 error and HA logged the follows:
Logger: homeassistant.components.http.forwarded
Source: components/http/forwarded.py:114
Integration: HTTP (documentation, issues)
First occurred: 02:21:00 (1 occurrences)
Last logged: 02:21:00
A request from a reverse proxy was received from 10.0.3.2, but your HTTP integration is not set-up for reverse proxies
!See next comment for Zero Trust Dashboard based configuration!
@wwwescape - Did you manage to get the docker image working? Thanks to your tip I managed to get it working. I tried the zero trust dashboard way of configuring first but when that didn’t work I created a named tunnel using CLI and then used that as the config for the docker image. I think it should work with the zero trust way as well but didn’t have time to try again. Here’s what I did
On a separate machine (I am running Pi 3 so I couldn’t run CLI on the PI), installed CLI and created a tunnel
Note: mytunnel is the name I used for the tunnel. This can be anything.
The login command creates a cert.pem and the create command creates a tunnel and installs a tunnel credentials file locally.
Copied the cert.pem and the tunnel credentials file to the pi into a folder (this folder will be mapped to a docker volume). Folder Name I used: cloudflared
i’m using this successfully, and also have an Cloudflare Access profile that restricts access to my email address. Trying to figure out how I can securely allow Smartthings to access the webhook without opening it up beyond that