Installing Home Assistant Supervised on Ubuntu 22.04 LTS


Introduction

Updated the installation manual for Home Assistant (hereinafter referred to as HA for short) in connection with the release of a new version of Ubuntu and Home Assistant. Taken as a starting point video by Alex Kvazis Raspberry Pi 4B in the Argon ONE M.2 case with a 128 GB SSD, assembling a server for Home Assistant. However, the author uses the installation option Home Assistant Operating System, which is the most simple and convenient. This article will use the method Home Assistant Supervised.

Home Assistant installation options

Official site offers us several ways to install Home Assistant:

Home Assistant Operating System for Raspberry Pi. The easiest way to install: uploaded the image and no problems. All features are in stock. Recommended by developers. Minus – the lack of a full-fledged system.

Home Assistant Operating System (VM) for Linux. We raise the virtual machine. We download the image. We launch. Profit. Yes, all the features are in place. Recommended by developers. Minus – the virtual machine is more expensive for the system than Docker. However, I have not tried this method.

Home Assistant Container. Installation in a Docker container. Also recommended by developers. Minus – no Supervisor.

Home Assistant Core. Installing the Python environment. Install Home Assistant. Minus – no Supervisor.

Home Assistant Supervised. Installation in a Docker container, but with Supervisor included.

Step 0Install Ubuntu Server 22.04 LTS

Hereinafter, I will connect Raspberry via WiFi. Let’s start by adding a static Raspberry IP address to our home DHCP server. This is necessary for convenience, so as not to find out every time how to reach the raspberry.

Here is the official tutorial on how to make friends between Raspberry and WiFi.

Download the Ubuntu image from here and fill with Balena Etcher to an available USB stick or SD card.

Attention

You may need to update the raspberry bootloader before proceeding with the next steps.

sudo apt update
sudo apt upgrade
sudo apt install rpi-eeprom
sudo rpi-eeprom-update -a
sudo reboot -h now

Opening the file network-configand write the WiFi settings there. It should turn out something like:

version: 2
ethernets:
  eth0:
    dhcp4: true
    optional: true
wifis:
  wlan0:
    dhcp4: true
    optional: true
    access-points:
      Название сети:
        password: "сюда пишем пароль"

And now some developer comments:

The first time the Raspberry boots up, it will try to connect to WiFi. This attempt is doomed to failure. But don’t be discouraged, just reload the raspberry sudo reboot -h now and everything will work.

Default loginubuntupassword ubuntu. The password will need to be changed on the first start. What do we do immediately after installing the system? That’s right – update.

sudo apt update
sudo apt upgrade
sudo reboot -h now

I also recommend using the service. duckdns.orgto access the system remotely. After that, you need to configure updating information about the current ip address. How to do this is detailed in duckdns.org. If you are using Argon ONE M.2like mine, I recommend setting up power button & fan control
sudo curl https://download.argon40.com/argon1.sh | bash.

And of course, do not forget to forward ports 22 – to the Ubuntu console, 8123 to Home Assistant

Step 1. Install dependencies

Install jq. sudo apt install jq.

Install Docker by instructions from the official site.

sudo apt update
sudo apt install ca-certificates curl gnupg lsb-release
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin

Developers require Docker, Systemd, NetworkManager, AppArmor to be installed on the system. Systemd and AppArmor are already installed on the system – no further action is required for them.

Now let’s take on NetworkManager. First, install it with the command sudo apt install network-manager. Add to autoload sudo systemctl enable NetworkManager. To switch to it, go to /etc/netplanand edit the configuration file with the command sudo vi /etc/netplan/50-cloud-init.yaml. Note: I have this 50-cloud-init.yaml . They say the name may be different. Adding a line renderer: NetworkManager one level down (with one indent) after the line network:. Pay attention to indents. In yaml, indentation matters. Doing sudo netplan generateandsudo netplan apply, reboot. Stopping systemd-networkd – it is no longer needed –sudo systemctl stop systemd-networkd and disable it from autoloadsudo systemctl disable systemd-networkdreboot.

Install OS agent. In the commands below, a link to the latest version of OS-Agent at the time of this writing. Before downloading, I recommend clarifying this issue. In any case, our architecture aarch64.

wget github.com/home-assistant/os-agent/releases/download/1.2.2/os-agent_1.2.2_linux_aarch64.deb
sudo dpkg -i os-agent_1.2.2_linux_aarch64.deb

Step 2 Install Home Assistant Supervised

Downloading the installation file

wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb

But we are not in a hurry to launch it. First, create a temporary file with the command

sudo vi /etc/default/grub

and add the line there systemd.unified_cgroup_hierarchy=false.

Run the installer and delete the temporary file

sudo dpkg -i homeassistant-supervised.deb
sudo rm /etc/default/grub

We are waiting for the script to work to the end. The first boot of Home Assistant takes some time. Be patient. If everything went well, you can reach HA at http://local ip raspberry:8123.

That’s all.

Similar Posts

5 Comments

  1. I’m sorry but i was unable to make it work cause home assistant supervised official installer doesn’t support UBUNTU 22.04.1 LTS…
    how do you solve this issue ?

    Regards,

  2. Same here, just got that error

    [error] Ubuntu 22.04.1 LTS is not supported!
    dpkg: error processing archive homeassistant-supervised.deb (–install):
    new homeassistant-supervised package pre-installation script subprocess returned error exit status 1

Leave a Reply

Your email address will not be published. Required fields are marked *