How to Set Up OpenMediaVault as a NAS on Raspberry Pi

How to Set Up OpenMediaVault as a NAS on Raspberry Pi

OpenMediaVault (OMV) is a powerful, open-source NAS solution built on Debian. It provides a web-based management interface for managing storage, shares, and users. Running it on a Raspberry Pi gives you an affordable, low-power file server for your home network.


Prerequisites

Before you begin, make sure you have:

  • A Raspberry Pi 4 or 5 (2 GB RAM minimum, 4 GB recommended)
  • Raspberry Pi OS Lite (64-bit) installed and fully updated
  • SSH access enabled
  • An external USB hard drive or SSD for storage
  • A stable network connection (Ethernet recommended)

Update your system first:

Bash
sudo apt update && sudo apt upgrade -y

Step 1: Install OpenMediaVault

OMV is installed using the official install script from the OpenMediaVault Plugin Developers repository. Run the following command:

Bash
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

This process takes 15-30 minutes depending on your Pi and internet speed. The script will install OMV and all required dependencies. Your Pi will reboot automatically when finished.

Important: Do not run this on a Pi that is already running a desktop environment. Use Raspberry Pi OS Lite for best results.


Step 2: Access the Web UI

After the reboot, open a browser on another computer on the same network and navigate to your Pi's IP address:

Code
http://<your-pi-ip>

OMV serves its web interface on port 80 by default. Log in with the default credentials:

  • Username: admin
  • Password: openmediavault

Change the default password immediately by going to System > General Settings > Web Administrator Password.


Step 3: Connect and Mount an External USB Drive

Plug your external USB drive into the Raspberry Pi. Then in the OMV web interface:

  1. Navigate to Storage > Disks and confirm your USB drive appears in the list
  2. Navigate to Storage > File Systems
  3. Click Create, select your USB drive, and choose EXT4 as the file system
  4. Click Save and wait for the format to complete
  5. Select the newly created file system and click Mount
  6. Click the Apply button in the yellow notification bar at the top of the page

If your drive already has data on it and is formatted as EXT4 or NTFS, you can skip the format step and mount it directly.


Step 4: Create a Shared Folder

Shared folders define which directories on your drives are available to network services like SMB.

  1. Navigate to Storage > Shared Folders
  2. Click Create
  3. Give it a name (e.g., shared-files)
  4. Select the file system you mounted in the previous step
  5. Set the relative path (e.g., shared-files/)
  6. Set permissions to Administrator: read/write, Users: read/write, Others: read-only (or adjust as needed)
  7. Click Save, then Apply

Step 5: Enable SMB/CIFS Sharing

SMB (Server Message Block) is the protocol used by Windows, macOS, and Linux for network file sharing.

  1. Navigate to Services > SMB/CIFS > Settings
  2. Toggle the Enabled switch to on
  3. Click Save
  4. Go to the Shares tab and click Create
  5. Select the shared folder you created in the previous step
  6. Toggle Public to Guests allowed if you want open access, or set it to No for authenticated access only
  7. Click Save, then Apply

Create a User for Authenticated Access

If you disabled guest access, create a user account:

  1. Navigate to Users > Users
  2. Click Create
  3. Enter a username and password
  4. Click Save, then Apply

Step 6: Access Your NAS from Client Devices

Windows

  1. Open File Explorer
  2. In the address bar, type \\<your-pi-ip>\shared-files
  3. Enter your OMV username and password if prompted
  4. Right-click the share and select Map network drive for permanent access

macOS

  1. Open Finder
  2. Press Cmd + K or go to Go > Connect to Server
  3. Enter smb://<your-pi-ip>/shared-files
  4. Click Connect and enter your credentials

Linux

Mount the share using the command line:

Bash
sudo mount -t cifs //<your-pi-ip>/shared-files /mnt/nas -o username=your-user,password=your-password

To mount it automatically on boot, add an entry to /etc/fstab:

Bash
//<your-pi-ip>/shared-files /mnt/nas cifs username=your-user,password=your-password,iocharset=utf8 0 0

Troubleshooting

  • Cannot access the web UI: Verify the Pi's IP address with hostname -I over SSH. Ensure port 80 is not blocked by a firewall.
  • USB drive not appearing: Try a different USB port or cable. Check lsblk via SSH to see if the OS detects the drive.
  • Slow transfer speeds: Switch to a wired Ethernet connection. Check that you are using a USB 3.0 port and drive.
  • Permission denied on shares: Ensure the user has the correct permissions on the shared folder. Go to Storage > Shared Folders > Privileges and verify access.
  • Changes not taking effect: Always click the Apply button in the yellow notification bar after making changes. OMV queues changes until you apply them.
  • Pi crashes or freezes: Ensure your power supply provides at least 3A (5.1V). Underpowered Pis are the most common cause of instability.

Conclusion

You now have a fully functional NAS running on your Raspberry Pi with OpenMediaVault. With SMB shares configured, any device on your network can access your files. OMV also supports NFS, FTP, and rsync if you need additional protocols, all configurable from the same web interface.