Your smart light bulb should not need to phone home to California before it turns on. Your door sensor should work when the internet is down. Your voice commands should not be recorded and stored by a corporation. Home Assistant was built on exactly these beliefs — and it has become the most popular self-hosted home automation platform in the world because of them.

What is Home Assistant?

Home Assistant is an open-source home automation platform that runs locally on your own hardware. It unifies thousands of different smart home devices — Zigbee sensors, Z-Wave locks, Wi-Fi cameras, Philips Hue lights, FRITZ!Box routers, and much more — under a single dashboard and a powerful automation engine.

“Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts.”

The project is governed by the Open Home Foundation, a non-profit organisation that ensures Home Assistant remains free, independent, and privacy-respecting forever.

Home Assistant Core on GitHub Home Assistant Official Website Live Demo

Why self-hosters choose Home Assistant

  • 🏠 100% local — works without internet; your automations fire even when your ISP is down
  • 🔌 3,000+ integrations — Zigbee, Z-Wave, Matter, Bluetooth, MQTT, KNX, and every major cloud ecosystem
  • 🤫 Privacy-first — no telemetry by default, no mandatory accounts, no cloud subscriptions
  • 🤖 Powerful automations — visual editor, blueprints, or full YAML with Jinja2 templating
  • 📊 Energy monitoring — track consumption per device and optimise your electricity bill
  • 🗣️ Local voice assistants — fully local wake word detection and NLU with Wyoming protocol
  • 🧩 Add-ons ecosystem — ESPHome, Node-RED, Mosquitto, Z-Wave JS UI, and hundreds more
  • ⚖️ Apache-2.0 licensed — permissive, business-friendly open source ❤️

Home Assistant Tech Overview

Home Assistant’s core is written in Python and built on top of asyncio — a single event loop handles thousands of concurrent device state updates without blocking. This design is why HA feels snappy even on a Raspberry Pi 4 managing hundreds of entities.

Key components

The event bus Everything in Home Assistant is an event. A Zigbee sensor reports motion → an event fires → automations listening on that event trigger → a service call dims the lights. This decoupled pub/sub architecture means any integration can react to any event without tight coupling.

State machine Every device exposes one or more entities, each with a state (on, off, 23.5, home…) and attributes. The state machine is the single source of truth — the dashboard, automations, and API all read from it.

Config entries & config flows Integrations are set up through a guided UI wizard (config flow), not raw YAML. Discovery via mDNS, Bluetooth, and DHCP means many devices show up automatically in the notification tray, ready to add with two clicks.

Recorder Historical state data is stored in SQLite by default (zero configuration), or optionally in MariaDB or PostgreSQL for larger deployments. SQLAlchemy provides the ORM layer. The Energy dashboard and long-term statistics graphs pull from this.

Platform support

Hardware Notes
Raspberry Pi 3/4/5 (64-bit) Most popular choice
ODROID C2/C4/M1/N2 Solid ARM alternatives
Generic x86-64 NUC, mini-PC, old laptop
HA Yellow / HA Green Official hardware with POE and Zigbee built in
Any Docker host Container install on any Linux machine

Self-Hosting Home Assistant with Docker

The easiest production-ready setup is the Container install — a single Docker image containing the full Home Assistant Core application.

services:
  homeassistant:
    image: ghcr.io/home-assistant/home-assistant:stable
    container_name: homeassistant
    network_mode: host
    environment:
      - TZ=Europe/Madrid
    volumes:
      - ha_config:/config
    restart: unless-stopped
    privileged: true

volumes:
  ha_config:

Save this as docker-compose.yml and start it:

docker compose up -d

Open http://<your-server-ip>:8123 in your browser. The onboarding wizard walks you through:

  1. Creating your admin account
  2. Setting your home location (used for sunrise/sunset automations)
  3. Auto-discovered devices on your network

Default credentials: Set by you during the onboarding wizard — there are no hardcoded defaults.

Why network_mode: host?

This is the most common point of confusion. Home Assistant uses mDNS, Bluetooth, and UPnP for automatic device discovery. These protocols are link-local — they cannot cross Docker’s bridge network. With host networking the container shares your host’s network interface directly, so discovery works as if HA were running natively.

If host mode is not acceptable (e.g., you are on a shared server), you can skip it, but you will need to add device IPs manually for most integrations.

Services explained

Setting Purpose
network_mode: host Enables mDNS/Bluetooth/UPnP device discovery
privileged: true Required for USB Zigbee sticks, Bluetooth adapters, and serial devices
/config volume Stores all configuration, automations, database, and add-on data — back this up
TZ env var Sets timezone for sunrise/sunset calculations and log timestamps