Pidiylab Logo

Pidiylab Title

Home Assistant on Pi 5 with NVMe

Published:

Updated:

Author:

Home assistant on pi 5 with nvme

Disclaimer

As an affiliate, we may earn a commission from qualifying purchases. We get commissions for purchases made through links on this website from Amazon and other third parties.

Introduction

So, you’re probably here because you’re tired of your smart home system lagging like it’s running off a potato. I get it. I used to run Home Assistant on an SD card too, and let’s just say it was like trying to stream 4K over dial-up. Once you’ve watched your Pi throw a tantrum during an automation you really needed, you start looking for a better way.

That’s where the Raspberry Pi 5 and an NVMe drive come in. It’s like giving your smart home the brain transplant it deserves. Faster boots, snappier dashboards, fewer corrupted SD cards—and if you go the supervised route, you’re basically running a mini-server that handles updates, add-ons, and network management like it’s clocking in for a shift.

This guide’s going to walk you through how to get that setup running right—no fluff, no magic wands. Just the exact parts, steps, and tweaks you’ll need. And yes, we’ll use Debian and do it the supervised way, because if we’re gonna do this, we’re gonna do it with a little self-respect.

Raspberry Pi 5 and NVMe Storage

New Hardware Capabilities

So, the Raspberry Pi 5 shows up with some real upgrades—not just another modest refresh. You’ve got a quad-core Cortex-A76 CPU, actual PCIe 2.0 lanes, and USB 3.0 ports that don’t scream when you plug in real storage. That PCIe lane? It’s what opens the door to NVMe. No more USB-to-SATA bridge juggling acts or praying your microSD doesn’t die mid-automation.

Power delivery got an upgrade too. The Pi 5 now expects a 27W USB-C power supply with PD, and it’ll absolutely complain if you cheap out on it. More power means more room for peripherals like NVMe drives, fans, or whatever else you want to throw at it. But just because it can handle more doesn’t mean your setup will if you skimp on cooling.

And yes, cooling matters now. This board runs hot—like, burn-your-desk hot—if you’re using all the horsepower. You’ll need a decent fan, maybe a heatsink or a thermal case. Don’t think slapping a little passive aluminum fin on there is enough.

NVMe Drive Compatibility

Let’s talk about that sweet NVMe upgrade. First off, the Pi 5 doesn’t have an M.2 slot out of the box. You need an adapter that connects to the PCIe header. Some folks are using things like the Pineberry Pi NVMe HAT or just a plain PCIe to M.2 adapter with a little riser.

Stick to M.2 NVMe drives—not SATA M.2s. If the label says SATA anywhere on the box, back away slowly. Also, don’t get cute with 4TB or fancy DRAM-less drives that pull weird power levels. Stick with something like the Kingston A2000 or Samsung 980 (non-Pro). They’re reliable, tested, and don’t draw more juice than the Pi can give without falling on its face.

Now, let’s be clear—the Pi 5 can’t boot straight from NVMe yet without a little firmware love. You’ll need to update your EEPROM with rpi-eeprom-update, tweak the bootloader config using rpi-eeprom-config, and maybe even set boot order preferences in the recovery image. It’s not rocket science, but it’s definitely not plug-and-play either.

The config file to watch is /boot/config.txt. You’ll want to enable PCIe and NVMe support explicitly, and while you’re at it, make sure the firmware version is post-October 2023. Anything earlier might not even recognize your drive.

Choosing the Supervised Install

Different Installation Paths

Now, before we get going, let’s clear up the mess of install types Home Assistant throws at you like a buffet of confusion. You’ve got:

  • Home Assistant OS – All-in-one. Great if you like no control.
  • Home Assistant Core – Run it in a Python environment. Also known as “I want pain.”
  • Container install – Dockerized version, but no Supervisor. You’ll be managing updates manually.
  • Supervised install – The middle ground. You get full control over the OS, and the Supervisor to manage add-ons, updates, and the HA UI.

Spoiler alert: we’re going with the Supervised install. Why? Because it’s the only way to run Home Assistant on your Debian-based OS and still have the luxury of the add-on store, automatic updates, and integration support without giving up control of the system underneath.

I’m sure some of you are going, “Why not just use the OS install?” Sure, it’s easy, but if you want to run something else on the Pi too, you’re out of luck. And if something breaks deep in the system, good luck finding logs in that locked-down environment.

Why Supervised?

Supervised means you’re the boss—but you still get a manager (the Supervisor) to handle the grunt work. It runs on Docker, checks your system health, manages Home Assistant core and add-on containers, and gives you access to all the good stuff like:

  • The add-on store (hello Samba, SSH, VS Code, and MQTT)
  • Configuration backups and snapshots
  • Notifications for updates and errors
  • Network and DNS handling via D-Bus and Network Manager
  • Integration with OS Agent for hardware-level communication

You also get to update your Debian base whenever you want, install other packages, or even run other services alongside HA—just don’t mess with Docker or Network Manager unless you like breaking things.

It’s a setup that says, “Yeah, I want control, but I also don’t want to spend three hours debugging YAML every time something changes.”

Setting Up Debian on NVMe

Flashing and Partitioning

All right, let’s get this show on the road. First step: getting Debian onto your NVMe drive. You’ll need either Debian 12 Bookworm or another supported base (but honestly, just use Bookworm—it’s what Supervisor expects). Download the netinst ISO or pre-made Raspberry Pi image and flash it to your NVMe using Raspberry Pi Imager or Balena Etcher.

Once flashed, plug the NVMe drive into your Pi 5 via a compatible M.2 PCIe adapter. On first boot, it may take longer than usual—this is normal. You’ll want to connect a keyboard and monitor if things go sideways. That blank screen might just mean the EEPROM isn’t configured right yet.

Once you’re in, use fdisk or gparted to create your partitions. For most folks:

  • 1 GB boot partition (FAT32)
  • Remainder as root (/) partition (EXT4 or BTRFS)

You don’t need swap, but if you’re running close to the 4GB or 8GB RAM limit, it might not hurt. Just keep it small and out of the way.

File System and Mounting

Here’s where things get a little nerdy. EXT4 is safe and stable—if you don’t want to think about snapshots or deduplication, just use it. If you’re feeling brave and like tinkering, BTRFS supports snapshots and might be worth it for system rollback and experimentation. Either way, don’t forget to enable TRIM for long-term drive health.

Edit /etc/fstab to mount your root partition with options like noatime and discard (for TRIM support). A typical line might look like:

UUID=xxxx-xxxx / ext4 defaults,noatime,discard 0 1

Run sudo mount -a to make sure it’s working. If it throws errors, fix them now. You don’t want to debug mount issues during a system update at 2 AM.

Network Setup

You’re gonna want a static IP. Why? Because DHCP is fine until your router gets drunk and starts handing out new addresses like raffle tickets. Then you’re stuck wondering why homeassistant.local suddenly doesn’t work anymore.

Use Network Manager, which is required anyway by Supervisor. The fastest way is using nmtui:

sudo nmtui

Set your static IP, DNS servers (Cloudflare: 1.1.1.1 or Google: 8.8.8.8), and gateway. Reboot to apply.

Install Avahi for mDNS so you can access your Home Assistant dashboard via homeassistant.local:8123 without memorizing IPs.

sudo apt install avahi-daemon

Check it’s working by pinging from another device on the network.

Installing Home Assistant Supervised

Dependencies and Required Packages

Here’s the part where a lot of installs go sideways. The Supervised method has opinions—and it’s not shy about throwing errors if those aren’t met. You need a very specific environment. Debian 12 Bookworm? Check. Docker installed the right way? Check. Network Manager running and not replaced by something clever like netplan? Check.

Start by installing these packages:

sudo apt install -y \
  apparmor \
  avahi-daemon \
  dbus \
  jq \
  network-manager \
  software-properties-common \
  curl \
  wget \
  udisks2 \
  systemd-journal-remote \
  systemd-resolved

Make sure Network Manager is managing your main interface:

nmcli device status

If it says “unmanaged,” Supervisor is going to throw a fit. Fix it by editing /etc/NetworkManager/NetworkManager.conf and removing or commenting out any unmanaged-devices.

Now install Docker CE the correct way (not with apt install docker.io, unless you enjoy broken dependencies). Use Docker’s own install script or the instructions from their docs:

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

Add your user to the Docker group:

sudo usermod -aG docker $USER

Reboot. Then install OS Agent:

wget https://github.com/home-assistant/os-agent/releases/latest/download/os-agent_1.6.0_linux_aarch64.deb
sudo dpkg -i os-agent_1.6.0_linux_aarch64.deb

Check that it’s installed:

gdbus introspect --system --dest io.hass.os --object-path /io/hass/os

If that command works without errors, you’re good to go.

Using the Installer Script

With all that out of the way, it’s time to run the Supervised Installer from Home Assistant’s official GitHub repo.

Clone it and run:

git clone https://github.com/home-assistant/supervised-installer.git
cd supervised-installer
sudo bash installer.sh --machine raspberrypi5-64

If your base system is clean, the script will pull all the necessary Docker images, configure the Supervisor, and fire up the Home Assistant container. You’ll see new containers with names like hassio_supervisor and homeassistant.

Now check that everything is running:

docker ps

You should see Supervisor and Home Assistant containers up. Give it a minute or two to settle before opening your browser and heading to:

http://homeassistant.local:8123

Or use your Pi’s IP address if mDNS is acting weird.

You’ve now got a fully functional supervised Home Assistant install on your Raspberry Pi 5 with NVMe. Not bad.

Configuration and Customization

File Layout Overview

Let’s take a moment to peek under the hood. Once everything’s up and running, Home Assistant creates a bunch of important directories. Knowing where things live is half the battle when something inevitably breaks.

  • /config: This is the main config directory. It holds configuration.yaml, your secrets, automations, and backups.
  • /usr/share/hassio: The runtime environment for the Supervisor and related services.
  • /etc/docker: Docker daemon settings. Not usually something you touch unless you need to enable experimental features.
  • /mnt/data: If you’ve mounted a separate data volume on your NVMe, this is where long-term logs or backups can go.

Keep backups of /config. Everything lives in there: your UI layout, device settings, automations, scripts, and all the YAML glory.

Editing YAML Safely

Now I know YAML has a reputation. One wrong indent and your automation turns into a decorative error message. That’s why the Studio Code Server add-on exists. Install it, fire it up, and edit your config files from the browser with syntax highlighting, tab control, and a built-in terminal.

Inside configuration.yaml, you’ll find things like:

homeassistant:
  name: My Smart Home
  latitude: 40.7128
  longitude: -74.0060
  unit_system: metric
  currency: USD

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

Keep secrets out of this file. Use secrets.yaml like this:

api_key: !secret my_api_key

And then define that in secrets.yaml:

my_api_key: abcd1234

Makes it easier to back up and move systems without leaking sensitive info like passwords or webhook tokens.

Add-ons and Services

This is where supervised really earns its stripes. You can install and manage official and community add-ons right from the web UI. Some essentials:

  • Samba Share: Access your /config folder over the network.
  • SSH & Web Terminal: Manage the host system from your browser.
  • Studio Code Server: For editing YAML with your sanity intact.
  • Mosquitto Broker: Required for MQTT devices.
  • ESPHome: If you’ve got custom sensors or switches.

Each one installs in a container and integrates directly into the Supervisor dashboard. You’ll also see update notifications when new versions drop, so you’re not flying blind.

Add-ons can be configured with their own YAML or JSON settings. Click the gear icon in the UI and tweak to taste.

Network and Remote Access

Access Methods

Once Home Assistant is running, you’ve got a few ways to get in. The easiest is:

http://homeassistant.local:8123

That’s assuming Avahi is working and your network doesn’t treat mDNS like a virus. If that fails, you’ll need to use the Pi’s IP address. This is why setting a static IP earlier was smart—no guessing.

For remote access, you’ve got options:

  1. Port Forwarding: Open port 8123 on your router and point it to your Pi. Be aware, this exposes your instance to the internet. Use TLS.
  2. NGINX Proxy Add-on: This gives you HTTPS using Let’s Encrypt and masks your internal IP behind a friendly domain.
  3. Nabu Casa: It’s a paid service, but it handles all the setup and encryption. Worth it if you don’t want to fiddle with DNS and cert renewals.

Check access by visiting from a phone on cellular or asking a friend to test your domain.

Securing the Interface

Look, your home automation system controls lights, locks, alarms—you don’t want just anyone poking around in there. Start with:

  • SSH key authentication on your Pi. Disable password login altogether in /etc/ssh/sshd_config.
  • Strong user passwords in Home Assistant. If you’re using default or guessable ones, fix that now.
  • Two-factor authentication is available in the user profile settings. Use it.
  • TLS certificates if you’re self-hosting. The NGINX SSL Proxy add-on makes this easier than doing it by hand.

Use tokens instead of your main password when integrating other services. Home Assistant lets you create long-lived access tokens under your user profile.

And finally, don’t forget to update your router firmware. Seriously. If you’re still rocking version 1.0 from 2017, it’s not doing you any favors.

Integrations and Devices

Popular Protocols and Devices

Here’s where things get fun. The reason most of us run Home Assistant isn’t for the dashboard—it’s to control everything. That means supporting a bunch of smart home protocols.

  • Zigbee: Use ZHA (built-in) or Zigbee2MQTT (more powerful). You’ll need a Zigbee dongle like the Sonoff ZBDongle-P or Conbee II.
  • Z-Wave: Requires a Z-Wave stick like the Aeotec Z-Stick 7. Works great with the Z-Wave JS integration.
  • ESPHome: Perfect for DIY smart switches, sensors, or displays. Flash an ESP32, define behavior in YAML, and boom—your own device.
  • MQTT: The glue that connects all sorts of oddball devices. Mosquitto broker handles the messages, and you can monitor everything with MQTT Explorer.

All these integrations are easy to set up through the Home Assistant interface. Search, install, and most devices get auto-discovered. Others just need a bit of YAML and patience.

Home Assistant makes devices show up as entities, and you can organize them into areas, devices, and automations. Keep names short and memorable—you’ll thank yourself when writing triggers later.

Device Examples

Here are some smart home gear that’s been battle-tested on a Raspberry Pi 5 Supervised setup:

  • TP-Link Kasa HS110 (Smart plug with energy monitoring)
  • Philips Hue Bulbs (via Hue Bridge or direct Zigbee)
  • Sonoff Basic R3 (Cheap smart switches, easily flashed)
  • Aqara Motion and Door Sensors (Zigbee, small and fast)
  • Wyze Cam v3 (RTSP support, works with MotionEye or third-party integrations)
  • Govee Light Strips (Cloud-based, some models support local API)
  • Nest Thermostat (Requires OAuth setup but doable)
  • Shelly 1PM (WiFi relay with power metering, local API)
  • Tuya Plugs (Convert to local mode if possible)
  • Ring Cameras (Via custom integration)

Want local control only? Stick to Zigbee and ESPHome devices. They don’t rely on cloud APIs that break when someone sneezes.

All these devices integrate neatly into your dashboard, automation engine, and mobile apps. Just don’t try to pair 200 Zigbee lights through a single USB stick with no coordinator antenna—you’ll regret it.

Performance and Stability

Power and Cooling

Let’s talk power—because your Raspberry Pi 5 might be smart, but it’s also a bit needy. You’re going to need a proper USB-C PD power supply, ideally the official 27W PSU. Anything less, and your NVMe drive could act flaky or your system might throttle under load.

Avoid plugging your Pi into your TV’s USB port or a 5V phone charger. It might boot, but as soon as Docker containers spin up or the NVMe tries to write logs, it’ll crash harder than an overclocked CPU on a Texas summer day.

Now, the Pi 5 also runs hot—even idle. Passive cooling might keep it alive, but don’t expect consistent performance. Grab a small fan or a thermal case like the Argon ONE V3. If you’re using an NVMe HAT, make sure it includes a heatsink for the SSD.

You can also control a GPIO fan using automation:

- alias: "Turn on fan if CPU temp over 60C"
  trigger:
    platform: numeric_state
    entity_id: sensor.cpu_temperature
    above: 60
  action:
    service: switch.turn_on
    target:
      entity_id: switch.fan

Keeps things from melting down when Home Assistant decides to reindex the whole Recorder database.

NVMe vs SD vs USB

Here’s where NVMe shines. Real-world performance differences:

Storage TypeBoot TimeWrite SpeedI/O ConsistencyLongevity
MicroSD~50 sec20–30 MB/sLowLow
USB 3.0 SSD~35 sec80–100 MB/sMediumMedium
NVMe SSD~20 sec500+ MB/sHighHigh

With NVMe:

  • The frontend loads snappier
  • Database writes don’t lag during high sensor activity
  • Snapshots take seconds, not minutes
  • Log writes and boot times drastically improve

Logs don’t lie. You can run journalctl -b --no-pager and check boot time logs or measure I/O performance with hdparm or fio. NVMe consistently comes out ahead.

There’s a reason folks use it in NAS builds and mini-servers. You’re just applying that power to your smart home now.

Maintenance and Troubleshooting

Update Management

Home Assistant moves fast—weekly releases, core updates, supervisor updates, and add-ons all doing their own thing. The supervised install makes this manageable without handing over the keys.

Here’s what you’re updating:

  • Home Assistant Core: The main application
  • Supervisor: Manages updates and system state
  • Add-ons: MQTT, Studio Code, Samba, etc.
  • Operating System: Your Debian base (manual via apt)

Updates appear in the Supervisor dashboard. Hit “Update” and let it do its thing. No need to SSH into the Pi and run git pull or fiddle with containers.

If you’re cautious (or just paranoid, like me), wait 2–3 days after a new release. Hit the forums. If something breaks, it’ll be there in all caps by page two.

Backup Strategies

Let’s say you automate your lights, locks, coffee maker, and your garage door. Now imagine your drive fails and all that goes with it. Not great.

That’s why snapshots (now called backups) are non-negotiable.

  • Schedule regular backups through the Supervisor
  • Download them to your PC or offload to another volume (/mnt/data or a USB stick)
  • Use the Samba add-on or Google Drive Backup add-on for auto-upload

You can restore backups via the web UI if the system breaks, or reflash your base OS and drop in your last backup to recover everything.

Monitoring and Logs

If something feels off, don’t just stare at the dashboard like it’s going to confess. Check your logs.

  • home-assistant.log in /config: Main app log
  • Supervisor Logs in the UI: Container, update, and OS messages
  • journalctl: For system logs, boot errors, services

Use filters like:

journalctl -u hassio-supervisor
journalctl -u docker

For performance metrics, the System Health tab tells you uptime, version info, and integration status.

Don’t ignore weird CPU spikes or sudden slowdowns—those usually mean something’s misconfigured, an add-on is misbehaving, or your SD card/NVMe is struggling.

Common Fixes

Some of the greatest hits:

  • Supervisor Unhealthy?
    • Check if Network Manager is running.
    • Confirm OS Agent is installed.
    • Use ha supervisor repair.
  • No NVMe boot?
    • Check EEPROM config with vcgencmd bootloader_version.
    • Confirm correct PCIe adapter.
    • Update bootloader.
  • Container won’t start?
    • Run docker ps -a and docker logs <container_name>.
    • Look for port conflicts or missing volumes.
  • Can’t access web UI?
    • Reboot.
    • Check IP hasn’t changed.
    • Try ha core restart from the CLI.

Backups and snapshots aren’t just a checkbox. They’re your seatbelt. Use them.

Final Thoughts

You made it—hopefully without bricking your Pi or throwing your NVMe adapter across the room. What you’ve built here isn’t just a smart home hub. It’s a stable, fast, and self-managed system that can run 24/7 without needing constant babysitting.

With the Raspberry Pi 5 and NVMe, you get:

  • Speed: No more sluggish dashboard or 30-second restarts.
  • Durability: NVMe won’t croak after 40 write cycles like those $5 SD cards.
  • Control: Supervised install lets you run add-ons, manage containers, and still tinker under the hood.

It’s a great balance between hands-on and hands-off. You’re not stuck in a locked-down OS, but you’re also not compiling Python packages manually just to flip a switch. And because it’s based on Debian, it’s reliable and widely supported—something you’ll appreciate the first time an update doesn’t break everything.

Got plans to scale? You’re ready for it. Add Zigbee networks, energy dashboards, ESPHome sensors, or a NAS integration—it’ll all run smoother than ever. This setup gives you a foundation to build the kind of home automation that works in the background without drama.

Keep backups, read the logs, and don’t install random add-ons without checking Reddit first. Other than that? You’re good.

FAQ

Can I boot directly from NVMe on the Raspberry Pi 5?
Yes, after updating the EEPROM firmware and configuring the bootloader correctly.

Is supervised install officially supported?
Yes, but only on Debian-based systems. Deviate from that and you’re on your own.

Why not use Home Assistant OS?
HA OS is great for simplicity, but it locks down the system. Supervised gives you more flexibility.

What NVMe drives work best?
Drives like the Kingston A2000, Samsung 980 (non-Pro), and Crucial P3 are solid and power-efficient.

Do I need a fan?
Yes. Unless you like thermal throttling and random reboots, use a fan or a thermal case.

References

Was this helpful?

Yes
No
Thanks for your feedback!

About the author

Latest Posts

Pi DIY Lab