This guide, along with a few small software packages, allows to install Home Assistant Supervised on a host machine running Alpine Linux. Note that this is not a supported HA installation method, so YMMV. Personally, it works just fine on my ARMv7 machine.
Since July 2023, there are prebuilt APK packages available in this repo (for x86
, x86_64
, armhf
, armv7
and aarch64
). The README below has been updated to reflect that. They are signed with the following public key:
Building from source is also possible; the original guide is at the end of this document.
Note: in April 2024 the MACHINE
variable in /etc/hassio.json
created by this package was changed to reflect the correct system architecture. Upgrading to hassio-supervised
v1.7.0 or newer will automatically rewrite that file with every update.
All steps of this guide (unless otherwise noted) are to be ran by a non-root, sudo-enabled user.
Important: since v1.4.3, the Home Assistant Supervisor needs bind propagation support in the root filesystem (see home-assistant/supervised-installer#293).
The rshared
flag has to be enabled in /etc/fstab
:
UUID=the-uuid-is-usually-here / ext4 rw,relatime,rshared 0 1
# install git, Docker and Python 3
sudo apk add git docker python3
# start Docker
sudo service docker start
# add yourself to docker group
sudo addgroup $(whoami) docker
You need a kernel with AppArmor support for best Home Assistant compatibility. Install and enable AppArmor, as shown in the wiki. Make sure to also install:
sudo apk add apparmor-profiles
Your kernel command line must have this as well:
lsm=landlock,yama,apparmor
Refer to Alpine Wiki/AppArmor for details.
This is optional, but will enable more network-related features in Home Assistant.
Refer to alpine-custom-setup
.
Optional, but (probably) enables more functionalities in HA, as the supervisor uses logind's DBus.
sudo apk add elogind
Enable the APK repository from this GitHub repo:
echo "https://kuba2k2.github.io/alpine-home-assistant" | sudo tee -a /etc/apk/repositories
# install the public key
sudo wget -O /etc/apk/keys/actions@kuba2k2.github.io-64b57843.rsa.pub https://raw.githubusercontent.com/kuba2k2/alpine-home-assistant/master/actions@kuba2k2.github.io-64b57843.rsa.pub
# update repos
# APK should now show the "alpine-home-assistant" repo
sudo apk update
Finally, install the packages:
# Home Assistant OS Agent
sudo apk add hassio-os-agent
# Additional DBus bindings
sudo apk add hassio-dbus-openrc
# Check if DBus bindings work
gdbus introspect --system --dest org.freedesktop.systemd1 --object-path /org/freedesktop/systemd1
# Install only if you have NetworkManager
sudo apk add hassio-supervised-nm
# Supervisor & AppArmor - this will install and start Home Assistant
sudo apk add hassio-supervised
Home Assistant will automatically be started and added as an autostart service in OpenRC.
See Docker containers starting up:
watch -n 3 docker ps