Hi, I’m running Home Assistant in Docker - and having trouble enabling remote access via my Traefik reverse proxy.
When visiting hass.example.com - I get a gateway timeout.
- I’m successfully using Traefik with other containers on my traefik docker network - but the Home Assistant container is on the host network.
- The ‘homeassistant’ HTTP rotuer and service are showing as successful in my Traefik dashboard
Very grateful for any help - thanks!
compose.yaml extract:
homeassistant:
container_name: homeassistant
image: ghcr.io/home-assistant/home-assistant:stable
restart: unless-stopped
network_mode: host
volumes:
- $DOCKERDIR/homeassistant:/config
environment:
- PUID=$PUID
- PGID=$PGID
- TZ=$TZ
app-homeassitant.yaml:
http:
routers:
homeassistant-rtr:
rule: "Host(`hass.example.com`)"
entryPoints:
- https
middlewares:
- chain-oauth
service: homeassistant-svc
tls:
certResolver: dns-cloudflare
services:
homeassistant-svc:
loadBalancer:
servers:
- url: "http://192.168.86.114:8123"
Home Assistant configuration.yaml extract:
http:
use_x_forwarded_for: true
trusted_proxies:
- 127.0.0.1
- 192.168.86.114 # Server IP
- 172.18.0.0/16 # traefik proxy subnet