Hong's Tech Blog

Hong's Tech Blog

Install Home Assistant Supervised On Arch Linux

Install Home Assistant Supervised On Arch Linux

Lack of HASS-specific guide for Arch Linux

Installing home-assistant did not turn up to be what I expected. It does not support add-ons! I learned it the hard way when I was setting up ESPHome. Here goes my journey of installing Home Assistant Supervised.

Background

This is a story of the mistake I made, and some HASS knowledge I learned. You can skip this part and goto Installing Dependencies

There are 4 types of installation method: OS, Container, Core, Supervised. This is a nice chart comparing differences in capability. Arch's home-assistant installs Core, and does not support add-ons. During the first few months of usage there were no issue as most of my devices can be integrated with HASS out-of-the-box. Recently I am building a custom sensor and realised that ESPHome add-on cannot be installed šŸ˜¢. That is how I ended up reinstalling HASS and writing this article.

Good explanation of different installation methods on YouTube: Home Assistant Installation Methods EXPLAINED!

Installing Dependencies

This installation method is not officially supported on Arch Linux. HASS seems to have preference for Debian only šŸ˜”. Read this before you get started: bit.ly/3AuOnY8, hopefully you know what you are doing.

Docker

Install and enable Docker service.

sudo pacman -S https://wiki.archlinux.org/title/Docker
sudo systemctl enable docker

Setting journald as default logging driver. Edit /etc/docker/daemon.json (create this file if it does not exist)

{
  "log-driver": "journald"
}

Start Docker service.

sudo systemctl start docker

# Test that docker is working, and check logging driver.
sudo docker info

NetworkManager

Previously I was using systemd-networkd to manage network configurations. I have to disable it and setup NetworkManager instead. Avoid running both system-networkd and NetworkManager, as it might result in conflict.

Refer to this ArchWiki for installation guide: bit.ly/3lAxUeF

AppArmor

ArchWiki reference: bit.ly/3knRVFM. I have no plan to use AppArmor yet, so I did not configure kernal to load it, neither did I enable apparmor.service. HASS seems to work for me so far.

sudo pacman -S apparmor

jq

A command-line JSON processor.

sudo pacman -S jq

Install HASS

curl -Lo installer.sh https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh
sudo bash installer.sh

When asked "Do you want to proceed with overwriting the /etc/network/interfaces file?", I choose "N". It seems to be a file used in Debain derivatives.

Screenshot 2021-09-19 at 16.28.48.png

ā— Now restart. For some reason Docker is unable to create network bridge, and it is resolved by restarting Linux. An Arch user reported that this happens whenever kernel is updated and can be resolved by restarting Linux. Reference: serverfault.com/a/831489/216503

Onboarding

If you can load http://[host-ip]:8123 in your browser, it shows that you have successfully installed HASS šŸŽŠ. Now you can proceed with onboarding process.

Ā 
Share this