Home Assistant Agent is used for Home Assistant OS and Home Assistant Supervised installation types and it allows the Home Assistant Supervisor to communicate with the host operating system and handles additional tasks on the host and without it the Supervisor won’t be able to fulfill its tasks and responsibilities.
Home Assistant Supervised provides the full Home Assistant experience on a regular operating system without the Home Assistant Operating System. This system will run the Home Assistant Supervisor. The Supervisor is not just an application, it is a full appliance that manages the whole system. It will clean up, repair or reset settings to defaults if they no longer match expected values.
We are going to learn how to install Home Assistant in a LXD Virtual Machine.
Create the required LXD VM Debian Bullseye Instance. Note: Watch my LXD 101 video to learn how to create the required bridge used in the following command:
lxc init images:debian/11 --vm HomeAssistant --profile default --profile bridgeprofile -c boot.autostart=true -c limits.cpu=4 -c limits.memory=4GiB
Enlarge the LXD VM virtual disk:
lxc config device override HomeAssistant root size=100GiB
If you have a Zwave or Zigbee USB device, plug it into your LXD host and do a “lsusb” to find out its vendor id and product id. Here’s a mock example of making a zwave device on your LXD host available to your LXD VM. Your values will be different.
lxc config device add HomeAssistant zwave usb vendorid=a012 productid=4a01
Start your LXD VM and check to see if it has an address with “lxc list”.
lxc start HomeAssistant
Once it has an address, connect to the console bash shell.
lxc exec HomeAssistant bash
Install the components required to resize the partition and the root file system of the container.
apt install cloud-guest-utils fdisk -y
Enlarge the partition to the size of the disk.
growpart /dev/sda 2
Resize the root file system to the size of the enlarged partition.
resize2fs /dev/sda2
Check for and apply all updates to your container.
apt update && apt upgrade -y
Add a user, put the user in the sudo group and move into the new user account.
adduser scott
usermod -aG sudo scott
su - scott
Install the required dependencies.
sudo apt install ca-certificates curl gnupg lsb-release network-manager udisks2 wget apparmor jq libglib2.0-bin dbus lsb-release systemd-journal-remote -y
Create a folder for keyring signatures.
sudo mkdir -m 0755 -p /etc/apt/keyrings
Get the signature for docker and put it in the keyring folder.
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
Add the docker repository, update the repository list and install the required docker components.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(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-buildx-plugin docker-compose-plugin
Put my user account in the docker group.
sudo usermod -aG docker scott
newgrp docker
Download and install the Home Assistant Agent:
wget https://github.com/home-assistant/os-agent/releases/download/1.5.1/os-agent_1.5.1_linux_x86_64.deb
sudo dpkg -i os-agent_1.5.1_linux_x86_64.deb
Download and Install Home Assistant Supervised:
wget https://github.com/home-assistant/supervised-installer/releases/download/1.4.3/homeassistant-supervised.deb
sudo dpkg -i homeassistant-supervised.deb
Go to your web browser at the address of your LXD VM at port 8123.
http://192.168.1.x:8123/
After a few minutes you should be able to register an account and get started as in the video. Optionally, you may create a subdomain name for your Home Assistant instance and make an NginX Proxy Manager entry with an SSL certificate if you want your instance to be reachable outside your network.
For questions, visit my chat:
https://chat.scottibyte.com/