Ubuntu Tutorial: Home Assistant

0 - Introduction

With today’s situation in the IOT world, you would need multiple apps of multiple cloud providers to manage everything in your smart home. Not only is  that a risk for your privacy, it is also a burden when your internet goes down and everything becomes unmanageable.

In today’s article we will learn how to install Home Assistant using Docker Compose.

1 - Install

Let’s start by making a folder for Home Assistant’s data, and in it create a ‘docker-compose.yml’ file with the following contents:

services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - ./config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    restart: unless-stopped
    privileged: true
    network_mode: host

After saving the file, run the following command in the terminal to start the container:

docker compose up -d

Then, with the container up, go to your machines ip and port 8123.

yourip:8123

You will be greeted with a welcome page where you can download the app and access their community and some documents.

You need to click on ‘Create my smart home’.

Then you need to create a user. The name and username do not need to be the same, username is the one you use to login and name is your name.

After choosing a username, input a password and click ‘Create Account’.

Then you can set your home location. This will be used to make automations based on your location (using your phones location).

Example: If you get out of the house, lock the front door.

Lastly, you can choose if you want to share data with the creators of Home Assistant.

That is your choice and you can choose to share nothing.

After finishing the setup, you can click on ‘Finish’ and login.

And that’s it, you will now see your dashboard!

You can go to ‘Settings -> Devices & services -> Devices -> Add Device’ to add all your devices.

You can also add Integrations with some services you might use. A integration I found interesting was the ‘Steam’ one, it shows the status of the owners account, you could have all your kids accounts in it and monitor how much time they play, also, if you wanted to set a limit, you could send them a message to their phone (automatically).

After exploring all the menus and options available, you might notice that the only limitation in all of this will be how much time you want to dedicate to configuring your system.

A lot of people are happy with having smart switches and roller blinds only, a lot of other people have crazy integrations that you could never imagine. Check reddit, read peoples experiences, or, if you aren’t interestedo, just add your smart light switches and forget about everything else.

Thanks for reading and stay tuned for more tech insights and tutorials. Until next time, and keep exploring the world of tech!