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://<host>: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 <noreply@anthropic.com>
This commit is contained in:
padriano 2026-06-23 09:11:33 +01:00
parent b896bfcb79
commit fc6d15881d
2 changed files with 6 additions and 3 deletions

View file

@ -147,7 +147,8 @@ docker inspect forgejo
### homeassistant ### homeassistant
- Config stored at `/home/padriano/projects/ha/config` - 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 - 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 - `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 - Has a healthcheck — status shows `(health: starting)` for ~60s on first boot

View file

@ -18,8 +18,10 @@ services:
image: homeassistant/home-assistant:2026.5.4 image: homeassistant/home-assistant:2026.5.4
container_name: homeassistant container_name: homeassistant
restart: unless-stopped restart: unless-stopped
ports: # No host port mapping for 8123: with the container on a macvlan network,
- "8123:8123" # 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: networks:
internal: internal:
macvlan_lan: macvlan_lan: