In Part 5 of the Home Lab Series:
- The Goal: Self-hosting your movie and music collection.
- Jellyfin vs. Plex: Why we chose the open-source option.
- Storage: How to connect a USB drive to Docker.
- The Stack: Installing Jellyfin via Portainer.
- The Setup: Creating libraries and fetching metadata.
We have blocked ads and built dashboards. Now it is time to entertain. Streaming services keep raising prices while removing content. The solution? Own your media.
In Part 5, we are installing Jellyfin. It organizes your video files, downloads the posters and cast info automatically, and lets you stream them to your TV, phone, or tablet—just like Netflix, but you control the server.
Step 1: The Storage Problem
Containers are ephemeral. If you delete a container, the data inside it vanishes. For a media server, your media files (Movies/MP3s) must live on the Host (your Pi or PC), not inside the container.
If you are using a USB Hard Drive:
- Plug the drive into your Server/Pi.
- Mount it to a folder path you can remember (e.g.,
/mnt/media).
- Create two folders inside it:
movies and shows.
Permissions Check
Linux permissions are the #1 reason Jellyfin fails. Ensure your user has read/write access to that USB drive. If Jellyfin can't see your files, it's almost always a permission issue.
Step 2: The Jellyfin Stack
Let's go back to Portainer.
- Click Stacks -> + Add stack.
- Name the stack:
jellyfin.
- Paste the YAML below. Note: You must change the volume path to match your actual hard drive location!
services:
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
container_name: jellyfin
environment:
- PUID=1000 # User ID (usually 1000 for the main user)
- PGID=1000 # Group ID
- TZ=America/New_York
volumes:
- ./config:/config # Stores database/settings
- /path/to/your/harddrive:/data/media # CHANGE THIS!
ports:
- 8096:8096
restart: unless-stopped
Click Deploy the stack.
Step 3: The Setup Wizard
Once deployed, open a browser and go to:
http://[YOUR-IP]:8096
- Language: Select your language.
- User: Create an admin username and password.
- Libraries: Click "Add Media Library."
- Select Movies.
- Click the + (Plus) next to Folders.
- Navigate to
/data/media/movies (This is where we mapped the drive in the Docker Compose).
- Metadata: Leave the defaults. Jellyfin will automatically scrape TheMovieDB for posters.
- Remote Access: Allow remote connections (Check the box).
Once finished, you will be dropped into an empty dashboard. Give it 5-10 minutes. Jellyfin is currently scanning your hard drive and downloading images. Hit refresh, and watch your files turn into a beautiful catalog.
Step 4: Watching Your Content
You don't have to watch in the browser. Jellyfin has apps for almost everything.
On Your TV
If you have an Android TV (Nvidia Shield, Chromecast) or a Roku, search for the Jellyfin app in the store. Enter your server IP, log in, and enjoy.
On Your Phone
Download the Jellyfin app for iOS or Android. You can even enable "Sync" to download movies to your phone for offline watching on an airplane!
Step 5: Add it to Homepage
Remember the dashboard we built in Part 4? Let's add a widget that shows what is currently playing.
Open your Homepage configuration file (services.yaml) and add this block:
- Media:
- Jellyfin:
icon: jellyfin.png
href: http://[YOUR-IP]:8096
widget:
type: jellyfin
url: http://[YOUR-IP]:8096
key: [YOUR-API-KEY] # Generate this in Jellyfin Dashboard -> Advanced -> API Keys
Conclusion
You have successfully replaced Netflix. You now have a media server that you own, running on hardware you control.
Coming Up in Part 6: We will discuss Remote Access. How to safely access your Jellyfin server and Pi-hole from outside your house (without opening dangerous ports).
Movie Night!
Building a library takes time. Join Great Meets to find the "Home Media" group. Discuss the best file formats (MKV vs. MP4), how to rip your old DVDs, and share your favorite custom movie posters.
Find a Group ?