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.
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.
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
Download and install the Home Assistant Agent:
sudo dpkg -i os-agent_1.5.1_linux_x86_64.deb
Download and Install Home Assistant Supervised:
sudo dpkg -i homeassistant-supervised.deb
Go to your web browser at the address of your LXD VM at port 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.
In order to enable reverse proxy, you must edit your Home Assistant configuration.yaml and add the following to the bottom of the file adjusting the proxy IP address to be the address of your NginX Proxy Manager:
- XXX.XXX.XXX.XXX # Add the IP address of the proxy server
For questions, visit my chat: