https://www.home-assistant.io/docs/ecosystem/nginx/
Configuration.yaml:
http: base_url: https://domain use_x_forwarded_for: true trusted_proxies: - 127.0.0.1 - 192.168.1.0/24
websockets-proxy.conf:
cat << 'EOF' >homeassistant.conf proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; EOF
site.conf:
location / { proxy_pass http://localhost:8123/; include /etc/nginx/homeassistant.conf; } location /api/websocket { proxy_pass http://localhost:8123/; include /etc/nginx/homeassistant.conf; }