homelab-blueprint/docker-compose-files/homeassistant/README.md
2026-06-15 10:53:29 +02:00

2 KiB

Home Assistant

Docker deployment for Home Assistant, Mosquitto, and Zigbee2MQTT. Run all commands from the repository root.

Appdata Location

The setup script creates project-root directories under appdata/homeassistant, appdata/mqtt, and appdata/zigbee2mqtt. Do not create them inside docker-compose-files/.

Installation

  1. Create .env if it does not exist:

    cp -n .env.sample .env
    
  2. Set the required values in .env:

    TZ=Africa/Johannesburg
    SLZB06_HOST=<zigbee-coordinator-ip>
    CADDY_HOST_IP=10.0.15.5
    DOCKERLOGGING_MAXFILE=3
    DOCKERLOGGING_MAXSIZE=10m
    
  3. Create appdata, render configs, and generate Compose:

    ./setup-homeassistant.sh
    
  4. Validate and start the stack:

    docker compose -f docker-compose.homeassistant.yml config --quiet
    docker compose -f docker-compose.homeassistant.yml up -d
    
  5. Verify the containers and open http://<HOST_IP>:8123:

    docker compose -f docker-compose.homeassistant.yml ps
    docker compose -f docker-compose.homeassistant.yml logs --tail=100
    

Apply Configuration Changes

Run the setup script after changing .env or source templates, then recreate the stack:

./setup-homeassistant.sh
docker compose -f docker-compose.homeassistant.yml up -d

The script preserves an existing Zigbee2MQTT configuration.yaml.

Initial Setup

Complete Home Assistant onboarding, then verify MQTT and Zigbee2MQTT. Open the Zigbee2MQTT frontend at http://<HOST_IP>:8080.

Network Requirements

  • The host must reach the SLZB-06U coordinator on TCP port 6638.
  • Trusted clients or Caddy need access to Home Assistant and Zigbee2MQTT.

Troubleshooting

Check appdata/zigbee2mqtt/configuration.yaml and the coordinator address if Zigbee2MQTT cannot connect.

Useful Commands

docker compose -f docker-compose.homeassistant.yml restart homeassistant

Backup

Back up appdata/homeassistant, appdata/mqtt, and appdata/zigbee2mqtt.