Welcome to the ultimate guide on setting up Home Assistant using Docker Compose. Deploy Home Assistant Core via Docker Compose with host network mode for optimal smart home integration.
Why Use This Setup?
Using Docker Compose ensures that your Home Assistant deployment is reproducible, easy to update, and perfectly isolated from your host system.
The docker-compose.yml
Copy the following highly optimized configuration:
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /path/to/data:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
restart: unless-stopped
privileged: true
network_mode: host
Quick Start Guide
- Create a dedicated directory for Home Assistant on your server.
- Create a file named
docker-compose.ymland paste the code above into it. - Run the following command to spin up your container:
docker compose up -d - Access the Home Assistant web interface via your server’s IP address.
🚀 Need a reliable server for your self-hosted apps? We highly recommend deploying Docker containers on a high-performance VPS. Click here to get the best VPS for Docker with an exclusive discount!