Guide · Raspberry Pi build
Pi-hole and Jellyfin on one Raspberry Pi 4: my setup guide
As an Amazon Associate I earn from qualifying purchases. Buying through these links supports the site at no extra cost to you. Full disclosure
Yes, one Raspberry Pi 4 can run Pi-hole and Jellyfin at the same time. Mine does. Pi-hole blocks ads for every device on my Wi-Fi, and Jellyfin streams my movies and shows to the TV and our phones.
There's one rule that makes it work: let your devices play video files as they are. The Pi 4 is bad at converting video on the fly, and I'll show you how to avoid making it try.
Words you'll see in this guide
- Pi-hole: a network-wide ad blocker that runs on a small computer in your home.
- DNS: the internet's phone book. It turns website names into addresses your device can reach.
- DHCP reservation: a router setting that gives one device the same network address every time.
- SSH: a way to control another computer by typing commands from your own, over the network.
- Direct play: your TV or phone plays the video file as it is, with no converting needed.
- Transcoding: converting a video on the fly so it plays smoothly on a phone or TV that can't handle the original file.
- Port: a numbered door on a computer that one app listens on, so several apps can share one address.
What you're building
- Pi-hole is a network-wide ad blocker. Your router sends every device's web lookups through the Pi, and Pi-hole drops the ones headed for ad and tracking servers. It works on phones, smart TVs, and anything else on your network, with no apps to install.
- Jellyfin is a free media server, like your own private Netflix. You point it at a drive full of videos and watch them in the Jellyfin app on your TV, phone, or browser. Plex does the same job. I use Jellyfin in these steps because it's completely free.
Pi-hole needs very little. Pi-hole's docs list 512 MB of RAM, so it shares the Pi with Jellyfin easily.
The parts list
These are the parts I recommend for this build. Each link goes to current Amazon listings.
Raspberry Pi 4 Model B (4 GB or 8 GB)
A Raspberry Pi 4 Model B 4GB is plenty for Pi-hole plus Jellyfin. Get 8 GB if you expect to add more apps later. Buying new today? A Pi 5 works for this too. See the best Pi for a home server.
Check price on AmazonAlternatives: Raspberry Pi 5 (faster, needs its own power supply and case), or an Intel N100 mini PC if you want transcoding.
Official Raspberry Pi 4 USB-C power supply
Don't reuse a random phone charger. An underpowered Pi causes strange crashes and corrupted SD cards, and it gets worse once a USB drive is plugged in. The official Raspberry Pi 4 power supply avoids all of that.
Check price on AmazonAlternative: CanaKit USB-C power supply
Argon ONE V2 case
The Argon ONE V2 is an aluminum case with a built-in fan and a power button. It also reroutes the ports so you get full-size HDMI. A good pick for a Pi that runs all day and handles some media.
Check price on AmazonAlternatives: Argon NEO, GeeekPi aluminum case with fan
Flirc Raspberry Pi 4 case
The Flirc case has no fan at all. The whole aluminum body pulls heat away, so it's silent in a living room.
Check price on AmazonAlternative: Akasa Gem fanless case
Official Raspberry Pi 4 case (with fan)
The cheapest decent option. Add the official case fan so the Pi doesn't slow itself down when it's busy.
Check price on AmazonAlternatives: iUniker case with fan, GeeekPi case with fan
A 32 to 64 GB high-endurance microSD card
This holds the operating system, Pi-hole, and Jellyfin. A server writes to it all day, so pick an endurance card or an "A2" rated card from a big brand, like the Samsung PRO Endurance.
Check price on AmazonAlternatives: SanDisk High Endurance, SanDisk Extreme
A USB 3 portable SSD or external hard drive
This is where your movies live. Plug it into one of the blue USB 3 ports.
- Smaller libraries: a portable SSD like the Samsung T7 is fast and runs off the Pi's power.
- Big libraries: a desktop hard drive with its own power adapter, like the WD Elements Desktop, is safer than a large drive powered by the Pi.
Alternative: Crucial X9
A wireless keyboard and mouse combo
You'll use these for first-time setup if you plug the Pi into a monitor. A basic combo like the Logitech MK270 uses one USB receiver for both.
Check price on AmazonAlternatives: Logitech MK295 (quieter keys), Amazon Basics wireless combo
Wireless keyboard with built-in touchpad
If the Pi will sit by the TV, a keyboard with a touchpad like the Logitech K400 Plus replaces both keyboard and mouse, and works from the sofa.
Check price on AmazonAlternatives: Rii i4 mini keyboard, Logitech K830 (backlit)
Ethernet cable and a micro-HDMI to HDMI cable
- Ethernet: wire the Pi to your router. Pi-hole and streaming are both more reliable than over Wi-Fi. A Cable Matters Cat6 cable works fine.
- Micro-HDMI: the Pi 4 has micro-HDMI ports, so you need an adapter cable to connect a monitor or TV for setup.
Alternative: UGREEN micro-HDMI cable
Step 1: Install Raspberry Pi OS
- Download Raspberry Pi Imager on your computer.
- Choose Raspberry Pi 4, then Raspberry Pi OS Lite (64-bit). A server doesn't need the desktop version.
- Open the settings. Set a username and password, turn on SSH, and add your Wi-Fi if you can't use Ethernet.
- Write the system to the microSD card.
- Put the card in the Pi, connect Ethernet, and plug in the power.
Step 2: Give the Pi a fixed address
Every device on your network will look for Pi-hole at one address, so that address can't change.
- Open your router's settings page. The DHCP options are often under "LAN" or "Connected devices."
- Find the Raspberry Pi in the device list.
- Create a DHCP reservation for it. Pi-hole's docs say a reservation is fine.
- Write the address down, for example 192.168.1.50.
Step 3: Install Pi-hole
- Log in to the Pi, with the keyboard or over SSH from your laptop.
- Run Pi-hole's official installer:
curl -sSL https://install.pi-hole.net | bash - Accept the defaults as you go.
- Save the admin password it shows at the end.
- Open the dashboard in a browser at
http://YOUR-PI-ADDRESS/admin.You should see: the Pi-hole login page.
Step 4: Point your router at Pi-hole
- In your router's settings, find the DNS server setting. It's usually under DHCP or LAN.
- Set it to the Pi's address.
- Turn Wi-Fi off and on again on your phone, then open a few websites.
You should see: the blocked count rising on the Pi-hole dashboard.
Some routers from internet providers don't let you change DNS. If yours doesn't, set DNS on each device instead, or let Pi-hole hand out addresses as your DHCP server.
Step 5: Install Jellyfin
Jellyfin's official install script supports Raspberry Pi OS. Check the Debian and Ubuntu steps in the Jellyfin docs first in case they've changed.
- Download the script:
curl -fsSL https://repo.jellyfin.org/install-debuntu.sh -o install-debuntu.sh - Run it:
sudo bash install-debuntu.sh - Open
http://YOUR-PI-ADDRESS:8096in a browser and follow the setup screens.You should see: the Jellyfin welcome screen.
Jellyfin uses port 8096 and Pi-hole's dashboard uses port 80, so the two don't clash.
Step 6: Add your media drive
- Plug the drive into a blue USB 3 port.
- Mount it so it always shows up in the same place, for example
/mnt/media, and make sure Jellyfin can read it. - In Jellyfin, add a library (Movies or Shows) that points at that folder.
- Let it scan.
You should see: your movie posters appear in the library.
The one rule: direct play, not transcoding
This is where most Pi media servers go wrong. If your TV or phone can play a file as it is, the Pi 4 barely notices. If Jellyfin has to convert the video on the fly, a Pi 4 struggles, and Jellyfin has deprecated its Raspberry Pi hardware acceleration (Jellyfin docs).
- Use the Jellyfin app on your TV or streaming stick instead of a web browser. Apps can play more formats directly.
- Stick to common formats. H.264 video in an MP4 or MKV file plays almost everywhere.
- In the app's playback settings, set quality to maximum or "original" so it doesn't request a lower-quality copy.
- Don't expect several people watching different 4K movies at once. That's a mini PC job. See the best home media server guide and Intel Quick Sync explained.
Keep it cool and backed up
- A case with a fan or a big aluminum body stops the Pi from slowing itself down when it gets hot.
- Keep a copy of anything irreplaceable somewhere other than that one USB drive. Is RAID a backup? covers the basics.
- Want to watch away from home? Read accessing your home server remotely before you open any ports on your router.
Is a Pi 4 enough, or should you get a mini PC?
For Pi-hole plus a media server that one or two people use with direct play, a Pi 4 is enough and uses very little power. If you want lots of transcoding, several streams at once, or a pile of extra apps, a small Intel mini PC handles it far more easily. Compare them in Raspberry Pi vs mini PC, or plug your numbers into the power cost calculator.
Quick answers
Can a Raspberry Pi 4 run Pi-hole and Jellyfin at the same time?
Yes. Pi-hole needs very little memory, so a Pi 4 with 4 GB of RAM runs both comfortably, as long as your devices play media directly instead of making the Pi transcode.
Does Jellyfin transcode well on a Raspberry Pi 4?
No. Jellyfin has deprecated its Raspberry Pi hardware acceleration, and the processor is slow at converting video. Use apps and file formats that direct play.
Do I need a keyboard and mouse for a Raspberry Pi server?
Only for setup, and not even then if you turn on SSH in Raspberry Pi Imager. A wireless combo or a keyboard with a touchpad makes first-time setup easier.
Do Pi-hole and Jellyfin conflict on the same Pi?
No. Pi-hole's dashboard uses port 80 and Jellyfin uses port 8096, so they run side by side.
Your next step: work out how big your media drive needs to be with the media storage calculator.
Free email updates
My Pi 4 is about to get a mini PC partner for transcoding. Subscribe and I'll send how I split the jobs between them.
No spam. Unsubscribe anytime. Privacy policy.