Guide · Home Assistant
Home Assistant in Docker: the container install, step by step
Home Assistant Docker is the "Container" install type: Home Assistant Core running as a single process inside one container, on a machine where you already manage the operating system. There is no supervisor, no app store and no operating system layer underneath. You get the same automations, dashboards and integrations, in a package you update with docker pull instead of an update button. If you want apps (add-ons), don't do this — the official docs say Container does not have access to them and point you at Home Assistant OS. If you already run Linux and want Home Assistant to be one more service in the stack, it is a short install with a few sharp edges covered below.
What you get, and what you give up
The installation page splits people three ways: buy a Home Assistant Green with the software preinstalled, flash Home Assistant OS onto your own Pi or x86-64 box (the docs recommend this for bring-your-own hardware), or "use a container or virtual machine". Container is the third path — aimed at hosts that already have Linux, macOS or Windows on them (Home Assistant installation docs, currently showing release 2026.11.0).
The trade is explicit in the docs: the Container install type "does not have access to apps". Apps are what Home Assistant now calls add-ons, and they are managed by the Supervisor, which only exists on Home Assistant OS and the supervised install. No Supervisor also means no one-click backups from the UI and no add-on store to pull ESPHome, Zigbee2MQTT or Mosquitto from.
In exchange you get a component you control: your own OS updates, your own reverse proxy, your own firewall, your own backup plan, and Home Assistant as one container among many. For someone already running Docker on a home server, that is usually the point.
Requirements
- An operating system you administer, plus a container runtime. The docs specify Docker Engine 23.0.0 or later.
- Not Docker Desktop. The docs state plainly: "Docker Desktop will not work; you must use Docker Engine." On a Mac or Windows machine that means a Linux VM, not Docker Desktop on the host.
- A directory on the host to hold the config. Everything that matters —
configuration.yaml, the SQLite recorder database, secrets — lives there.
All of this comes from Home Assistant's Linux/container installation page.
The official run command
This is the canonical command from the docs, unmodified apart from the two placeholders:
docker run -d \
--name homeassistant \
--privileged \
--restart=unless-stopped \
-e TZ=MY_TIME_ZONE \
-v /PATH_TO_YOUR_CONFIG:/config \
-v /run/dbus:/run/dbus:ro \
--network=host \
ghcr.io/home-assistant/home-assistant:stable
Line by line, because each flag is load-bearing:
--name homeassistant— stable handle fordocker restart,docker logsand the update steps later.--privileged— Home Assistant wants broad device access; the official command grants it.--restart=unless-stopped— comes back after a host reboot, stays down if you deliberately stopped it.-e TZ=...— timezone, so schedules fire at the right local time.-v /PATH_TO_YOUR_CONFIG:/config— your config directory, mapped to/configinside the container, which is where the app expects it (the image's workdir is/usr/src).-v /run/dbus:/run/dbus:ro— D-Bus, optional but required for the Bluetooth integration.--network=host— host networking, which the official command uses. Discovery (mDNS, SSDP) and the web UI then behave as if Home Assistant were installed natively.
The image itself comes from GHCR: ghcr.io/home-assistant/home-assistant:stable. Once it is up, the UI is at http://<host>:8123 (installation docs).
The compose equivalent
The docs publish a compose.yaml with the same intent. Its fields: container_name: homeassistant, image: "ghcr.io/home-assistant/home-assistant:stable", volume mappings for /PATH_TO_YOUR_CONFIG:/config, /etc/localtime:/etc/localtime:ro and /run/dbus:/run/dbus:ro, restart: unless-stopped, stop_grace_period: 60s, privileged: true, network_mode: host, and a TZ environment variable. Start it with docker compose up -d.
Note the one field the CLI version does not spell out: stop_grace_period: 60s. That is the fix for the most common first-week complaint, below.
Passing through a Zigbee or Z-Wave stick
A USB radio is not in the container unless you map it. On the command line:
--device /dev/ttyUSB0:/dev/ttyUSB0
Or in compose:
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
The user running the container needs read and write access to the /dev/tty* node. Do not run the radio over a network serial bridge or a VPN — the docs warn the serial link cannot cope with dropped packets. If the stick must sit away from the server, use a USB extension cable, not a network hop. Choosing a radio is a separate decision; the Zigbee hub guide covers coordinators, and the Z-Wave hub guide covers the other radio.
Updating
There is no in-app updater in a container. The docs give three steps: pull the same tag, stop and remove the container, re-run it.
docker pull ghcr.io/home-assistant/home-assistant:stable
docker stop homeassistant
docker rm homeassistant
# then re-run the docker run command
With compose it is docker compose pull then docker compose up -d. Your config is in the volume, so it survives the container swap. This is also the moment to add any flag you missed the first time — see the next section, because some settings are fixed at creation.
Gotchas that bite first installs
The stop timeout is too short
Docker's default stop timeout is 10 seconds, then SIGTERM becomes SIGKILL. Home Assistant often needs longer to close its SQLite recorder database. The symptoms in the docs are a log line about an "Ended unfinished session" and a warning that "The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly". The image itself allows 240 seconds of graceful stop (ENV S6_SERVICES_GRACETIME=240000 in the official Dockerfile); Docker's 10-second default is what cuts it short. Fix: --stop-timeout 60 on the CLI, or stop_grace_period: 60s in compose.
And the fix does not apply to an existing container
The timeout is baked in when the container is created. Restarting an existing container keeps the old value. You have to recreate it — docker compose up -d after editing the file, or docker rm and re-run.
jemalloc on large-page ARM hardware
jemalloc is enabled by default for memory use and Python speed. On hardware with a page size above 4K — some ARM64 SoCs — it fails at startup with <jemalloc>: Unsupported system page size. Disable it with -e DISABLE_JEMALLOC=true or DISABLE_JEMALLOC: true in compose.
No UI on the LAN
Modern distributions firewall the host by default. If http://<host>:8123 times out from another machine but works locally, open the port: sudo ufw allow 8123/tcp on Debian or Ubuntu.
docker exec is not a root shell
The image is built on an S6-overlay base: FROM ${BUILD_FROM}, a rootfs overlay copied in, Python dependencies installed with uv, labelled io.hass.type="core" under Apache-2.0 (Dockerfile). Because s6 is PID 1, docker exec drops you into a supervised environment rather than a plain shell. The supported way to change anything is to edit files in /config and restart Home Assistant — via Settings, System, the power icon, Restart; the homeassistant.restart action; or docker restart homeassistant.
What the image already includes
Two things surprise people who assume Container means a bare core. First, the image ships its own go2rtc binary, pinned at 1.9.15, so camera streaming works without an add-on. Second, the build is partly generated by hassfest (python3 -m script.hassfest -p docker), which keeps the container definition in step with core. Both from the official Dockerfile.
Which hardware
Container has no hardware requirement beyond "an OS you administer", so the question is what you already own. A Raspberry Pi running Raspberry Pi OS with Docker is the cheap path; an x86-64 mini PC is the faster one, and the usual pick once you add a few cameras or a large recorder database. If you are starting from a Pi, running Home Assistant on a Raspberry Pi covers the board-specific details; if you would rather not manage an OS at all, the Home Assistant Green ships with the software preinstalled and keeps the app store. There is no official minimum spec for the container itself beyond Docker Engine 23.0.0 and a host OS — anything more specific would be invented.
For a mini PC, the safe filter is RAM first and storage second, since the recorder database grows with every entity you keep history for. Browse mini PCs commonly used for Home Assistant on Amazon.
FAQ
Can I install add-ons (apps) in Home Assistant Container?
No. Home Assistant's installation docs state that the Container install type does not have access to apps (formerly called add-ons). If you want the app store, Home Assistant recommends Home Assistant OS instead.
Does Home Assistant Docker work on Docker Desktop for Mac or Windows?
No. The official docs are explicit: Docker Desktop will not work, you must use Docker Engine. That means a Linux host, or a Linux virtual machine.
How do I update Home Assistant when I run it in Docker?
Pull the same stable tag again, stop and remove the container, then start a new one from the updated image. With compose it is docker compose pull followed by docker compose up -d. Your config lives in the mounted /config volume, so it survives the swap.
How do I pass a Zigbee or Z-Wave USB stick into the Home Assistant container?
Map the device node into the container with --device /dev/ttyUSB0:/dev/ttyUSB0 on the command line, or a devices: list in compose. The user running the container needs read and write permission on that /dev/tty node.
Do I need a mini PC to run Home Assistant Docker, or will a Raspberry Pi do?
Either works, because Container needs an existing OS rather than specific hardware. Home Assistant's own docs recommend flashing Home Assistant OS onto your own hardware, and offer the container or virtual machine path for people who already run Linux, macOS or Windows hosts.
We publish a daily brief on Home Assistant, Matter and device releases. Read the latest.
- Primary sources
- Home Assistant container installation (Linux); Home Assistant installation index; Home Assistant core Dockerfile
As an Amazon Associate, HA News earns from qualifying purchases.