# Verified compose for Home Assistant, tested 2026-10-21 by the SelfHostBench lab (3 runs; the figures are the median). # Lab host: AMD EPYC 9V45 96-Core Processor, 2 vCPU, 7.7 GiB RAM, x86_64, Docker 28.0.4. # Floating image tags below were replaced by the version resolved at test time; # the registry digest is in the comment on each image line. # Measurements: home-assistant.json (schema 3). # Home Assistant Container (official image), as in the "Linux" install page of the Home Assistant docs, Docker Compose tab: # https://www.home-assistant.io/installation/linux/ # Differences from that example, all marked below: a named volume for /config instead of a folder path, no container_name, # no /run/dbus mount (it is only needed for the Bluetooth integration), and a pinned version instead of `stable`. # There is no TLS in this file. Put a reverse proxy in front before you expose it (see the article). name: home-assistant services: homeassistant: # Pin a release tag. `stable` follows every monthly release (2026.9 -> 2026.10 ...), so a `docker compose pull` can move you a whole release. image: ghcr.io/home-assistant/home-assistant:2026.10.2 # sha256:33afb0659d786213264c2211f8d91c5fe87461c56eba6a3a546eb05fc71e89f4 (version 2026.10.2, from label:org.opencontainers.image.version) restart: unless-stopped # From the docs: "Home Assistant can need longer than [10 s] to close its database". Without this, Docker kills it after # 10 s and the next start can log "The system could not validate that the sqlite3 database ... was shutdown cleanly". stop_grace_period: 60s # The docs' compose file and docker run command both set this. It gives the container every host device and all capabilities. # We kept it as documented. In our lab, onboarding and the demo integration ran the same without it; USB radios and Bluetooth # were not tested either way (see the article). privileged: true # The container shares the host's network stack, so there is no `ports:` (it would be ignored). Web UI on host port 8123. # Discovery protocols such as mDNS (Zeroconf) and SSDP look for devices on the local network. Not tested in our lab (no LAN devices). network_mode: host environment: # Your time zone, a tz database name (docs: "TZ=America/Los_Angeles"). Used for automations and the history. TZ: America/New_York volumes: # Settings, users, automations, the recorder database (home-assistant_v2.db) and the backups Home Assistant creates (/config/backups). # This is your install: back it up, and keep a copy of the backups somewhere else. # The docs use a folder path here (/PATH_TO_YOUR_CONFIG:/config). A named volume keeps this file free of host paths. - config:/config - /etc/localtime:/etc/localtime:ro # The image has no HEALTHCHECK. The lab waits for the web server to answer on http://localhost:8123. volumes: config: