Raspberry Pis, and the Raspberry Pi 4 in particular, are fantastic little single-board computers. Raspberry Pis are cheap, they output little heat and thus require no active cooling (in most situations), and sip only 3.4-7.6 watts, which makes them perfect for beginners. I’d even go as far as to say that the Raspberry Pi 4 is powerful enough to power your Home Assistant even if you are a more advanced user running countless automations and many scripts as well as add-ons.
But the Raspberry Pi 4 has one major disadvantage in comparison to Intel NUC systems and other platforms. The Raspberry Pi 4 does not have any SATA or NVMe connectivity and relies on a microSD card for storage. microSD cards don’t enjoy being written to over and over again and because of that Home Assistant isn’t best suited to be run off one because it writes very frequently. You can purchase endurance rated microSD, but in due time, you will most likely want to move on to something more reliable.
Home Assistant needs an SSD
When running Home Assistant on a Raspberry Pi 4, the most reliable solution is to use an external SSD. Not only is an external SSD much more reliable, but it could also offer faster speeds and more storage capacity. The main disadvantage will be the higher price. But can you really put a number on the reliability of your Home Assistant? I’ll let you be the judge.
External SSDs from Samsung
External SSDs from SanDisk
External SSDs from Western Digital
Other external SSDs
Preparing the Raspberry Pi 4
In order for Home Assistant to be able to boot off an external SSD, you will have to prepare your Raspberry Pi 4. And you will need a microSD card for this step, but as this is its only use, you can pick any microSD you might have lying around.
Install Raspberry Pi OS (previously Raspbian) on to the microSD card. The
Raspberry Pi OS (32-bit) Lite image will do, as you will only need to access the shell and nothing else. You won’t even have to connect your Raspberry Pi 4 to a monitor and keyboard. You can flash the image on to the card using an application such as balenaEtcher. Once the image is flashed, you can enable SSH by placing a file named
ssh (without any extension) on to the boot partition of the microSD card. You can create this file by opening
Notepad, saving the empty file, and selecting
All files under
Save as type:. If you see two partitions in your file explorer, the smaller one will be the boot partition.
With the microSD card prepared, you can remove it from your computer and insert it in to the Raspberry Pi 4. Next, connect a network cable and boot the Raspberry Pi 4 by attaching the power cable.
Updating the Raspberry Pi 4 Bootloader Firmware
You will need an SSH client to access the Raspberry Pi 4 and the one I recommend is MobaXterm. Once installed, you can look up the Raspberry Pi 4’s IP on your router and enter it in MobaXterm by clicking on
Session and choosing
Now that you have access to the shell, you can update the bootloader update utility by entering the following commands (you can copy/paste commands into MobaXterm):
sudo apt update sudo apt full-upgrade sudo reboot
Once the Raspberry Pi 4 has booted up again, you check for updates to the bootloader by entering the following command:
If an update is available (the shell will output
*** UPDATE REQUIRED ***) you can install it using the following commands:
sudo rpi-eeprom-update -a sudo reboot
With the latest Raspberry Pi 4 bootloader installed, you can cleanly shut down the system using the following command (this protects the microSD card):
sudo shutdown -h now
Installing Home Assistant on an external SDD
Currently, only the HassOS development builds can boot off an external SSD, so there might still be a few bugs here and there. Download the latest
Development 5 build X for the Raspberry Pi 4 from GitHub (currently hassos_rpi4-64-5.4.img.gz).
Once downloaded, you can once again flash the image using balenaEtcher. Only this time you will be flashing it to your external SSD and not a microSD card. Once complete, you can plug in the external SSD to your Raspberry Pi 4 and power it on by reattaching the power cable. Home Assistant should now boot as it would from a microSD card. Give it a bit of time to get set up, and you should be good to go.