The written companion to the video. Every command, in order, plus the three fixes that catch people.
This guide builds a two-bay NAS on a Raspberry Pi 5 with OpenMediaVault 8, shares it over SMB, and mounts it on a second Pi that runs Jellyfin and Immich. The drive size does not change any step — the commands are identical whether each bay holds 2 TB or 12 TB.
Replace every NAS_IP with your NAS Pi’s real address, and every youruser / yourpassword with the account you create. Never post your real IP or password in a comment or on screen.
What you need
- Raspberry Pi 5 (4 GB works, 8 GB is better)
- Official 27 W USB-C power supply
- Two-bay USB 3 enclosure with its own power brick (the Pi cannot power spinning disks)
- Two data drives (any size — 2× 12 TB in the video = 24 TB)
- A boot microSD card or small USB SSD, kept separate from the data drives
- Wired gigabit Ethernet
1. Flash Raspberry Pi OS Lite
In Raspberry Pi Imager:
- Choose Raspberry Pi OS Lite (64-bit). Not the Desktop version — OpenMediaVault does not support it.
- Open the settings gear. Enable SSH, set a username and password.
- Leave Wi-Fi blank. The OMV install script fails if Wi-Fi is configured first.
- Write the card, boot the Pi, and connect over SSH.
Update first:
sudo apt update && sudo apt upgrade -y
2. Install OpenMediaVault 8
Two scripts. Run the first, reboot, then run the second.
# Preinstall
wget -O – https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/preinstall | sudo bash
sudo reboot
After it comes back:
# Install (takes 10–15 minutes; the network drops briefly near the end — normal)
wget -O – https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
sudo reboot
Find the Pi’s IP address, open a browser, and go to http://NAS_IP.
- Default web login: admin / openmediavault
- Change the admin password immediately: System → Users.
If the Pi loses the network after install, connect a keyboard and monitor and run:
sudo omv-firstaid
Choose the network option and turn DHCP back on.
Give the NAS a static IP (do this before the drives)
Every mount you set up later points at NAS_IP. If your router hands the Pi a different address after a reboot, every mount breaks. Lock the address down one of two ways:
Option A — reserve it on your router (recommended). In your router’s admin page, find the Pi in the client/device list and assign it a reserved (or “fixed”/”static”) DHCP lease bound to its MAC address. Nothing changes on the Pi, and it survives a reimage.
Option B — set it in OpenMediaVault. Because OMV manages the network, set it in the UI — do not hand-edit dhcpcd.conf/netplan, OMV will overwrite it. Go to Network → Interfaces, select your adapter (eth0 / end0), Edit, set IPv4 Method → Static, then:
- Address: an IP outside your router’s DHCP range, e.g. 192.168.1.50
- Netmask: 255.255.255.0 (a /24 home network)
- Gateway: your router’s IP, e.g. 192.168.1.1
- DNS: your router’s IP, or 1.1.1.1
Save, then Apply. The web UI moves to the new address — reconnect your browser to http://192.168.1.50. If you get locked out, run sudo omv-firstaid on a keyboard/monitor to fix networking. Write the address down; it’s the NAS_IP you’ll use everywhere below.
3. Fix: keep USB drives from dropping under load (UAS quirk)
Some USB enclosures use a bridge chip that misbehaves with UAS. The symptom is a drive that disconnects during a large copy. If your drives are stable, skip this. If not:
Find the enclosure’s vendor and product ID:
lsusb
Look for your enclosure, e.g. ID 174c:55aa ASMedia Technology Inc. — the ID here is 174c:55aa.
Edit the boot command line. It is one single line — add the quirk to the end of the existing line, separated by a space. Do not add a new line.
sudo nano /boot/firmware/cmdline.txt
Append (using your own ID):
usb-storage.quirks=174c:55aa:u
Save, then reboot:
sudo reboot
The :u disables UAS for that device only.
4. Prepare the drives
Power on the enclosure and connect it to a blue USB 3 port on the Pi.
In the OMV web interface:
- Storage → Disks — both drives must appear. If one is missing, check enclosure power first.
- Select a drive → Wipe → Quick. Repeat for the second drive.
- Storage → File Systems → Create → ext4.
- Use ext4. Do not use exFAT or NTFS — they break Linux file ownership and your apps fail with permission errors.
- Give each a clear label, e.g. media-one and photos-one.
- Mount each file system. OMV mounts by UUID, so the mount survives a reboot or a cable swap.
5. Shared folders and a user
- Storage → Shared Folders (in older versions this was under Access Rights Management) → Add. Create folders for media, photos, and backups. Select the file system and set the relative path for each.
- Users → Users → Add — create a user with a strong password. This is the account your other devices will log in with.
- Select each shared folder → Permissions → give your user read/write.
- Click the yellow Apply banner at the top. Nothing takes effect until you apply.
Note the user’s UID and GID — you will need them on the media Pi:
id youruser
Typically the first user is uid=1000 gid=1000.
6. Turn on SMB and test
- Services → SMB/CIFS → Settings → enable the service → Save.
- Shares tab → Add → select your media folder → leave defaults → Save.
- Add again → select your photos folder → Save → Apply. (Jellyfin will use media; Immich will use photos, so share both.)
Test from your desktop:
- Windows: File Explorer → type \\NAS_IP
- Mac: Finder → Go → Connect to Server → smb://NAS_IP
Log in with the user you made, copy a file across, and watch the speed. On gigabit Ethernet you should see roughly 110 MB/s.
7. Mount the NAS on the media Pi (Jellyfin + Immich)
This ties the series together. Do this on the media Pi — the one running Jellyfin and Immich.
Install the CIFS tools:
sudo apt install cifs-utils -y
Create the two mount points. A mount point is an empty folder that a network share attaches to — you create it once, and it stays empty until the share is mounted onto it. Jellyfin uses the media share, Immich uses the photos share, so you make one folder for each:
sudo mkdir -p /mnt/nas-media # movies/TV -> Jellyfin
sudo mkdir -p /mnt/nas-photos # photos -> Immich
mkdir makes a directory; -p creates parent folders and does not error if the folder already exists. Confirm they exist:
ls -la /mnt
Create a credentials file so the password stays out of fstab (both shares use the same NAS user, so one file covers both):
sudo nano /root/.nas-credentials
Contents:
username=youruser
password=yourpassword
Lock it down to root only:
sudo chmod 600 /root/.nas-credentials
Add two lines to /etc/fstab — one per share:
sudo nano /etc/fstab
Add these (each is ONE line — use your UID/GID from step 5):
//NAS_IP/media /mnt/nas-media cifs credentials=/root/.nas-credentials,uid=1000,gid=1000,file_mode=0755,dir_mode=0755,iocharset=utf8,vers=3.0,nofail,x-systemd.automount,_netdev 0 0
//NAS_IP/photos /mnt/nas-photos cifs credentials=/root/.nas-credentials,uid=1000,gid=1000,file_mode=0755,dir_mode=0755,iocharset=utf8,vers=3.0,nofail,x-systemd.automount,_netdev 0 0
- nofail — the Pi still boots if the NAS is off.
- x-systemd.automount — mounts on first access instead of blocking boot.
- vers=3.0 — modern SMB; drop it only if an old client needs 2.1.
- file_mode=0755,dir_mode=0755 — makes the files world-readable so the Jellyfin and Immich containers (which run as their own users) can read the media.
Reload and mount both:
sudo systemctl daemon-reload
sudo mount -a
ls /mnt/nas-media
ls /mnt/nas-photos
Your files should appear under each folder.
Point Jellyfin at the NAS (Docker)
A container cannot see the host mount until you pass it in. Edit the jellyfin service in your docker-compose.yml and add the share under volumes: (read-only):
volumes:
– /mnt/nas-media:/media/nas:ro
Restart the container:
docker compose up -d
Then in the Jellyfin web UI:
- Dashboard → Libraries.
- Open your movie library (edit / three-dot Manage Library).
- In the Folders section, click + and enter the path inside the container: /media/nas. Save.
- Scan Library (or Dashboard → Libraries → Scan All Libraries).
Point Immich at the NAS (Docker)
Edit the immich-server service in your Immich docker-compose.yml and add the photos share under volumes: (map it to the same path to keep things simple):
volumes:
– /mnt/nas-photos:/mnt/nas-photos:ro
Keep :ro for read-only. Remove :ro only if you want Immich to write XMP sidecars or delete originals.
Restart:
docker compose up -d
Then in the Immich web UI:
- Administration (top-right).
- External Libraries tab → Create Library.
- Choose which user owns the library.
- On the library page, in the Folder section click Add and enter the path inside the container: /mnt/nas-photos. Click Add.
- Open the three-dots menu → Scan New Library Files.
- Watch Administration → Jobs — you’ll see Library, Generate Thumbnails, and Extract Metadata running.
The #1 gotcha: the path you type in Jellyfin or Immich is the path inside the container (/media/nas for Jellyfin, /mnt/nas-photos for Immich), not the path on the Pi. If the library imports nothing, the container path is wrong or the volume line is missing.
Playback stays Direct Play — the files stream over the network and the Pi does not transcode. H.264 plays on every device with no conversion.
Speed and limits — be honest
- The Pi 5 has one gigabit port, so you top out near 110 MB/s. Fine for movie playback and photo backups.
- Both drives share one USB bus, so copying to both at once splits the bandwidth.
- This is a quiet, low-power NAS for a fraction of a commercial unit — not a rack server.
Quick command reference
# System
sudo apt update && sudo apt upgrade -y
# OMV install
wget -O – https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/preinstall | sudo bash
sudo reboot
wget -O – https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
sudo reboot
# Recover network if the Pi goes dark
sudo omv-firstaid
# UAS quirk (find ID with lsusb, add to /boot/firmware/cmdline.txt)
usb-storage.quirks=VVVV:PPPP:u
# Media Pi: mount the two NAS shares
sudo apt install cifs-utils -y
sudo mkdir -p /mnt/nas-media # movies/TV -> Jellyfin
sudo mkdir -p /mnt/nas-photos # photos -> Immich
sudo nano /root/.nas-credentials # username= / password=
sudo chmod 600 /root/.nas-credentials
sudo nano /etc/fstab # add the //NAS_IP/media and //NAS_IP/photos lines
sudo systemctl daemon-reload
sudo mount -a
# Give each share to its container, then restart it
# Jellyfin compose -> volumes: – /mnt/nas-media:/media/nas:ro
# Immich compose -> volumes: – /mnt/nas-photos:/mnt/nas-photos:ro
docker compose up -d # run in each app’s compose folder
# Then add the library in the UI using the IN-CONTAINER path:
# Jellyfin: Dashboard > Libraries > edit > Folders > + > /media/nas > Scan
# Immich: Administration > External Libraries > Create Library > Folder > Add > /mnt/nas-photos > Scan New Library Files
Companion guide for The Pi Stack Lab. Questions in the comments — I read all of them.

