Home Assistant
Installation steps on SD Card
Currently it is possible to install home assistant on sd card due to the size of home assistant. You need boot
- Format SD Card and create new partition
# format SD card (mmcblk1)
sgdisk --zap-all /dev/mmcblk1
parted -s /dev/mmcblk1 mklabel gpt
parted -a opt -s /dev/mmcblk1 mkpart primary ext4 0% 100%
mkfs.ext4 -F /dev/mmcblk1
- Mount created partition to /mnt/sd. Also create link between /mnt/sd and /var/lib/docker. In this case every docker container will be on sd card
# mount SD card to docker folder
mount /dev/mmcblk1 /mnt/sd
mkdir -p /mnt/sd/docker
mkdir -p /var/lib/docker
mount --bind /mnt/sd/docker /var/lib/docker
- Add partitions to /etc/fstab for automounting
echo "/dev/mmcblk1 /mnt/sd ext4 defaults 0 0" | sudo tee -a /etc/fstab
echo "/mnt/sd/docker /var/lib/docker none defaults,bind 0 0" | sudo tee -a /etc/fstab
- Install Home Assistant dependencies
# Install requirements
apt install apparmor jq wget curl udisks2 libglib2.0-bin network-manager dbus lsb-release systemd-journal-remote -y
curl -fsSL get.docker.com | sh
sync
- Install os-agent. You can find newest version of os-agent here: https://github.com/home-assistant/os-agent/releases/latest
sudo wget https://github.com/home-assistant/os-agent/releases/download/1.5.1/os-agent_1.5.1_linux_aarch64.deb
sudo chmod 777 os-agent_1.5.1_linux_aarch64.deb
sudo apt install ./os-agent_1.5.1_linux_aarch64.deb -y
sudo rm -f ./os-agent_1.5.1_linux_aarch64.deb
- Install home assistant supervisor. After first installation it will show error made by ipv6 support enabled.
# Install home assistant supervisor
sudo wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
sudo chmod 777 homeassistant-supervised.deb
sudo apt install ./homeassistant-supervised.deb -y
echo "{\"log-driver\": \"journald\",\"storage-driver\": \"overlay2\",\"ip6tables\": false,\"experimental\": true,\"log-opts\": {\"tag\": \"{{.Name}}\" }}" > /etc/docker/daemon.json
sudo systemctl start docker.socket
sudo systemctl start docker.service
sudo apt install ./homeassistant-supervised.deb -y
sync
- Check if installation is completed with command mentioned below. Home Assistant creates 6 containers. Depending on your internet connection you have to wait at least few minutes.
docker ps -a
- After all these steps you can access Home Assistant page on default port 8123