Smart Home: Install Home Assistant on Docker
This is a quick setup of home assistant with docker compose.
Install docker and docker-compose
sudo apt install docker.io -y
sudo apt install docker-compose -y
sudo usermod -aG docker $(whoami)
sudo reboot
Create docker-compose.yml
file
version: '3'
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant:stable
volumes:
- ~/docker/hassio/config:/config
environment:
- TZ=America/New_York
restart: always
network_mode: host
Start the container in daemon mode
docker-compose up -d
Now it’s done, it can be discovered in mobile app.
Backup commands
To restart Home Assistant when you have changed configuration:
$ docker-compose restart
To update your docker-compose image to the latest version and restart:
$ docker-compose pull
$ docker-compose up -d --build homeassistant