How to boot Home Assistant on a Raspberry Pi 4 of an SSD

4 comments
Disclosure: This post contains affiliate links. If you click through and make a purchase, I’ll earn a commission, at no additional cost to you. Read my full disclosure here.
Advertisement
A Raspberry Pi sitting on a table

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.

Advertisement

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.

Advertisement

External SSDs from Samsung

SAMSUNG T5 500GB USB 3.1 Pocket Size Portable External SSD (Blue)
SAMSUNG T5 Portable SSD 1TB - Up to 540MB/s - USB 3.1 External Solid State Drive, Black (MU-PA1T0B/AM)
Recommended
SAMSUNG T7 Portable SSD 500GB - Up to 1050MB/s - USB 3.2 External Solid State Drive, Blue (MU-PC500H/AM)
SAMSUNG T7 1TB, Portable SSD, up to 1050MB/s, USB 3.2 Gen2, Gaming, Students & Professionals, External Solid State Drive (MU-PC1T0H/AM), Blue
Product
Samsung T5
Samsung T5
Samsung T7
Samsung T7
Speed
Up to 540 MB/s
Up to 540 MB/s
Up to 1050MB/s
Up to 1050MB/s
Capacity
500 GB
1 TB
500 GB
1 TB
Price
$158.94
$183.56
$74.99
$94.99
-
-
SAMSUNG T5 500GB USB 3.1 Pocket Size Portable External SSD (Blue)
Product
Samsung T5
Speed
Up to 540 MB/s
Capacity
500 GB
Price
$158.94
-
SAMSUNG T5 Portable SSD 1TB - Up to 540MB/s - USB 3.1 External Solid State Drive, Black (MU-PA1T0B/AM)
Product
Samsung T5
Speed
Up to 540 MB/s
Capacity
1 TB
Price
$183.56
-
Recommended
SAMSUNG T7 Portable SSD 500GB - Up to 1050MB/s - USB 3.2 External Solid State Drive, Blue (MU-PC500H/AM)
Product
Samsung T7
Speed
Up to 1050MB/s
Capacity
500 GB
Price
$74.99
SAMSUNG T7 1TB, Portable SSD, up to 1050MB/s, USB 3.2 Gen2, Gaming, Students & Professionals, External Solid State Drive (MU-PC1T0H/AM), Blue
Product
Samsung T7
Speed
Up to 1050MB/s
Capacity
1 TB
Price
$94.99

External SSDs from SanDisk

SanDisk 500GB Extreme Portable SSD - Up to 1050MB/s - USB-C, USB 3.2 Gen 2 - External Solid State Drive - SDSSDE61-500G-G25
SanDisk 1TB Extreme Portable SSD - Up to 1050MB/s - USB-C, USB 3.2 Gen 2 - External Solid State Drive - SDSSDE61-1T00-G25
SanDisk 1TB Extreme PRO Portable SSD - Up to 2000MB/s - USB-C, USB 3.2 Gen 2x2 - External Solid State Drive - SDSSDE81-1T00-G25,Black
SanDisk 2TB Extreme PRO Portable SSD - Up to 2000MB/s - USB-C, USB 3.2 Gen 2x2 - External Solid State Drive - SDSSDE81-2T00-G25
Product
SanDisk Extreme
SanDisk Extreme
SanDisk Extreme PRO
SanDisk Extreme PRO
Speed
Up to 1050 MB/s
Up to 1050 MB/s
Up to 2000MB/s
Up to 2000MB/s
Capacity
500 GB
1 TB
1 TB
2 TB
Price
$79.90
$108.89
$139.99
$249.99
SanDisk 500GB Extreme Portable SSD - Up to 1050MB/s - USB-C, USB 3.2 Gen 2 - External Solid State Drive - SDSSDE61-500G-G25
Product
SanDisk Extreme
Speed
Up to 1050 MB/s
Capacity
500 GB
Price
$79.90
SanDisk 1TB Extreme Portable SSD - Up to 1050MB/s - USB-C, USB 3.2 Gen 2 - External Solid State Drive - SDSSDE61-1T00-G25
Product
SanDisk Extreme
Speed
Up to 1050 MB/s
Capacity
1 TB
Price
$108.89
SanDisk 1TB Extreme PRO Portable SSD - Up to 2000MB/s - USB-C, USB 3.2 Gen 2x2 - External Solid State Drive - SDSSDE81-1T00-G25,Black
Product
SanDisk Extreme PRO
Speed
Up to 2000MB/s
Capacity
1 TB
Price
$139.99
SanDisk 2TB Extreme PRO Portable SSD - Up to 2000MB/s - USB-C, USB 3.2 Gen 2x2 - External Solid State Drive - SDSSDE81-2T00-G25
Product
SanDisk Extreme PRO
Speed
Up to 2000MB/s
Capacity
2 TB
Price
$249.99

External SSDs from Western Digital

WD 500GB My Passport Go SSD Cobalt Portable External Storage, USB 3.0 - WDBMCG5000ABT-WESN
Western Digital 1TB My Passport Go SSD Cobalt Portable External Storage, USB 3.0 - Western DigitalBMCG0010BBT-WESN
WD 500GB My Passport SSD Portable External Solid State Drive, Gray, Sturdy and Blazing Fast, Password Protection with Hardware Encryption - WDBAGF5000AGY-WESN
WD 1TB My Passport SSD Portable External Solid State Drive, Gray, Sturdy and Blazing Fast, Password Protection with Hardware Encryption - WDBAGF0010BGY-WESN
Product
WD My Passport Go
WD My Passport Go
WD My Passport
WD My Passport
Speed
Up to 400MB/s
Up to 400MB/s
Up to 1050 MB/s
Up to 1050 MB/s
Capacity
500 GB
1 TB
500 GB
1 TB
Price
$70.19
$109.89
$75.81
$89.99
-
WD 500GB My Passport Go SSD Cobalt Portable External Storage, USB 3.0 - WDBMCG5000ABT-WESN
Product
WD My Passport Go
Speed
Up to 400MB/s
Capacity
500 GB
Price
$70.19
-
Western Digital 1TB My Passport Go SSD Cobalt Portable External Storage, USB 3.0 - Western DigitalBMCG0010BBT-WESN
Product
WD My Passport Go
Speed
Up to 400MB/s
Capacity
1 TB
Price
$109.89
WD 500GB My Passport SSD Portable External Solid State Drive, Gray, Sturdy and Blazing Fast, Password Protection with Hardware Encryption - WDBAGF5000AGY-WESN
Product
WD My Passport
Speed
Up to 1050 MB/s
Capacity
500 GB
Price
$75.81
WD 1TB My Passport SSD Portable External Solid State Drive, Gray, Sturdy and Blazing Fast, Password Protection with Hardware Encryption - WDBAGF0010BGY-WESN
Product
WD My Passport
Speed
Up to 1050 MB/s
Capacity
1 TB
Price
$89.99

Other external SSDs

PNY Elite 480GB USB 3.1 Gen 1 Portable Solid State Drive (SSD) - (PSD1CS1050-480-FFS)
PNY Elite 960GB USB 3.1 Gen 1 Portable Solid State Drive (SSD) - (PSD1CS1050-960-FFS)
Crucial X6 500GB Portable SSD – Up to 540MB/s – USB 3.2 – External Solid State Drive, USB-C - CT500X6SSD9
Crucial X6 1TB Portable SSD – Up to 800MB/s – USB 3.2 – External Solid State Drive, USB-C - CT1000X6SSD9
Product
PNY Elite
PNY Elite
Crucial X6
Crucial X6
Speed
Up to 430 MB/s
Up to 430 MB/s
Up to 540MB/s
Up to 540MB/s
Capacity
480 GB
960 GB
500 GB
1 TB
Price
$45.99
$94.99
$49.99
$69.99
-
PNY Elite 480GB USB 3.1 Gen 1 Portable Solid State Drive (SSD) - (PSD1CS1050-480-FFS)
Product
PNY Elite
Speed
Up to 430 MB/s
Capacity
480 GB
Price
$45.99
PNY Elite 960GB USB 3.1 Gen 1 Portable Solid State Drive (SSD) - (PSD1CS1050-960-FFS)
Product
PNY Elite
Speed
Up to 430 MB/s
Capacity
960 GB
Price
$94.99
-
Crucial X6 500GB Portable SSD – Up to 540MB/s – USB 3.2 – External Solid State Drive, USB-C - CT500X6SSD9
Product
Crucial X6
Speed
Up to 540MB/s
Capacity
500 GB
Price
$49.99
Crucial X6 1TB Portable SSD – Up to 800MB/s – USB 3.2 – External Solid State Drive, USB-C - CT1000X6SSD9
Product
Crucial X6
Speed
Up to 540MB/s
Capacity
1 TB
Price
$69.99

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.

A screenshot of a Windows PC showing the creation of an ssh file for the microSD card of a Raspberry Pi 4.

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.

Advertisement

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 SSH.

A screenshot of the application MobaXterm showing how to connect to a Raspberry Pi using ssh.

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:

Advertisement
sudo rpi-eeprom-update

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).

Advertisement

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.

4 thoughts on “How to boot Home Assistant on a Raspberry Pi 4 of an SSD”

  1. Hi, I have followed your guide but used a Samsung 970 Plus NVMe – instead of running faster than the SD card, it is painfully slow with Home Assistant. Just opening the account took nearly an hour and adding each integration was around 40 min. What am I doing wrong? Im using a raspberry PI 4 8GB. I have the NVMe plugged into the top blue USB. Also the NVMe is running really hot in this case
    “M.2 NVMe SSD Enclosure, Aluminum USB C 3.1 Gen 2 to M-Key M&B-Key NVMe PCIe 10Gbps External Enclosure, Fits 2230/2242/2260/2280 NVMe PCIe SSD, Tool-Fr”

    any help is much appreciated. Thank you in anticipation.

    Reply
    • Hello,
      I think you need to update raspberry firmware with this command :

      sudo apt update
      sudo apt full-upgrade
      sudo rpi-update

      Reply
  2. Thank you very much for this procedure.
    It works for very (so far) on RPi 4 2GB with USB SSD 110 GB in a Argon One enclosure.

    Can you tell me how I can install the Argon One scripts for controlling the internal fan in the enclosure?

    After connecting the SSD to the RPi my terminal is no longer accessible.
    Thanks for your help and understanding in advance.

    Regards
    Arjen
    Netherlands

    Reply

Leave a comment

Share to...