JRehkemper.de

Run Home Assistant behind a Reverse Proxy

If you run HomeAssistant behind a reverse proxy like treafik you will likely get the following error message:

2024-02-12 17:56:44.929 ERROR (MainThread) [homeassistant.components.http.forwarded] A request from a reverse proxy was received from 172.18.0.5, but your HTTP integration is not set-up for reverse proxies

To fix this, we need to change the homeassistant configuration.

Go into your configuration folder and edit configuration.yaml. You need to add these parameters to the http block.

http:
	use_x_forwarded_for: true
	trusted_proxies: 172.0.0.0/8

You can either define the ip of your reverse proxy or allow the whole subnet.

After that restart homeassistant and you should be able to login.

profile picture of the author

Jannik Rehkemper

I'm an professional Linux Administrator and Hobby Programmer. My training as an IT-Professional started in 2019 and ended in 2022. Since 2023 I'm working as an Linux Administrator.