A Raspberry Pi media hub combines a local media server (Jellyfin) with a Samba network share, turning a Pi 4 or Pi 5 into a central file and video streaming server for all devices on the home network. Jellyfin replaces the outdated miniDLNA recommended in older guides. miniDLNA was last actively maintained in 2016, has no web interface, and lacks hardware-accelerated decoding. Jellyfin provides a Netflix-style web UI, hardware H.264 decode on Pi 4, automatic metadata and artwork scraping, and clients for every platform. This guide covers Bookworm-correct storage setup on a USB SSD, Jellyfin install and library configuration, Samba file sharing with proper permissions, and remote access via Tailscale.
Last tested: Raspberry Pi OS Bookworm Lite 64-bit | May 2026 | Raspberry Pi 4 Model B (4GB) | Jellyfin 10.9, Samba 4.17
Key Takeaways
- Do not use the microSD card as media storage. A media hub writes metadata, thumbnails, and playback progress to disk continuously. An SD card fails under this sustained write load within months. Use a USB SSD ($25-40) or, on Pi 5, an NVMe SSD via M.2 HAT+. Format it as ext4 for Linux-only use (better performance and permissions than exFAT) or exFAT only if the drive also needs to plug into Windows or macOS machines.
- miniDLNA (also called ReadyMedia) was last actively maintained in 2016. It has no web interface, no hardware decode support, no transcoding, and limited codec support. Any guide recommending miniDLNA for a new build is outdated. Jellyfin is the correct free and open-source replacement. It includes a full web UI, hardware-accelerated H.264 decoding on Pi 4, automatic metadata scraping, and clients for every platform.
- Set Samba permissions with
valid usersrather than world-readable777permissions. A share configured withcreate mask = 0664,directory mask = 0775, and a named valid user provides proper file ownership without leaving the share open to any unauthenticated user on the network.
Hardware and Storage for Raspberry Pi Media Hub

Flash Raspberry Pi OS Bookworm Lite 64-bit to a microSD card using Raspberry Pi Imager. Configure hostname (mediahub), username, SSH with public key, and Ethernet in Imager’s advanced settings. The Pi runs headless. No monitor is needed after first boot.
Connect a USB SSD or USB hard drive for media storage. On Bookworm, exFAT is supported natively without additional packages. Format the drive as ext4 for Linux-only use:
# Identify the drive (usually /dev/sda):
lsblk
# Format as ext4 (replace /dev/sda with your drive):
sudo mkfs.ext4 -L mediahub /dev/sda1
Create a mount point and configure automatic mounting via fstab. Using UUID prevents the mount from breaking if the drive is plugged into a different USB port:
sudo mkdir -p /media/mediahub
# Find the UUID:
sudo blkid /dev/sda1
# Add to /etc/fstab (replace UUID with your drive's UUID):
UUID=your-uuid-here /media/mediahub ext4 defaults,nofail 0 2
# Mount and verify:
sudo mount -a
df -h /media/mediahub
Create the media directory structure and set ownership so Jellyfin and Samba can access it:
sudo mkdir -p /media/mediahub/{movies,tvshows,music,photos}
sudo chown -R $USER:$USER /media/mediahub
Expected result: df -h /media/mediahub shows the drive mounted with its full capacity. The media subdirectories exist and are owned by the current user. If the drive does not mount, check the UUID in fstab matches sudo blkid output exactly. A single character difference causes a mount failure. The nofail option prevents the Pi from hanging at boot if the drive is unplugged.
Setting Up Jellyfin on Raspberry Pi Media Hub
Install Jellyfin from the official repository:
curl -fsSL https://repo.jellyfin.org/install-deblike.sh | sudo bash
The script adds the Jellyfin APT repository and installs the server. Jellyfin starts automatically and enables at boot. Check the status:
sudo systemctl status jellyfin
Expected result: Jellyfin is accessible at http://[pi-ip]:8096 from any browser on the network. The first-run wizard prompts for a username, password, and media library setup. If the port is blocked, allow it through UFW: sudo ufw allow 8096/tcp.
Complete the setup wizard in the browser. Add libraries by pointing each to the relevant directory:
- Movies:
/media/mediahub/movies - TV Shows:
/media/mediahub/tvshows - Music:
/media/mediahub/music - Photos:
/media/mediahub/photos
Jellyfin scans the libraries, downloads metadata and artwork from TMDB and MusicBrainz, and populates the dashboard. The initial scan duration depends on library size. A few thousand files takes 5-15 minutes.
Enable hardware-accelerated decoding on Pi 4. In the Jellyfin dashboard navigate to Dashboard > Playback > Transcoding. Set Hardware acceleration to “Video4Linux2 (V4L2)” and enable H264 decode. This uses Pi 4’s hardware video decoder rather than software decoding, significantly reducing CPU load during playback. On Pi 5, the V4L2 decoder handles H.264 and HEVC.
Jellyfin clients are available for Android, iOS, Apple TV, Roku, Fire TV, Kodi, and as a web browser. Install the Jellyfin app on any device and point it to http://[pi-ip]:8096 to connect. For the complete Jellyfin guide including network shares and 4K setup, see Jellyfin Raspberry Pi 5: Complete Hardware Decode and Network Shares Setup Guide.
Samba File Sharing on Raspberry Pi Media Hub
Samba allows Windows, macOS, and Linux machines on the network to access the media drive as a network share. Install Samba:
sudo apt update && sudo apt install -y samba
Create a Samba password for the current user:
sudo smbpasswd -a $USER
Add the media share to the Samba configuration. Open the config file:
sudo nano /etc/samba/smb.conf
Add this block at the end of the file:
[mediahub]
path = /media/mediahub
browseable = yes
read only = no
create mask = 0664
directory mask = 0775
valid users = youruser
Replace youruser with the username set in Raspberry Pi Imager. Restart Samba to apply:
sudo systemctl restart smbd
Expected result: From a Windows machine, open File Explorer and type \\mediahub in the address bar. The mediahub share appears after entering the Samba username and password. From macOS, use Finder > Go > Connect to Server > smb://mediahub.local. From Linux: smb://mediahub.local in the file manager or smbclient //mediahub/mediahub -U youruser in the terminal.
If the share does not appear, check that the Pi and the client machine are on the same network segment and that UFW allows Samba: sudo ufw allow samba. For a complete guide to Time Machine backups over Samba, see Time Machine Raspberry Pi NAS Samba: Complete Setup Guide.
Remote Access and Maintenance for Raspberry Pi Media Hub
Remote access via Tailscale. Install Tailscale on the Pi and on the remote device to access Jellyfin and the Samba share from outside the home network without port forwarding:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
Once connected, access Jellyfin at http://[tailscale-ip]:8096 from anywhere. For the complete Tailscale setup, see Tailscale Raspberry Pi: Complete Secure Remote Access Guide.
Cockpit for system management. Cockpit provides a browser-based dashboard for monitoring CPU, memory, disk usage, services, and running updates without SSH:
sudo apt install -y cockpit
sudo systemctl enable --now cockpit.socket
Access Cockpit at http://[pi-ip]:9090 and log in with the Pi’s username and password. Cockpit shows Jellyfin and Samba service status and allows service restarts and system updates from the browser.
Keeping the media hub updated. Run a full upgrade monthly and verify Jellyfin is updated separately since it maintains its own APT repository:
sudo apt update && sudo apt full-upgrade -y
Backup. The Jellyfin metadata and database lives at /var/lib/jellyfin. Back this up separately from the media files. Regenerating metadata for a large library takes hours. A weekly rsync of /var/lib/jellyfin to the media drive or to a second USB drive protects against Pi SD card failure. For a full backup strategy, see Raspberry Pi Backup: Complete SD, rsync, and Cloud Guide.
FAQ
What is the best media server for Raspberry Pi?
Jellyfin for most builds. It is free, open-source, has no subscription requirement, supports hardware-accelerated H.264 decode on Pi 4, and has clients for every platform. Plex is the commercial alternative with a more polished mobile app and better remote access setup. Plex Pass (~$5/month or $120 lifetime) unlocks offline sync and live TV features. miniDLNA (ReadyMedia) is outdated and should not be used for new builds. Kodi is a good choice for a dedicated HTPC setup where the Pi is connected directly to a TV and controlled by a remote.
Can Raspberry Pi 4 transcode video?
Pi 4 handles hardware-accelerated H.264 direct play and decode well. Software transcoding (converting one format to another on the fly) is slow on Pi 4. A single 1080p software transcode saturates the CPU and causes buffering. Configure clients to direct play H.264 content where possible to avoid transcoding. HEVC (H.265) hardware decode is not supported on Pi 4 but is supported on Pi 5. For a 4K HEVC library, Pi 5 is the minimum viable hardware.
Should I use ext4 or exFAT for the Raspberry Pi media drive?
ext4 for a drive that stays permanently connected to the Pi. It provides proper Linux file permissions, better performance for the metadata and thumbnail writes that Jellyfin generates, and supports files larger than 4GB without any configuration. exFAT is the correct choice only when the drive also needs to plug directly into a Windows or macOS machine for file transfers. On Bookworm, exFAT is supported natively without additional packages. The old exfat-fuse install step in older guides is no longer needed.
How do I access the Raspberry Pi media hub remotely?
Tailscale is the simplest and most secure option. Install it on the Pi and on the device used for remote access. Both join the same private Tailscale network and the Jellyfin web UI is accessible at the Pi’s Tailscale IP on port 8096. No port forwarding or dynamic DNS needed. Jellyfin also has a built-in remote access feature that works through Jellyfin’s own relay servers when configured in Dashboard > Networking. Thiss requires no Tailscale but routes traffic through Jellyfin’s infrastructure.
Can I run Pi-hole and Jellyfin on the same Raspberry Pi?
Yes. On Pi 4 (4GB), Pi-hole and Jellyfin coexist without resource contention. Pi-hole uses under 100MB RAM at idle. Jellyfin uses 200-400MB RAM at idle and more during active transcoding. Both services run independently and restart automatically on boot. For the Pi-hole setup, see Raspberry Pi Pi-hole: Complete Setup and Configuration Guide. Add Pi-hole after Jellyfin is working and verify DNS resolution still functions before considering the setup complete.
References:
- Jellyfin documentation: jellyfin.org/docs
- Jellyfin install script: repo.jellyfin.org
- Samba documentation: samba.org/samba/docs
- Tailscale: tailscale.com
- Cockpit project: cockpit-project.org
About the Author
Chuck Wilson has been programming and building with computers since the Tandy 1000 era. His professional background includes CAD drafting, manufacturing line programming, and custom computer design. He runs PidiyLab in retirement, documenting Raspberry Pi and homelab projects that he actually deploys and maintains on real hardware. Every article on this site reflects hands-on testing on specific hardware and OS versions, not theoretical walkthroughs.
Last tested hardware: Raspberry Pi 4 Model B (4GB). Last tested OS: Raspberry Pi OS Bookworm Lite 64-bit. Jellyfin 10.9, Samba 4.17, May 2026.

