Files
vanlink/ha/homeassistant.container
T
Andreas WredeandClaude Fable 5 3add42a0cb ha: replace the HAOS VM with a native Podman Quadlet container
The fixed 2 GiB ha_van allocation starved the 4 GB Pi. HA Container now
runs on the host network (http://10.42.0.1:8123): ha/homeassistant.container
installs to /etc/containers/systemd/, config in /srv/homeassistant, host
D-Bus mounted for onboard Bluetooth (needs apparmor=unconfined — Ubuntu's
dbus-daemon mediates per AppArmor label and denies AddMatch to BlueZ —
plus NET_ADMIN/NET_RAW for habluetooth adapter recovery).

Drop the VM-era plumbing: the 10.42.0.50 dhcp-host pin becomes a
host-record for 10.42.0.1, and the legacy-URL DNAT + hairpin masquerade
go away entirely. ha_van.xml retired to git history.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 15:46:30 -04:00

35 lines
1.3 KiB
INI

# Home Assistant Container as a Podman Quadlet (replaced the ha_van HAOS VM
# 2026-07-07 — the fixed 2 GiB VM allocation starved the 4 GB Pi; VM domain XML
# is in git history under ha/ha_van.xml). Installed by deploy.sh to
# /etc/containers/systemd/; systemd generates homeassistant.service from it.
#
# Host networking: HA binds :8123 on the host directly, so the LAN URL is
# http://10.42.0.1:8123 (name: homeassistant) — no bridge port, no DNAT.
# /run/dbus gives HA the host BlueZ stack = the Pi's onboard Bluetooth (hci0).
[Unit]
Description=Home Assistant (Podman container)
Wants=network-online.target bluetooth.service
After=network-online.target bluetooth.service
[Container]
Image=ghcr.io/home-assistant/home-assistant:stable
ContainerName=homeassistant
Network=host
Volume=/srv/homeassistant:/config
Volume=/run/dbus:/run/dbus:ro
Environment=TZ=America/Toronto
# Bluetooth needs two escapes: Ubuntu's dbus-daemon mediates D-Bus per
# AppArmor label and the default containers profile can't send to BlueZ
# (AddMatch denied), and habluetooth wants NET_ADMIN+NET_RAW for adapter
# recovery. HA is rootful + host-net anyway.
PodmanArgs=--security-opt apparmor=unconfined
AddCapability=NET_ADMIN NET_RAW
[Service]
Restart=always
# First start pulls the image (~600 MB) — allow for a slow uplink.
TimeoutStartSec=900
[Install]
WantedBy=multi-user.target