A NAS — Network Attached Storage — is a dedicated storage server on your home or office network that lets every device (phone, laptop, TV) access shared files, stream media, and store backups without depending on any single computer being switched on. Commercial NAS units from Synology or QNAP cost ₹15,000–₹60,000. A Raspberry Pi NAS built with OpenMediaVault costs a fraction of that, gives you full control, and runs on as little as 5W of power. In this step-by-step guide, we build a complete Raspberry Pi NAS from scratch — from hardware selection to Samba shares and media streaming.
Table of Contents
What is NAS and Why Build One?
A NAS is essentially a small computer dedicated to serving files over your local network. Unlike a USB drive plugged into your router, a proper NAS runs a real operating system (in our case, OpenMediaVault) that handles:
- User authentication and permissions
- RAID storage for redundancy
- Network protocols (SMB/CIFS for Windows, NFS for Linux, AFP for Mac)
- Remote access via VPN or SFTP
- Media transcoding and streaming (via Jellyfin or Plex)
- Automated backups of all devices on your network
Why build instead of buy? A commercial NAS locks you into proprietary software, charges for plugins, and often has underpowered processors that struggle with transcoding. A Pi 5-based NAS gives you a 2.4GHz quad-core ARM Cortex-A76, up to 16GB RAM, and PCIe 3.0 for NVMe storage — more than sufficient for a home or small office NAS serving 5–10 simultaneous users.
Hardware You Need
For a capable Raspberry Pi NAS in 2024, we recommend the Raspberry Pi 5:
| Component | Minimum | Recommended |
|---|---|---|
| Board | Raspberry Pi 4B 4GB | Raspberry Pi 5 8GB or 16GB |
| OS Storage | 32GB microSD | NVMe SSD (via HAT) |
| Data Storage | 1x USB 3.0 HDD | 2x USB 3.0 HDD (RAID 1) |
| Power Supply | 5V/3A USB-C | Official Pi 5 5V/5A supply |
| Network | Ethernet (Cat 5e) | Gigabit Ethernet (Cat 6) |
| Case | Any Pi case | Case with active cooling |
Installing OpenMediaVault
OpenMediaVault (OMV) is a Debian-based NAS operating system with a web-based administration panel. It is the most popular choice for Raspberry Pi NAS builds.
Step 1: Install Raspberry Pi OS Lite (64-bit)
Use Raspberry Pi Imager to write Raspberry Pi OS Lite (64-bit, Bookworm) to your microSD card. In the imager settings, set a hostname (e.g., raspi-nas), enable SSH, and set your Wi-Fi credentials.
Step 2: Update the system
ssh [email protected]
sudo apt update && sudo apt upgrade -y
sudo reboot
Step 3: Install OpenMediaVault
# Download and run the OMV installer
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
# Installation takes 15-30 minutes
# Pi will reboot automatically when done
Step 4: Access the web panel
Navigate to http://raspi-nas.local or your Pi IP address in a browser. Default credentials are admin / openmediavault. Change the password immediately after first login.
Connecting and Configuring Storage
The Raspberry Pi 5 has two USB 3.0 ports. Plug in your USB HDD or SSD. For bus-powered drives, the Pi 5 USB 3.0 ports supply up to 1.2A combined — most 2.5-inch HDDs work fine, but 3.5-inch HDDs require a separate power adapter.
# Check that drives are detected
lsblk
# Expected output:
# sda 8:0 0 931.5G 0 disk <-- USB HDD 1
# sdb 8:16 0 931.5G 0 disk <-- USB HDD 2
# mmcblk0 179:0 0 29.7G 0 disk <-- microSD (OS)
In the OMV web panel: Storage → Disks → verify both drives appear. Then Storage → File Systems → Create → Select drive → EXT4 format. Mount the filesystem after creation.
RAID 1 (optional but recommended): Storage → Software RAID → Create → RAID 1 (mirroring). Select both USB drives. This mirrors all data — if one drive fails, your data is safe on the other. RAID 1 halves total storage but gives complete redundancy.
Network Configuration
For a NAS, a static IP address is essential so your other devices always know where to find the server.
# In OMV web panel: Network > Interfaces > eth0 > Edit
# Set Method: Static
# Address: 192.168.1.100 (choose an IP outside DHCP range)
# Netmask: 255.255.255.0
# Gateway: 192.168.1.1
# DNS: 8.8.8.8
Setting Up Samba Shares
Samba (SMB) is the protocol that lets Windows, macOS, Android, and iOS devices browse and access your NAS like a network drive.
In OMV: Services → SMB/CIFS → Enable → Save. Then add a share: select a shared folder from your mounted drive, set Public to No, Browseable to Yes, Read only to No. Create OMV users under Users → Users and assign them folder permissions. On Windows, connect with 192.168.1.100ShareName. On Android, use the Cx File Explorer app with SMB network access.
Media Streaming with Jellyfin
Jellyfin is a free, open-source media server that runs beautifully on a Raspberry Pi 5 and transcodes video on the fly for any client device.
# Install Docker on Raspberry Pi OS
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker pi
# Run Jellyfin container
docker run -d --name jellyfin -p 8096:8096 -v /srv/dev-disk-by-uuid-XXXX/media:/media -v /opt/jellyfin/config:/config --device /dev/dri:/dev/dri --restart unless-stopped jellyfin/jellyfin
Access Jellyfin at http://192.168.1.100:8096. The Jellyfin app is available for Android, iOS, Android TV, Fire TV, and smart TVs.
Backup Setup
A NAS is not a backup — it is primary storage. Follow the 3-2-1 backup rule: 3 copies, 2 different media types, 1 offsite. For Indian homes: local NAS + external HDD + cloud (Google Drive via rclone).
# Install rclone
curl https://rclone.org/install.sh | sudo bash
# Configure Google Drive remote
rclone config
# Follow interactive setup for the "drive" remote type
# Add to crontab for nightly 2am backup
crontab -e
0 2 * * * rclone sync /srv/dev-disk-by-uuid-XXXX/photos gdrive:NAS-Backup/photos --log-file=/var/log/rclone.log
Performance Tips
- Always use Ethernet, not Wi-Fi. Gigabit Ethernet gives 900+ Mbps; Wi-Fi 5 at close range gives 300–500 Mbps but with much higher latency.
- Use USB 3.0 drives, not USB 2.0. USB 2.0 maxes out at 40 MB/s, while USB 3.0 on Pi 5 supports 300+ MB/s for SSDs.
- Format drives as EXT4. EXT4 performs better than exFAT or NTFS on Linux.
- Disable swap on the microSD. With 8GB+ RAM, swap is rarely needed and wears out the SD card quickly.
Raspberry Pi 5 Advantages for NAS
The Raspberry Pi 5 is a generational leap for NAS use cases:
- PCIe 3.0 interface: Boot from an NVMe SSD via an M.2 HAT. NVMe delivers 400–900 MB/s read speeds vs 40–90 MB/s for microSD.
- USB 3.0 throughput: Pi 5 uses a proper PCIe-connected USB 3.0 controller. Real-world disk throughput reaches 300+ MB/s.
- Hardware HEVC decode: The Pi 5 includes dedicated H.265 (HEVC) video decode. Jellyfin can direct-play 4K content without software transcoding.
- More RAM: Available in 2GB, 4GB, 8GB, and 16GB variants. 8GB is the sweet spot for Jellyfin, Samba, and Docker containers simultaneously.
Frequently Asked Questions
Q: How does Raspberry Pi NAS performance compare to a commercial NAS?
A Pi 5 with USB 3.0 SSDs can sustain 250–300 MB/s over Gigabit Ethernet, matching entry-level to mid-range commercial NAS units. The Pi 5 hardware H.265 decode handles 1–2 simultaneous 4K streams where Pi 4 could barely manage one 1080p transcode.
Q: Can I use a Raspberry Pi NAS as a Time Machine backup for Mac?
Yes. OMV supports AFP (Apple Filing Protocol) via the Netatalk plugin. Enable AFP in Services, create a share, and enable Time Machine support. Your Mac will see it as a Time Machine destination. Works reliably on macOS Ventura and Sonoma.
Q: What happens to my data if the Raspberry Pi fails?
If you set up RAID 1, your data is on two drives. Remove the surviving drive, plug it into any USB enclosure, and your data is readable on any Linux system. Without RAID, your USB drive is still directly accessible from any computer.
Q: Is a Raspberry Pi NAS suitable for a small business or office?
For 1–10 users doing moderate file sharing, yes. A Pi 5 with 8GB RAM handles this comfortably. For more than 10 simultaneous users or mission-critical storage, consider a proper NAS appliance with ECC memory and enterprise drives.
Shop Raspberry Pi at Zbotic.in
Find Raspberry Pi boards, HATs, displays, and accessories with fast delivery across India.
Add comment