How to Install Home Assistant on Raspberry Pi with SSD Boot Support

Recently, I have encountered some issues with my Home Automation system. I use Home Assistant with a Raspberry Pi 4 Model B with an SD Card.

It has been working without issues for nearly 10 months. If you consider the short life of nearly any SD Card, the fact it didn’t die earlier is amazing. I had to face the inevitable and use the SSD I purchased months ago because I knew the SD Card would die.

If you want to do the same thing and use an SSD with Raspberry Pi 4B, it is possible. Unfortunately for many large houses, this is an insufficient machine. You need a real computer with 16GB RAM if you need to install so many IP and PoE cameras. For small houses and apartments, this will work.

The process is actually very simple, and it may even be easier a few months from now because you don’t need to copy firmware files from GitHub to upgrade Raspberry Pi 4B firmware.

You should first read the blog post of Jeff Geerling about upgrading the firmware. After the firmware is upgraded, it is quite crucial to get networking security basics and user setup done before installing Home Assistant.

Headless Mode for the Raspberry Pi OS

Ideally, you should still have a keyboard and monitor for your Raspberry Pi. If you don’t have that please read the post on how to set up Raspberry Pi via Headless mode.

Securing your Pi

Do not skip this step especially if you intend to access your Pi from anywhere. Read the documentation on securing your Raspberry Pi.

Set up Static I.P Address

Your home automation system relies greatly on this. Even if dynamic I.P and Nginx setup is possible for some, you still need a static I.P for setting up MQTT and a few other important bits for home automation. Do learn how to set up your static I.P address/.

Docker Installation

Install the Docker dependencies:

sudo apt install \
  apparmor-utils \
  avahi-daemon \
  dbus \
  jq \
  network-manager \
  socat

Download the script for installing Docker:

curl -fsSL https://get.docker.com -o get-docker.sh

Finally, install Docker and test if it works.

sudo sh get-docker.sh

sudo usermod -aG docker username

sudo docker version

sudo docker info

sudo docker run hello-world

Home Assistant Supervised

Disclaimer: this method of installing Home Assistant is not recommended by the Home Assistant developer team. I use this method because I think it will still work until I need to probably buy something more stable than the Raspberry Pi.

mkdir hass
cd hass
sudo curl -Lo installer.sh https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh
chmod +x installer.sh
sudo bash installer.sh --machine raspberrypi4

Using Debian 64-bit instead of Raspberry Pi OS

As of March 9, 2021, if you want to install Debian 10 on your Pi instead of the recommended OS, you can install Home Assistant by specifying the correct machine.

There may be issues with Ubuntu Desktop so I recommend using Debian 10. There are a lot more issues around configuring Debian 10 than any other OS like the Raspberry Pi OS. but the good news is it seems to have more long-term support if you really want Home Assistant on your Pi.

Initially, you would need a LAN cable or use eth0 for your connection to install dependencies. After installing all the dependencies listed above, simply run these commands:

mkdir hass
cd hass
sudo curl -Lo installer.sh https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh
chmod +x installer.sh
sudo bash installer.sh --machine raspberrypi4-64

I recommend configuring everything for networking and setting a static I.P address if you use MQTT a lot. If this article helped you, I would be creating videos about how to make MQTT and other tech work well for you with or without Home Assistant.