banner nvme ssd pi

How to Use an NVMe SSD on Raspberry Pi (Step-by-Step Guide)

If you click our links and make a purchase, we may earn an affiliate commission. Learn more

NVMe SSDs are an amazing upgrade for the Raspberry Pi because they are both smaller and faster than traditional SSDs. But it’s not immediately obvious which Pi models support NVMe drives or how to connect one. In this article, I’ll show you how it works and how to get one up and running.

An NVMe SSD can be installed on Raspberry Pi 5 and Pi 4 with a special case, M.2 HAT, expansion board, or USB enclosure. The Pi’s boot configuration and boot order must be modified to use an NVMe.

Let’s start with a few things you need to know before we get into the technical details. After that, you’ll learn how to get the most out of your Raspberry Pi.

If you’re new to Raspberry Pi or Linux, I’ve got something that can help you right away!
Download my free Linux commands cheat sheet – it’s a quick reference guide with all the essential commands you’ll need to get things done on your Raspberry Pi. Click here to get it for free!

Why Use an NVMe SSD on Raspberry Pi?

Using an NVMe SSD on a Raspberry Pi can dramatically improve storage performance, offer faster read/write speeds, and result in lower latency compared to traditional storage options like SD cards or external hard drives.

Traditional SSD, NVMe case, Raspberry Pi case with NVMe slot and another traditional SSD.

I remember when my computer relied on those big, blocky hard disks (HDDs). No matter how quickly CPUs and GPUs advanced, my operating system still felt sluggish and games took forever to load.

That all changed with the advent of solid-state drives (SSD), and I’ve been in love with their speeds and quiet operation ever since. I only use SSDs, except for in my NAS setup with Plex. And when I thought life couldn’t get any better, along came NVMe SSDs.

A Non-Volatile Memory Express (NVMe) drive is still considered an SSD because it uses NAND flash chips. But NVMe SSDs are slim like RAM sticks and are starting to come in smaller packages.

Here’s a comparison of the different storage types for Raspberry Pi and their physical sizes:

Storage TypeDimensions
HDD (3.5″)146 mm x 102 mm x 20 mm
SSD (2.5″)100 mm x 70 mm x 7 mm
NVME SSD22 mm x 80 mm x 2.5 mm — (M.2 2280)
22 mm x 60 mm x 2.5 mm — (M.2 2260)
22 mm x 42 mm x 2.5 mm — (M.2 2242)
22 mm x 30 mm x 2.5 mm — (M.2 2230)
Micro SD Card15 mm x 11 mm x 1 mm

As you can see, an NVMe SSD is much smaller than a traditional 2.5-inch SSD.

Something not working as expected?
You can get answers from real experts in minutes.
Get help with your setup

I think the form factor names can be confusing. For example, M.2 2280 simply refers to a drive’s physical size (22 x 80 mm). You might have assumed those numbers refer to performance or storage specs—but they don’t.

I’m very impressed by the M.2 2230 form factor: these drives can hold 2 terabytes of data in a square the size of a standard SD card. This compact shape makes it a great fit for the Raspberry Pi’s mind-blowing use cases.

nvme ssd sizes
Credit: Western Digital

Of course, the significance of an NVMe drive goes beyond its shape. An NVMe connects to the M.2 header on a motherboard, giving it direct access to the board’s fast PCI express lanes. (The Raspberry Pi’s PCIe connector is the same high-speed connection used by powerful GPUs on regular desktop PCs.)

Here’s a comparison of typical sequential read/write speeds for different drive technologies:

Storage TypeInterfaceRead/Write Speed
Micro SD CardSD card reader 80 MB/s – 200 MB/s
SSD (2.5″)SATA III 400 MB/s – 550 MB/s
NVMe SSD (PCIe 3.0)M.21,500 MB/s – 3,500 MB/s
NVMe SSD (PCIe 4.0)M.22,000 MB/s – 6,500 MB/s
NVMe SSD (PCIe 5.0)M.27,000 MB/s – 12,000 MB/s

The estimates above are what you might get on a desktop PC—not the real-world speeds you’ll see on a Raspberry Pi, which can’t hit these max theoretical speeds yet. But I think it paints a clear picture of relative capability.

NVMe SSDs are now the fastest storage retail consumers can buy. It is superior technology that has become the new standard in computer storage.

Recommended next step
Master Raspberry Pi in 30 Days

If you want a clearer path than jumping from tutorial to tutorial, my book gives you a step-by-step roadmap to really understand your Raspberry Pi.

Check the book here

How to Connect an NVMe Drive to Raspberry Pi?

Unfortunately, you can’t directly connect an NVMe SSD to a Raspberry Pi unless you use additional hardware .

I’ll review the options available so you can pick the one that’s best for you.

Hey, if you’re feeling a bit overwhelmed by all the technical stuff, I can help you! I created a 30-day challenge to help you go from beginner to expert. With it, you can finally get a better understanding of this jargon and complete many fun and useful projects faster. See what’s inside here.

Raspberry Pi Cases with NVMe Support

The easiest way to connect an NVMe is to use a Raspberry Pi case that comes with NVMe support. I can slot an NVMe drive in the way I would when building a desktop PC.

Here are popular cases I recommend that have built-in NVMe support:

I like that these cases provide heat sinks for the NVMe drive, which is helpful since it has a habit of overheating. It’s also helpful that these vendors provide a list of compatible drives, making it easier to know whether my particular brand and model will work.

Read/Write Speeds: 500 MB/s to 800 MB/s

Supported Models: Raspberry Pi 5
(Note: The Raspberry Pi 500+ now includes NVMe support by default.)

What about the Pi 4? There are some cases that support M.2 SATA drives for Raspberry Pi 4, but they do NOT support M.2 NVMe drives.

M.2 HAT or Expansion Boards with NVMe Support

If you don’t want or can’t use a full case for your Pi, the next best way to connect NVMe is to add a HAT or expansion board. These peripherals stack on top of your Pi—like a sandwich—and hold the NVMe drive in place.

Here are a few of my recommendations:

Note: Before purchasing, make sure your NVMe will fit. NVMe drives come in different physical form factors, which we covered in the previous section.

Read/Write Speeds: 400 MB/s – 800 MB/s

The Pi 5 options will be closer to the high end of the speed estimate above since they connect directly to a PCIe header. The Pi 4 expansion board connects via USB, so it will be on the lower end of the speed range (it can go a little faster if your NVMe drive supports UASP).

Supported Models: Raspberry Pi 5 / Pi 4

What about the Pi 3? There are expansion boards that support M.2 SATA drives for Raspberry Pi 3B+ / 3B, but they do NOT support M.2 NVMe drives.

USB 3.0 Enclosure for NVMe Drives

usb 3.0 enclosure for nvme drive
Credit: Plugable

Sometimes, I like being able to move my NVMe drive between different devices to use as an external drive. In this case, I find that using a USB NVMe enclosure is the most flexible option.

Here are a couple of my picks for USB 3.0+ enclosures for NVMe drives:

Read/Write Speeds: 300 MB/s – 500 MB/s

To get these speeds, you’ll need to connect your enclosure to USB 3.0, which are the blue ports on your Raspberry Pi.

You won’t reach as high a speed as the options above because the USB interface is not as fast as PCIe. Regardless, it’ll still feel like blazing speeds compared to a traditional micro SD card.

Supported Models: Raspberry Pi 5 / 500 / 500+ and Raspberry Pi 4 / 400.

What about the Pi 3? Technically, the Pi 3 can still utilize an NVMe enclosure. But its USB 2.0 ports will significantly limit your drive’s speeds.

How to Boot to an NVMe Drive on Raspberry Pi?

To boot from an NVMe drive on a Raspberry Pi, you need to update the bootloader to support NVMe boot and configure the Raspberry Pi to boot from the drive.

Now that you have the hardware hooked up, you’re ready to start using your new NVMe.
In this section, I’ll show you how to set it up.

nvme ssd connected to Pi inside case

Step 1: Enable PCIe on the Raspberry Pi

Note: On the newest Raspberry Pi boards with the newest firmware, this step might no longer be necessary.

First, let’s get your Raspberry Pi to detect your NVMe drive by enabling PCIe:

  • Connect the NVMe SSD to your Raspberry Pi.
  • From a running system, edit your Raspberry Pi’s ”BIOS” file:
    sudo nano /boot/firmware/config.txt
  • Add this line at the bottom:
    dtparam=nvme
    Note: if you have a Pi 5 and want to force faster PCIe3 speeds, add an additional line:
    dtparam=pciex1_gen=3
    (If this setting makes your system unstable, then remove this extra line.)
  • Reboot:
    sudo reboot now

Step 2: Flash an Operating System onto the NVMe SSD

Next, let’s put an operating system onto your NVMe drive.

If you want to start fresh, you can flash Raspberry Pi OS—or another operating system—onto your new NVMe drive.

You can do this from a system running on the Pi itself with Raspberry Pi Imager. If you did the previous step correctly, the NVMe SSD should appear under the “Storage” section.

What if you want to preserve your existing system instead? In that case, you can clone your SD card onto your NVMe with the SD Card Copier tool. If you need more help, read our article: How to Migrate From SD Card to NVMe SSD on Raspberry Pi.

sd card copier raspberry pi os desktop to nvme

Step 3: Change the Boot Order to NVMe

Finally, we need to tell your Raspberry Pi to prioritize booting to the NVMe SSD first.

  • Launch the Raspberry Pi Software Configuration Tool from the command line:
    sudo raspi-config
  • Go to Advanced Options > Boot Order.
  • Select NVMe/USB Boot.
    Hit ENTER to Save and then exit with Finish.
  • Shut down and remove your SD card:
    sudo shutdown now

When you start your Pi again, your system should boot from your new NVMe drive. Nice!

Note: If you want to see how to boot to an SSD for blazing fast speeds, I have a video on this topic just for community members. Join here to watch, and get access to 30+ other lessons for Raspberry Pi along with many other benefits!


🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Something not working? Don't waste hours going in circles. Ask in the RaspberryTips Community and get help from people who've already figured it out. Get unstuck now.

FAQ

Is an NVMe upgrade worth it for Raspberry Pi?

Yes, especially if you’re still using an SD card on a Raspberry Pi 5 or Pi 4 . Like replacing an HDD with an SSD on an old PC/laptop, adding an NVMe drive to your Pi is the biggest performance boost you’ll directly feel.

However, if you’re already using a regular SSD on your Pi, then the gains from an NVMe SSD might not be as noticeable.

Does it matter if the NVMe SSD is PCIe Gen 3, 4, or 5?

No, any NVMe with PCIe3 or newer will perform similarly on the Raspberry Pi. Newer PCIe generations are backward compatible, meaning even if you have a PCIe5 drive, it will still work on a board or USB enclosure that only supports PCIe3.

Either way, you’ll be limited by the Pi’s connection bandwidth before you reach NVMe max speeds. If costs are similar either way, I’d opt for a newer-gen drive.

More importantly, you should check whether your NVMe’s form factor physically fits into your case/HAT/enclosure (see our table above) and that your case/HAT/enclosure specifically supports your new drive’s brand and model. Not all drives will work with all peripherals.

If I have an existing system on my SD card, can I move it onto the NVMe SSD?

Yes, you can clone your existing SD card system to an NVMe SSD.
We wrote a guide here: How to Migrate From SD Card to NVMe SSD on Raspberry Pi.

Do I have to worry about wearing out an NVMe drive?

Probably not, since the write endurance of an NVMe drive is 2x – 10x higher than that of a micro SD card. With normal use, you’ll probably never run into these limits. Nevertheless, I still recommend installing Log2Ram on your Pi to maximize your drive’s lifespan.

Whenever you’re ready, here are other ways I can help you:

Test Your Raspberry Pi Level (Free): Not sure why everything takes so long on your Raspberry Pi? Take this free 3-minute assessment and see what’s causing the problems.

The RaspberryTips Community: Need help or want to discuss your Raspberry Pi projects with others who actually get it? Join the RaspberryTips Community and get access to private forums, exclusive lessons, and direct help.

Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.

Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.

Master Linux Commands: Overwhelmed with Linux commands? This book is your essential guide to mastering the terminal. It includes practical tips, real-world examples, and a bonus cheat sheet to keep by your side.

You can also find all my recommendations for tools and hardware on this page.

Similar Posts

Leave a Reply

Community members only
Comments are reserved for RaspberryTips Community members. Join the community to ask questions, get help, and interact with other Raspberry Pi users.

Join the community  or  log in