Install Home Assistant in Docker on Ubuntu 20.04

Install Home Assistant in Docker on Ubuntu 20.04

Home Assistant is an open-source application for home automation that allows to control smart home devices centrally. Home Assistant has dashboard that can be accessed via a web browser.

This tutorial explains how to install Home Assistant in Docker on Ubuntu 20.04.

Prepare environment

Home Assistant can be installed and run in Docker container. Before starting, make sure you have installed Docker in your system. You can read post how to install it.

Install Home Assistant

Execute the following command to create container for Home Assistant:

docker run -d --name=homeassistant --restart=always --network=host \
    -v /etc/homeassistant:/config \
    homeassistant/home-assistant:stable

Home Assistant configuration files stored in the /etc/homeassistant directory.

Testing Home Assistant

Home Assistant can be accessed using http://<IP_ADDRESS>:8123, where <IP_ADDRESS> is IP address of the system. Open a web browser and go to that URL address.

For the first time you will need to create the administrator account of Home Assistant. Provide a name, username, password and click "Create Account" button. Next, you can provide a name for your home, location, time zone, unit system, and currency. Once you finished configuration, you will be redirected to Home Assistant dashboard.

Home Assistant dashboard on Ubuntu

Uninstall Home Assistant

If you want to completely uninstall Home Assistant, remove it's container:

docker rm --force homeassistant

Remove Home Assistant image:

docker rmi homeassistant/home-assistant:stable

You can also remove Home Assistant configuration files:

sudo rm -rf /etc/homeassistant

Leave a Comment

Cancel reply

Your email address will not be published.