Johannes Olzem Johannes Olzem

HomeAssistant not connecting over reverse proxy


Make sure you have enabled Websockets Supports or similar functionality in your reverse proxy client.

If you are getting a 400 Bad Request error, find the HomeAssistant log file and look for the following error message:
A request from a reverse proxy was received from 12.34.56.78, but your HTTP integration is not set-up for reverse proxies

In your configuration.yaml file, add the following lines:

http:
use_x_forwarded_for: true
trusted_proxies:
- 12.34.56.78 # The IP address from the error message

Explanation

HomeAssistant uses websockets to communicate with the browser.

If you are using a reverse proxy, the IP address of the incoming connection is not trusted and gets rejected by HomeAssistant.