Skip to content

Install Home Assistant on Docker

Volodymyr Huz edited this page Nov 23, 2019 · 3 revisions

Install Home Assistant on Docker Europe/Kiev

docker run --init -d --name="home-assistant" -e "TZ=Europe/Kiev" -v /home/osmc/homeassistant:/config --net=host homeassistant/raspberrypi3-homeassistant:stable

Autostart using systemd

sudo nano -w /etc/systemd/system/home-assistant@homeassistant.service

[Unit]
Description=Home Assistant
Requires=docker.service
After=docker.service

[Service]
Restart=always
RestartSec=3
ExecStart=/usr/bin/docker run --name=home-assistant-%i -v /home/%i/.homeassistant/:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant
ExecStop=/usr/bin/docker stop -t 2 home-assistant-%i
ExecStopPost=/usr/bin/docker rm -f home-assistant-%i

[Install]
WantedBy=multi-user.target

You need to reload systemd to make the daemon aware of the new configuration.

sudo systemctl --system daemon-reload

Enable service

sudo systemctl enable home-assistant@homeassistant

To start Home Assistant now, use this command

sudo systemctl start home-assistant@homeassistant

Web interface

http://192.168.1.100:8123

Clone this wiki locally