Build a Budget NAS with Raspberry Pi 5

Turn a Raspberry Pi 5 into a network-attached storage server running OpenMediaVault. This guide covers choosing between USB 3.0 drives and NVMe HATs, flashing OMV 7, and configuring SMB and NFS shares accessible from Windows, macOS, and Linux clients.

Intermediate · 1 hour · 6 steps

What You Need

NAS server (4GB is sufficient for OpenMediaVault)
NAS server with headroom for Docker containers alongside OMV

Step-by-Step Instructions

  1. Step 1 Choose Your Storage Strategy

    The Raspberry Pi 5 offers three storage paths for a NAS build, each with different performance and cost tradeoffs. Understanding these before buying hardware saves money and frustration.

    USB 3.0 external drives are the simplest option. The Pi 5 has two USB 3.0 ports, each capable of approximately 420MB/s throughput. A single USB 3.0 SSD like a Samsung T7 delivers around 400MB/s sequential reads. However, Gigabit Ethernet caps network transfers at approximately 110MB/s in practice, so even a USB 3.0 HDD (which typically reads at 100-150MB/s) will nearly saturate the network link. For a budget NAS, a USB 3.0 HDD offers the best cost-per-terabyte.

    The Raspberry Pi M.2 HAT+ ($12) connects an NVMe SSD via the Pi 5's PCIe 2.0 x1 lane, delivering up to 450MB/s reads and 380MB/s writes. This is ideal if you want the OS on NVMe (faster boot, no SD card wear) while using USB drives for bulk storage. The HAT supports 2230 and 2242 form factors.

    For redundancy, connect two USB drives and configure them as a RAID 1 mirror in OpenMediaVault. This protects against single-drive failure but halves your usable capacity. JBOD (just a bunch of disks) pools drives into one volume with no redundancy — fine if you keep separate backups. Avoid RAID 5 on a Pi; the CPU overhead of parity calculations degrades performance significantly on an ARM processor.

    Tip: Use the official Raspberry Pi 27W USB-C power supply. It unlocks 1.6A across the USB ports (up from 600mA default), which is essential for powering external drives without a powered hub.
  2. Step 2 Flash Raspberry Pi OS Lite and Install OpenMediaVault

    Download and install the Raspberry Pi Imager on your computer. Insert a microSD card (16GB minimum, 32GB recommended) and flash Raspberry Pi OS Lite (64-bit, Debian 12 Bookworm). Do not use the desktop version — OMV requires a headless OS and will conflict with a desktop environment.

    In the Raspberry Pi Imager's advanced settings (gear icon), enable SSH, set a username and password, and configure your WiFi credentials as a fallback. Set the hostname to something memorable like "nas" so you can reach it at nas.local on your network.

    Insert the SD card into the Pi 5, connect Ethernet, attach your storage drives, and power on. Wait 60-90 seconds for the first boot to complete, then SSH in: ssh [email protected].

    Install OpenMediaVault 7 with the official install script. Run: wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash. The installation takes 15-30 minutes depending on your internet speed. The Pi reboots automatically when finished. After reboot, the OMV web interface is accessible at http://nas.local (default login: admin / openmediavault).

    Tip: If you plan to boot from NVMe instead of SD, flash the OS to the NVMe drive using the Imager, then update the Pi 5 bootloader via raspi-config to set NVMe as the primary boot device. This eliminates SD card wear entirely.
  3. Step 3 Configure Network Settings

    Open the OMV web interface at http://nas.local in your browser. Log in with the default credentials (admin / openmediavault) and immediately change the admin password under System > General Settings > Web Administrator Password.

    Navigate to Network > Interfaces and verify your Ethernet adapter shows a valid IP address assigned by your router's DHCP. For a NAS that other devices need to find reliably, assign a static IP. Click the Ethernet interface, select Static, and enter an IP outside your router's DHCP range (for example, 192.168.1.50 with subnet 255.255.255.0 and your router's IP as the gateway).

    Set the DNS server to your router's IP or a public DNS like 1.1.1.1. Click Save, then Apply the pending configuration change in the yellow banner at the top. The web interface will reload at the new static IP.

    If you want remote access outside your home network, do not expose OMV directly to the internet. Instead, set up a WireGuard or Tailscale VPN on the Pi. Tailscale is the simplest option — install it via SSH with curl -fsSL https://tailscale.com/install.sh | sh, then run sudo tailscale up. Your NAS becomes accessible from anywhere via the Tailscale network without opening router ports.

    Tip: Bookmark the static IP in your browser. If you ever lose access, connect a monitor and keyboard to the Pi and run 'ip addr' to find the current IP address.
  4. Step 4 Create Shared Folders with SMB and NFS

    Before creating shares, mount your storage drives. Navigate to Storage > Disks to verify OMV detects your USB drives. Then go to Storage > File Systems, click Create, select your drive, choose EXT4 as the filesystem (best Linux compatibility and performance on ARM), and click OK. Wait for formatting to complete, then click Mount.

    Create shared folders at Storage > Shared Folders. Click Add and name your first share (for example, "documents" or "media"). Select the mounted filesystem and set the relative path. Create as many shared folders as you need — common setups include separate shares for documents, media, backups, and time-machine.

    Enable SMB for Windows and macOS access: go to Services > SMB/CIFS > Settings and toggle Enable. Then go to the Shares tab, click Add, and select your shared folder. Set "Public" to No for authenticated access. Uncheck "Browsable" only if you want a hidden share. Click Save and Apply.

    Enable NFS for Linux clients: go to Services > NFS > Settings and toggle Enable. Under the Shares tab, click Add, select the shared folder, and set the client IP range (for example, 192.168.1.0/24 to allow your entire local subnet). Set privilege to Read/Write. Click Save and Apply. NFS shares are mounted on Linux clients with: sudo mount -t nfs nas.local:/export/media /mnt/nas.

    Tip: For macOS Time Machine backups, create a dedicated share and enable the "Time Machine support" checkbox in the SMB share settings. Set a quota to prevent Time Machine from consuming all available space.
  5. Step 5 Set Up Users and Permissions

    Create user accounts for each person who will access the NAS. Navigate to Access Rights Management > User and click Add. Set a username and password. Do not add users to the ssh or sudo groups unless they need terminal access to the Pi.

    Assign permissions per shared folder. Go to Access Rights Management > Shared Folders, select a folder, and click Privileges. Set each user to Read/Write, Read Only, or No Access. For a family NAS, a common pattern is: everyone gets Read/Write on "media" and "shared", each user gets a private folder only they can access, and a "backups" folder is Read/Write for all but browsable only by admins.

    OMV applies POSIX permissions underneath. If you need finer control, SSH into the Pi and use standard chmod and chown commands on the shared directories under /srv/. But for most home NAS setups, the OMV web interface handles permissions adequately.

    Enable the Recycle Bin plugin to prevent accidental permanent deletions. Go to Services > SMB/CIFS > Shares, edit each share, and check "Enable recycle bin" under the Advanced Settings tab. Deleted files move to a .recycle folder within the share and can be recovered until you manually empty it.

    Tip: Create a dedicated "backup" user with write-only access for automated backup scripts. This prevents a compromised backup client from deleting existing backups — a simple defense against ransomware.
  6. Step 6 Connect from Windows, macOS, and Linux

    On Windows, open File Explorer and type \\nas.local or \\192.168.1.50 (your Pi's static IP) in the address bar. Windows prompts for credentials — enter the OMV username and password you created. Right-click a share and select "Map network drive" to assign it a drive letter for persistent access. Check "Reconnect at sign-in" so the drive mounts automatically.

    On macOS, open Finder and press Cmd+K (Go > Connect to Server). Enter smb://nas.local and click Connect. Authenticate with your OMV credentials. Drag the mounted share to your Finder sidebar for quick access. For Time Machine, open System Settings > General > Time Machine, click Add Backup Disk, and select the dedicated Time Machine share.

    On Linux, mount SMB shares with: sudo mount -t cifs //nas.local/media /mnt/nas -o username=your-user,uid=1000. For NFS shares: sudo mount -t nfs nas.local:/export/media /mnt/nas. Add entries to /etc/fstab for automatic mounting at boot. For NFS, the fstab line looks like: nas.local:/export/media /mnt/nas nfs defaults,_netdev 0 0.

    Test transfer speeds by copying a large file to the NAS. Over Gigabit Ethernet, expect 90-110MB/s with SMB and 100-115MB/s with NFS. If speeds are significantly lower, check that your Ethernet cable is Cat5e or better and that the Pi is not throttling due to insufficient power supply.

    Tip: If you see speeds below 50MB/s, run 'ethtool eth0' on the Pi via SSH and verify the link is at 1000Mb/s. A bad cable or switch port can silently negotiate at 100Mb/s, cutting throughput by 10x.

Frequently Asked Questions

Is 4GB RAM enough for a Raspberry Pi 5 NAS?

Yes. OpenMediaVault with SMB and NFS shares uses approximately 300-500MB of RAM. The 4GB Raspberry Pi 5 is more than sufficient for a dedicated NAS serving files to a home network. Choose the 8GB model only if you plan to run Docker containers (Plex, Nextcloud, Home Assistant) alongside OMV.

What transfer speeds can I expect from a Raspberry Pi 5 NAS?

Over Gigabit Ethernet, expect 90-110MB/s for SMB and 100-115MB/s for NFS file transfers. The network is the bottleneck, not the storage — a USB 3.0 SSD can do 400MB/s locally, but Gigabit Ethernet caps at approximately 125MB/s theoretical. Adding a 2.5GbE USB adapter can push throughput to around 280MB/s with an SSD.

Should I use an NVMe SSD or a USB hard drive for my Pi NAS?

For best cost-per-terabyte, use a USB 3.0 HDD. A 4TB USB HDD costs around $80-100 and provides plenty of capacity for a home NAS. Use the NVMe M.2 HAT+ for the boot drive to eliminate SD card wear, then attach USB drives for bulk storage. NVMe-only setups offer the fastest performance but at a higher cost per gigabyte.

Can I use RAID on a Raspberry Pi 5 NAS?

RAID 1 (mirroring) works well on the Pi 5 with two USB drives, providing automatic data redundancy with minimal CPU overhead. Avoid RAID 5 and RAID 6 — the parity calculations are CPU-intensive and degrade performance on the Pi's ARM processor. For most home users, RAID 1 or simple JBOD with separate backups is the better approach.

What power supply do I need for a Raspberry Pi 5 NAS with external drives?

Use the official Raspberry Pi 27W USB-C power supply (5.1V, 5A). It unlocks the full 1.6A USB power budget, which is necessary for powering bus-powered USB SSDs and 2.5-inch HDDs. Without it, the Pi limits USB power to 600mA total, and external drives may fail to spin up or disconnect under load.

How does a Raspberry Pi 5 NAS compare to a Synology or QNAP?

A Pi 5 NAS costs $60-100 for the board plus storage, versus $200-400 for an entry-level Synology DS224+. The Pi 5 delivers comparable Gigabit Ethernet throughput for basic file sharing. Synology and QNAP offer polished software, hot-swap drive bays, and better RAID support. Choose the Pi 5 for a budget build or learning project; choose a dedicated NAS appliance if you need reliability for critical data.

Can I access my Raspberry Pi 5 NAS remotely?

Yes. Install Tailscale on the Pi (one command, no port forwarding needed) to access your NAS from anywhere via a secure WireGuard tunnel. Alternatively, set up a WireGuard VPN server on the Pi or your router. Never expose SMB or NFS ports directly to the internet — these protocols have no built-in encryption and are frequent targets for attackers.