When to use this stack
Home Assistant is an open-source home automation platform. It connects lights, sensors, plugs, thermostats and cameras from many brands, runs automations and dashboards locally, and keeps working when the internet is down. This stack runs the official container image pinned to the 2026.10.0 release, stores the configuration in a named volume so that updates do not overwrite your automations, and sets the time zone so that schedules and history graphs use local time. The web interface is bound to 127.0.0.1, which lets you choose later between a reverse proxy and a VPN for remote access.
Use this stack when you want a local hub on a home server, mini PC or Raspberry Pi running Linux, and you are comfortable editing YAML files for advanced automations. Do not use it when you expect a plug-and-play appliance with no maintenance, because you still need to update, back up and monitor the system. Do not use it on a Windows or macOS host if your devices depend on multicast discovery or USB radios, because Docker Desktop runs containers inside a virtual machine that makes these devices hard to reach. In that case, install Home Assistant on the host OS or on a dedicated Linux machine.
docker-compose.yml
services:
homeassistant:
image: ghcr.io/home-assistant/home-assistant:2026.10.0
restart: unless-stopped
environment:
TZ: ${TZ}
ports:
- "127.0.0.1:8123:8123"
volumes:
- ha_config:/config
volumes:
ha_config:TZ=Europe/Madrid.env
TZ=Europe/MadridStart and verify
# 1. Validate the compose file
docker compose config --quiet
# 2. Start Home Assistant in the background
docker compose up -d
# 3. The container should show "Up" and stay up after the first start
docker compose ps
# 4. Follow the log until the core reports that startup is complete
docker compose logs -f homeassistant
# 5. Web interface through the loopback port (expected: 200 once the server answers)
curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:8123/Open http://127.0.0.1:8123 on the host and create the owner account in the onboarding wizard. Home Assistant creates configuration.yaml and its databases in the ha_config volume during this first start.
Production checklist
- Put Home Assistant behind a reverse proxy with HTTPS, and keep the loopback binding so the raw port is not reachable from the network.
- Add the proxy address to the http section of configuration.yaml with use_x_forwarded_for and trusted_proxies, so client addresses are logged and login protection works.
- Enable two-factor authentication for every user account in the profile settings.
- Create automatic backups from the Settings section and copy them off the server, because the backup files are the only full copy of your setup.
- Keep the image tag pinned and update deliberately, reading the release notes for breaking changes in integrations.
- Do not expose long-lived access tokens in scripts that are stored in shared repositories.
- Keep the host firewall closed to ports you do not use, and never open port 8123 directly to the internet.
- Restrict physical and SSH access to the host, because anyone with Docker access can read the configuration volume.
Common problems
- Symptom: the log says “Received X-Forwarded-For header from an untrusted proxy” and login through the proxy fails. Cause: the reverse proxy address is not listed under trusted_proxies. Fix: add the proxy’s IP or network to configuration.yaml under the http key and restart the container.
- Symptom: devices such as Chromecast or some smart bulbs never show up in discovery. Cause: the bridge network does not forward multicast discovery traffic. Fix: use network_mode: host on a Linux host, as described in the Variations section, and remove the ports block in that case.
- Symptom: times in history and automations are off by hours. Cause: TZ is missing or wrong. Fix: set TZ to your region, for example Europe/Madrid, and recreate the container with docker compose up -d.
- Symptom: the container keeps restarting after an edit to configuration.yaml. Cause: the YAML is invalid. Fix: open the log, correct the indentation or the reported key, then restart the container. Use the configuration check in the Home Assistant interface before restarting.
- Symptom: a USB radio such as a Zigbee coordinator is not found. Cause: the device is not passed into the container. Fix: add the device path, such as /dev/ttyUSB0, under devices in the compose file, and identify the right path with ls -l /dev/serial/by-id on the host.
Variations
- Host networking on Linux: replace the ports block with network_mode: host. The web interface then listens on port 8123 of the host directly, and local discovery works. Remember that the loopback restriction no longer applies in this mode, so use the host firewall to limit access.
- USB radio devices: add a devices entry that maps the USB stick into the container, for example /dev/serial/by-id/your-device:/dev/ttyUSB0, and configure the integration to use that path. Keep the device mapping on a stable by-id path so that it does not change after a reboot.
- Supervised installation: the Home Assistant project also offers a supervised or appliance installation that bundles add-ons, which this container does not provide. Use it when you need add-ons such as the MQTT broker managed for you.
Questions
Do I need a database for Home Assistant?
No. Home Assistant stores its history and configuration in SQLite files inside the config volume by default. A separate database is only needed for very large recorder histories.
Why are my devices not discovered?
Automatic discovery uses multicast traffic, which a bridge network does not forward to the container. On Linux, network_mode host usually fixes discovery, as described in the Variations section.
How do I reach Home Assistant from outside my home?
Use a reverse proxy with HTTPS, or a VPN such as WireGuard. Do not forward the raw port 8123 from your router to the internet.
Adapt this stack
Load these files into the builder to rename services, change ports, add a cache or a proxy, and generate fresh passwords for the .env.
Open in builderRelated stacks
n8n Workflow Automation with PostgreSQL
Self-host n8n 2.48 with PostgreSQL 16 in Docker Compose: encrypted credentials, database healthcheck, loopback-only port and a production checklist.
Nextcloud + MariaDB + Redis File Sync
Self-host Nextcloud with MariaDB 11.4 and Redis in Docker Compose. Pinned tags, database healthcheck, memory cache and the production steps for HTTPS and cron.
Ollama + Open WebUI Local AI Chat
Run local AI models with Ollama and a chat interface with Open WebUI in Docker Compose. Pinned images, a health check, loopback-only access and RAM guidance.
Paperless-ngx with PostgreSQL and Redis
Run Paperless-ngx 2.20 document archive with PostgreSQL 16 and Redis in Docker Compose. OCR language setup, loopback-only port, backups and a consume folder.
Browse more Automation, AI & Self-Hosted stacks or the full library.