Why move Home Assistant off an SD card
A microSD card can wear out. Home Assistant writes to its database constantly, and a worn card can corrupt data or stop booting. A failed card also takes any on-device backups with it. An SSD handles that write load more reliably.
Before you start
- Take a full backup. Go to Settings > System > Backups, select Back up now, and download the backup to your computer.
- Save the encryption key. Recent versions encrypt backups. Without the key, the backup can’t be restored.
- Get the right image. Use
haos_rpi4-64for a Pi 4 orhaos_rpi5-64for a Pi 5. Don’t use the generic image.
What you need
- A Raspberry Pi 4 or Pi 5 running Home Assistant OS
- An SSD, and either a USB adapter or enclosure, or on a Pi 5, an M.2 HAT+ for an NVMe drive
- A computer with Raspberry Pi Imager or balenaEtcher
- An Ethernet cable and the Pi’s official power supply
A 2.5-inch SSD on a Pi 4 may need a powered USB hub if your power supply is marginal.
Step 1: Flash the SSD
Remove the microSD card from your computer’s reader, so you can’t pick it by mistake. In Raspberry Pi Imager, choose your Pi model, then Other specific-purpose OS > Home assistants and home automation > Home Assistant, and choose Home Assistant OS. Select the SSD as the storage device, check it twice, and write the image. Writing erases the drive.
You can also write the downloaded image with balenaEtcher.
Step 2: Set the boot order
Raspberry Pi 4: the bootloader must be from late 2020 or newer. In Raspberry Pi Imager, open Misc utility images > Bootloader, choose USB Boot, and follow the prompts to update the bootloader.
Raspberry Pi 5: in Raspberry Pi Imager, use the bootloader image named NVMe/USB Boot, and follow the prompts to set the boot order.
Step 3: Swap the drives and restore
- Shut down from Settings > System in Home Assistant, then wait until the Pi is fully off.
- Remove the microSD card. This stops the Pi from booting the old system.
- Connect the SSD to a USB 3 port (or the M.2 HAT+ on a Pi 5), connect Ethernet, and apply power.
- Wait for the first boot. The onboarding screen offers Restore from backup. Upload your backup, enter the encryption key, and confirm.
Restoring can take 10 to 30 minutes or more, depending on the size of the backup.
Step 4: Check the restored system
- Open
http://homeassistant.local:8123and check your devices, automations and dashboards. - Check that the Pi has the same IP address. If your router reserves the address by the Pi’s MAC address, it usually stays the same, because the Pi’s network hardware hasn’t changed.
Step 5: Keep the SD card until you’re sure
Keep the old microSD card unchanged for a while. If the SSD install fails, you can boot from the card again. Once everything works, store the card or reuse it.
Options if you don’t want a full move
- Move only the data. In Settings > System > Storage, select Move data disk to store Home Assistant’s data on the SSD. The boot partition stays on the microSD card, so the card still matters.
- Clone the card. You can copy the SD card’s image to the SSD. This copies any existing corruption, so do it only with a healthy card.
Common mistakes
- Copying files by hand. Home Assistant OS uses several partitions. Flash the image and restore your backup instead.
- Forgetting the encryption key. An encrypted backup can’t be restored without it.
- Using an incompatible adapter. Some USB-to-SATA adapters cause errors. A known-good adapter avoids most of these problems.
- Underpowering a Pi 4. A 2.5-inch SSD can need more current than a marginal supply provides.
- Leaving the SD card in during first boot. Remove it before you boot from the SSD.
For the full Pi setup, see how to set up Home Assistant on a Raspberry Pi. For storage and power advice, see which Raspberry Pi do I need to run Home Assistant.