Home Assistant
Open-source home automation platform that puts local control and privacy first, supporting thousands of devices and integrations.
Overview
Home Assistant is a powerful open-source home automation platform that emerged in 2013 to address the fragmented smart home ecosystem by providing unified control over diverse IoT devices while prioritizing local control and user privacy. Unlike cloud-dependent solutions, Home Assistant runs entirely on your local network, supporting over 2000 integrations including popular protocols like Zigbee, Z-Wave, WiFi, and Bluetooth devices from manufacturers ranging from Philips Hue to Tesla.
This Docker deployment leverages Home Assistant's containerized distribution to simplify installation and maintenance while maintaining full functionality. The configuration uses host networking mode to enable automatic device discovery across your local network, essential for protocols like mDNS and SSDP that many smart home devices rely on for initial setup. The persistent configuration volume ensures your automations, dashboards, and device settings survive container updates.
This setup is ideal for smart home enthusiasts who want comprehensive device integration without vendor lock-in, privacy-conscious users seeking local control over their automation data, and homelab operators building sophisticated home automation systems. Home Assistant's visual automation editor, customizable dashboards, and extensive add-on ecosystem make it accessible to beginners while offering the depth that advanced users demand for complex multi-room automation scenarios.
Key Features
- 2000+ device integrations including Zigbee, Z-Wave, WiFi, and Bluetooth protocols
- Visual automation editor with triggers, conditions, and actions for complex scenarios
- Customizable Lovelace dashboards with drag-and-drop interface and custom cards
- Built-in energy monitoring and management with solar panel and battery support
- Voice assistant integration with Google Assistant, Alexa, and native Assist
- Mobile companion apps with GPS tracking, notifications, and remote control
- Add-on supervisor system for extending functionality with additional services
- Advanced templating engine using Jinja2 for dynamic automations and sensors
Common Use Cases
- 1Unified smart home control consolidating devices from multiple manufacturers
- 2Privacy-focused home automation without cloud dependencies or data sharing
- 3Complex multi-room lighting and climate control with occupancy-based automation
- 4Home security systems with camera integration, motion detection, and notifications
- 5Energy management and monitoring for solar installations and smart appliances
- 6Elderly or accessibility assistance with voice control and automated daily routines
- 7Homelab integration connecting home automation with network monitoring and media servers
Prerequisites
- Minimum 1GB RAM recommended, 2GB+ for extensive integrations and add-ons
- Port 8123 available for web interface access
- USB device access if using Zigbee or Z-Wave controllers
- Host networking capability for automatic device discovery and mDNS protocols
- Basic understanding of YAML configuration for advanced customization
- Familiarity with smart home protocols (Zigbee, Z-Wave, WiFi) for device integration
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 homeassistant: 3 image: ghcr.io/home-assistant/home-assistant:stable4 container_name: homeassistant5 restart: unless-stopped6 privileged: true7 network_mode: host8 volumes: 9 - ./config:/config10 - /etc/localtime:/etc/localtime:ro11 - /run/dbus:/run/dbus:ro12 environment: 13 - TZ=${TZ:-UTC}1415# Alternative without host network mode:16# services:17# homeassistant:18# image: ghcr.io/home-assistant/home-assistant:stable19# container_name: homeassistant20# restart: unless-stopped21# volumes:22# - ./config:/config23# - /etc/localtime:/etc/localtime:ro24# ports:25# - "8123:8123"26# environment:27# - TZ=${TZ:-UTC}.env Template
.env
1# Home Assistant Configuration2TZ=Europe/London34# Note: Home Assistant uses network_mode: host by default5# This allows auto-discovery of devices on your network6# If you don't need auto-discovery, use the alternative config with portsUsage Notes
- 1Access at http://localhost:8123 (or your server IP)
- 2First-time setup will create an admin account
- 3Uses host network mode for device auto-discovery
- 4Add integrations via Settings > Devices & Services
- 5For Zigbee/Z-Wave, add USB device passthrough
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 homeassistant:5 image: ghcr.io/home-assistant/home-assistant:stable6 container_name: homeassistant7 restart: unless-stopped8 privileged: true9 network_mode: host10 volumes:11 - ./config:/config12 - /etc/localtime:/etc/localtime:ro13 - /run/dbus:/run/dbus:ro14 environment:15 - TZ=${TZ:-UTC}1617# Alternative without host network mode:18# services:19# homeassistant:20# image: ghcr.io/home-assistant/home-assistant:stable21# container_name: homeassistant22# restart: unless-stopped23# volumes:24# - ./config:/config25# - /etc/localtime:/etc/localtime:ro26# ports:27# - "8123:8123"28# environment:29# - TZ=${TZ:-UTC}30EOF3132# 2. Create the .env file33cat > .env << 'EOF'34# Home Assistant Configuration35TZ=Europe/London3637# Note: Home Assistant uses network_mode: host by default38# This allows auto-discovery of devices on your network39# If you don't need auto-discovery, use the alternative config with ports40EOF4142# 3. Start the services43docker compose up -d4445# 4. View logs46docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/home-assistant/run | bashTroubleshooting
- Device discovery not working: Ensure host network mode is enabled or configure device IPs manually in bridge mode
- USB Zigbee/Z-Wave stick not detected: Add device mapping with --device /dev/ttyUSB0:/dev/ttyUSB0 in Docker run command
- Configuration.yaml syntax errors: Use Home Assistant's built-in configuration checker before restarting
- Integrations failing after updates: Clear browser cache and check integration compatibility with current HA version
- High CPU usage: Disable recorder for unnecessary entities and adjust history purge settings
- Add-ons not appearing: Enable Advanced Mode in user profile and ensure Supervisor is running properly
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
home-assistant
Tags
#home-assistant#smart-home#automation#iot#zigbee#zwave
Category
Home Lab & Self-HostingAd Space
Shortcuts: C CopyF FavoriteD Download