docker.recipes

Home Assistant (Simple)

beginner

Open-source home automation platform.

Overview

Home Assistant is an open-source home automation platform founded in 2013 that prioritizes local control and privacy over cloud-dependent solutions. It serves as a centralized hub for managing smart home devices, automating tasks, and creating custom dashboards, with support for over 2000 different integrations including Zigbee, Z-Wave, WiFi devices, and popular services like Philips Hue, Google Nest, and Amazon Alexa. Unlike proprietary solutions that lock users into specific ecosystems, Home Assistant provides vendor-neutral automation that keeps your data local and your automations running even when internet connectivity fails. This configuration deploys Home Assistant as a single container using host networking mode, which enables automatic discovery of local devices through mDNS, SSDP, and other broadcast protocols. The privileged container mode allows direct hardware access for USB Zigbee/Z-Wave controllers, while the persistent volume ensures your configuration, automations, and historical data survive container restarts. This setup eliminates the complexity of network bridging that can interfere with device discovery and integration setup. This stack is ideal for smart home enthusiasts who want a privacy-focused alternative to cloud-based platforms like SmartThings or Hubitat, homelab administrators seeking to consolidate IoT device management, and users who value the extensive customization options and automation capabilities that Home Assistant provides. The large community ecosystem, including HACS (Home Assistant Community Store), offers thousands of custom integrations and frontend components that extend functionality far beyond what commercial platforms typically offer.

Key Features

  • Over 2000 device integrations including Zigbee, Z-Wave, WiFi, and cloud services
  • Local processing and storage with no cloud dependency required
  • Advanced automation engine with triggers, conditions, and actions
  • Customizable Lovelace dashboards with drag-and-drop interface
  • Built-in voice assistant support and text-to-speech capabilities
  • Energy monitoring and solar panel integration with detailed analytics
  • HACS community store with thousands of custom integrations and themes
  • Mobile companion apps for iOS and Android with location tracking and notifications

Common Use Cases

  • 1Centralized control of mixed smart home ecosystems with devices from multiple vendors
  • 2Privacy-conscious home automation without relying on cloud services
  • 3Complex automation scenarios like presence detection, climate control, and security systems
  • 4Energy monitoring and optimization for solar panels and smart appliances
  • 5Integration of legacy home automation systems with modern IoT devices
  • 6Custom dashboards for family members with different access levels and preferences
  • 7Home security monitoring with cameras, sensors, and automated alerts

Prerequisites

  • Minimum 2GB RAM recommended for stable operation with multiple integrations
  • Port 8123 available for web interface access
  • Docker host with privileged container support for hardware device access
  • USB Zigbee or Z-Wave controller if using those protocols
  • Basic understanding of YAML configuration files
  • Network access to smart home devices on the same subnet

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: homeassistant/home-assistant:stable
4 container_name: homeassistant
5 restart: unless-stopped
6 environment:
7 TZ: UTC
8 volumes:
9 - ha_config:/config
10 ports:
11 - "8123:8123"
12 privileged: true
13 network_mode: host
14
15volumes:
16 ha_config:

.env Template

.env
1# Set your timezone
2TZ=UTC

Usage Notes

  1. 1Docs: https://www.home-assistant.io/docs/
  2. 2Access at http://localhost:8123 - create account on first visit
  3. 3Uses host network for device discovery (mDNS, Zigbee, etc.)
  4. 4Add integrations: Settings > Devices & Services > Add Integration
  5. 5HACS (community store): install for thousands of custom integrations
  6. 6Backup: Settings > System > Backups, or copy /config directory

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 homeassistant:
5 image: homeassistant/home-assistant:stable
6 container_name: homeassistant
7 restart: unless-stopped
8 environment:
9 TZ: UTC
10 volumes:
11 - ha_config:/config
12 ports:
13 - "8123:8123"
14 privileged: true
15 network_mode: host
16
17volumes:
18 ha_config:
19EOF
20
21# 2. Create the .env file
22cat > .env << 'EOF'
23# Set your timezone
24TZ=UTC
25EOF
26
27# 3. Start the services
28docker compose up -d
29
30# 4. View logs
31docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/home-assistant-simple/run | bash

Troubleshooting

  • Device discovery not working: Ensure host networking mode is enabled and firewall allows mDNS/SSDP traffic on port 5353
  • USB device not detected: Verify container runs in privileged mode and USB device permissions are correct on host
  • Configuration errors after restart: Check configuration.yaml syntax using the built-in configuration validator in Settings
  • Integrations failing to load: Clear browser cache and restart container, some integrations cache authentication tokens
  • High memory usage: Disable recorder for unused entities and adjust history_days to reduce database size
  • Mobile app not connecting: Check that port 8123 is accessible from mobile device network and SSL certificate is valid if using HTTPS

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

Ad Space