From fc6d15881d82c8826cfb96c541a033c7ac180adc Mon Sep 17 00:00:00 2001 From: padriano Date: Tue, 23 Jun 2026 09:11:33 +0100 Subject: [PATCH] fix: drop unreachable 8123 host port mapping for home assistant On a macvlan network a published port DNATs to the macvlan IP, which the host cannot reach, so http://:8123 never worked. Remove the dead mapping; LAN access is direct via http://192.168.1.246:8123 and external access is via Caddy. Update README LAN URL accordingly. Co-Authored-By: Claude Opus 4.8 --- README.md | 3 ++- docker-compose.yml | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e389c9b..4bd9f76 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,8 @@ docker inspect forgejo ### homeassistant - Config stored at `/home/padriano/projects/ha/config` -- Web UI: `https://ha-padriano.duckdns.org` (via Caddy) or `http://server:8123` on the LAN +- Web UI: `https://ha-padriano.duckdns.org` (via Caddy) or `http://192.168.1.246:8123` (direct to the macvlan IP) on the LAN +- No host port is published for `8123` — on a macvlan network a published port DNATs to the macvlan IP, which the host itself cannot reach. Use the macvlan IP directly on the LAN, or Caddy externally - Runs on the `internal` bridge network so Caddy can reach it by container name - `configuration.yaml` must include `http.use_x_forwarded_for: true` and `trusted_proxies` for the Docker bridge range so HA accepts forwarded headers from Caddy - Has a healthcheck — status shows `(health: starting)` for ~60s on first boot diff --git a/docker-compose.yml b/docker-compose.yml index 6ff4e7e..37e8e92 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,8 +18,10 @@ services: image: homeassistant/home-assistant:2026.5.4 container_name: homeassistant restart: unless-stopped - ports: - - "8123:8123" + # No host port mapping for 8123: with the container on a macvlan network, + # a published port DNATs to the macvlan IP, which the host cannot reach. + # LAN access is direct via the macvlan IP (http://192.168.1.246:8123); + # external access is via Caddy (https://ha-padriano.duckdns.org). networks: internal: macvlan_lan: