Today, we’re diving into the world of Raspberry Pi to create our very own NAS (Network Attached Storage). If you’re unsure what a NAS system is or whether you need one, stick around because the answer might surprise you.
Why You Need a NAS
Picture this: scattered files across different devices, limited storage space, and the constant fear of data loss. Sounds familiar, doesn’t it? That’s where a NAS comes in handy.
A NAS is essentially a centralized storage solution that allows multiple devices on a network to access and share files. It’s like having your own personal cloud, but without the subscription fees.
Why Raspberry Pi?
Today, we’re using the versatile Raspberry Pi to create our NAS. Why? Because it’s affordable, energy-efficient, and incredibly customizable. Setting up a Raspberry Pi NAS is easier than you might think. Here’s what you’ll need:
Hardware Requirements
• Raspberry Pi board (We’re using the Pi 4 with 4GB RAM)
• MicroSD card (16GB is recommended) with a reader
• Power supply
• External hard drive or large USB storage
Step 1: Preparing the Software
Once you have gathered all the hardware, it’s time to get the software ready. Just like Windows or Mac, your Raspberry Pi needs an operating system to work. Here’s how to install it:
1. Download Raspberry Pi Imager:
• On your favorite browser, search for “Download Raspberry Pi Imager” and download it from the official Raspberry Pi website according to your operating system.
2. Prepare the MicroSD Card:
• Insert the 16GB microSD card into your computer.
• Open the Raspberry Pi Imager. Select your model (Pi 4 with 4GB RAM in our case, but choose according to your model).
• Choose the operating system as Raspberry Pi OS Lite.
• Select the correct memory card. Press Control + Shift + X to open advanced settings.
3. Configure the Settings:
• Enable SSH and set a username and password for your Pi.
• Click Next to start installing the operating system on your memory card. This may take some time, so be patient.

Step 2: Setting Up the Raspberry Pi
With the operating system installed, it’s time to set up the Raspberry Pi:
1. Insert the Memory Card:
• Insert the memory card with the operating system into your Raspberry Pi.
• Attach a network cable and connect the Pi to the power supply.
2. Find the IP Address:
• Allow the Pi some time to boot.
• Open the admin page for your router to see connected devices and verify the allocated IP address.

3. Connect to the Raspberry Pi:
• Open a command prompt on your computer and connect to the Raspberry Pi wirelessly with the following command:
ssh username@allocated_ip
• Press Enter, then type Yes to establish the connection.

Step 3: Updating and Installing Software
Now that you’re connected to the Pi, let’s update it and install the necessary software:
1. Update the Pi:
• Run the following commands to update and upgrade your Raspberry Pi:
sudo apt update
sudo apt upgrade
This process will bring your Pi to the latest version and may take some time.
2. Install OpenMediaVault:
• Next, install OpenMediaVault, the open-source software that will power your NAS. Use the following command to install it:
sudo wget -O – https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
Installing OpenMediaVault will take some time. While it does, prepare your external hard drive by formatting it and keeping it ready.
Step 4: Configuring OpenMediaVault
Once OpenMediaVault is installed, it’s time to configure it:
1. Check the IP Address:
• Verify the IP address of your Raspberry Pi by reopening your router’s admin page and checking connected devices.
2. Login to OpenMediaVault:
• On your favorite browser, visit the IP address allocated to your Pi. You should see the OpenMediaVault login page.
• Enter the default credentials:
Username: admin
Password: openmediavault

3. Change the Default Password:
• Start by changing the default password to something strong and professional. This is done by navigating to General Settings > Web Administrator Password.
3. Enable SSH (Optional but Recommended):
• To enable SSH in OpenMediaVault, go to Services > SSH.
• Toggle the SSH service to Enabled.
• Click Save and Apply the changes.
Step 4: Configuring Storage
Now it’s time to set up your external hard drive or USB storage:
1. Connect the External Drive:
• Plug your external hard drive or USB storage into the Raspberry Pi.
2. Mount the Drive:
• In the OMV interface, go to Storage > Disks to see your connected drive.
• Select your drive and click on Wipe if you need to format it (be careful as this will erase all data on the drive).
• Next, go to Storage > File Systems and click Create.
• Select your disk, choose a file system (ext4 is recommended), and then Mount the drive.
3. Create Shared Folders:
• Navigate to Access Rights Management > Shared Folders.
• Click Add, give your folder a name, select the device (your mounted drive), and set the path.
• Click Save and Apply the changes.
Step 5: Setting Up File Sharing
To allow devices on your network to access the NAS, you’ll need to configure file-sharing services:
1. Enable SMB/CIFS for Windows and Mac Sharing:
• Go to Services > SMB/CIFS.
• Toggle the service to Enabled.
• Under Shares, click Add and select the shared folder you created earlier.
• Click Save and Apply the changes.
2. Access Your NAS:
• On a Windows PC, open File Explorer and type \\[Your-Pi-IP] in the address bar to access the shared folder.
• On a Mac, open Finder and select Go > Connect to Server, then enter smb://[Your-Pi-IP].
Conclusion
And there you have it! You’ve successfully set up a NAS using a Raspberry Pi, turning it into a powerful and customizable storage solution. With your new NAS, you can easily store, access, and share files across multiple devices on your network—no subscription fees required!
If you found this tutorial helpful, please leave a comment for more exciting Raspberry Pi projects and tutorials. If you have any questions or suggestions, feel free to leave them in the comments section below. Happy making!