The Raspberry Pi is a powerful single-board computer that has become incredibly popular for DIY electronics and programming projects. Thanks to its affordability, versatility, and processing capabilities, the Raspberry Pi makes an excellent platform for building a customized network-attached storage (NAS) device.
In this comprehensive guide, we will show you how to transform your Raspberry Pi 4 into a fully-featured NAS server using OpenMediaVault (OMV), an open source NAS solution.
Prerequisites
To follow along with this Raspberry Pi NAS tutorial, you will need:
- Raspberry Pi 4 model B with 8GB RAM
- MicroSD card (16GB Class 10 minimum)
- Power supply
- External USB hard drive or SSD for storage
- Ethernet cable
- Another computer for SSH/remote access
We will be using the Raspberry Pi OS 64-bit operating system. You can download the Raspberry Pi Imager to flash this OS onto your microSD card.
Once you insert the microSD card loaded with Raspberry Pi OS into your Pi, connect it to your router via Ethernet, then power it on. Make note of the IP address displayed on screen once it boots up.
With the Pi on your local network, it‘s time to put OpenMediaVault on it!
Installing OpenMediaVault 5 on the Raspberry Pi
OpenMediaVault (OMV) is a free Linux distribution designed specifically for building NAS solutions. It includes an easy web-based admin panel for managing storage, users, services, plugins and more.
First, let‘s SSH into our Pi so we can download and run the OMV installation script:
ssh pi@192.168.1.xxx (replace with your Pi‘s IP address)
Use the default password raspberry when prompted.
Before installing third party software, it‘s best practice to update the system packages:
sudo apt update
sudo apt full-upgrade
With the system updated, we can now grab the latest OMV 5 install script:
wget https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install
Make the script executable:
sudo chmod +x install
Now simply execute it with sudo:
sudo ./install
The installation process will take 10-15 minutes to fully complete. The Pi will automatically reboot when finished.
Once your Pi reboots, OMV 5 will be accessible through a web browser using your Pi‘s IP address:
http://192.168.1.xxx
Login with the default credentials:
- Username:
admin - Password:
openmediavault
Awesome! With OpenMediaVault now installed, we have an easy browser-based GUI to configure our NAS.
Setting Up Storage in OMV
Since the Raspberry Pi 4 only has an SD card slot built-in, we will need to attach external USB storage to actually take advantage of NAS capabilities.
Virtually any USB drive can work – external HDDs, SSDs, flash drives, etc. The setup process is identical no matter what.
For optimal performance, a USB 3.0 SSD is recommended. But a large external hard disk drive allows for increased overall storage.
Connect your chosen USB drive to one of the Pi 4‘s blue USB 3.0 ports. Log in to your Pi‘s OMV web interface to get started with configuration.
To make our attached storage usable in OMV, we need to mount it. Click on Storage from the sidebar and go to Disks. Your connected drive should appear in this list.
From the dropdown menu, select your drive then click Wipe. This will fully format the drive and erase all existing data/partitions on it.

- Set mode to
Quick - Check
No partition tablefor full format.
Now we need to create a filesystem that OMV can actually utilize. Navigate to File Systems and click Create. Configure as follows:
- Select your wiped disk from the
Devicedropdown - Input a name into
Label, like "OMVStorage" - Choose filesystem format –
EXT4recommended - Click
OK

With a blank filesystem now created, head back to Disks and select the device. Click Mount to connect the storage into OMV‘s environment.

Hit Apply and confirm to complete the mounting process. Awesome! Our USB storage is now online and managed through OpenMediaVault.
We can utilize these disks to create shared folders, backups, plugins and more. Next let‘s set up user access with SMB/CIFS file sharing.
Configuring SMB/CIFS File Sharing
The SMB protocol allows cross-platform file transfers between Linux systems like our Pi NAS and Windows PCs on the same home network.
From OMV‘s web UI sidebar click Access Rights Management and open the Shared Folders tab. Click Add to create a new folder.
In the sharing settings, configure the following:
- Select the filesystem we setup earlier from the
Devicedropdown - Input a
Folder Name, like "NAS1" - Enable both SMB/CIFS and NFS access
- Allow guest access by choosing
Guestsfor access rights

Click Save and Apply to create the new shared folder.
Now we need to officially enable Samba server capabilities in OMV. Go to Services in the sidebar and select SMB/CIFS. Toggle the main service button ON to activate it.

At this point, SMB/CIFS sharing should be fully up and running. But we still should define shares that will be accessible from Windows/macOS devices on the network.
Stay in the SMB/CIFS menu and click the Shares tab. Click Add to expose our NAS1 share folder.

Make any auth changes you want, then hit Save. Our NAS shared folder will now appear in Windows Explorer as \NASPi\NAS1.
We can map it as a network drive or browse/transfer files from any computer. Powerful stuff!
Connecting via SSH for Advanced Configuration
While OpenMediaVault‘s web interface enables easy NAS administration and setup, advanced users may want more control.
Connecting via SSH lets you modifies configs, view logs, run commands and otherwise dig deeper into the full Linux environment running your NAS.
To enable persistent SSH logins, click System at the bottom of OMV‘s left sidebar. Go to Console Security settings.
Under SSH, toggle Enable SSH and Permit root login both to ON. This grants SSH as root admin without using keys.

Click Save, the connect via any SSH client to your OMV server IP, using the root account and your web admin password:
ssh root@192.168.1.xxx
You now have full shell access to tweak configs, run diagnostic commands or otherwise manage your NAS at the Linux level.
For example, inspect Samba sharing settings:
nano /etc/samba/smb.conf
Or check server resource usage:
htop
Having SSH access allows the Raspberry Pi NAS to be a much more powerful system compared to consumer "black box" devices. OMV combines ease of use with the open source benefits of Linux and Raspberry Pi.
Installing Plugins to Expand Functionality
Yet another advantage OpenMediaVault has over closed NAS operating systems is its open plugin framework.
The OMV team along with community developers create all types of add-ons that run right within the web interface to add new capabilities.
To browse available plugins, click Plugins in the left nav bar. You can sort and search by category or popularity.

For example, FileBot allows fully automated media file renaming and organization. Nextcloud adds private cloud storage and sync features.
There are also backup tools, web interfaces, admin helpers and much more that can be installed with one-click.
To add a plugin, hover your mouse over it, then click Install. Confirm when prompted. After a few minutes of downloading/configuring, the plugin will appear in your side menu ready for use!
This open ecosystem allows the functionality of OpenMediaVault on Raspberry Pi NAS devices to be expanded infinitely.
Conclusion
Transforming a Raspberry Pi 4 into a full-featured NAS with OpenMediaVault takes less than an hour, delivers incredible performance, storage and capabilities that consumer products simply don‘t offer.
We walked through the entire process – flashing the OS, installing OMV, attaching USB storage, configuring SMB/CIFS sharing, accessing via SSH, and installing plugins.
There is still so much more that can be done in terms of remote access, automated backups to cloud drives, running containers/VMs and more.
The Raspberry Pi‘s capabilities paired with the active development community behind OpenMediaVault leads to near endless possibilities for homelab projects!
Let me know in the comments if you have any other questions on setting up OpenMediaVault or Raspberry Pi NAS builds!


