Blog

Peter Bozsvari

Building a Raspberry Pi-Powered Home Media Server with Kodi and Jellyfin

Introduction

I recently decided to set up a home media server using my Raspberry Pi running Ubuntu Server. The idea was to use Kodi on my TV or laptop to watch films that are stored on my Windows desktop, with the Raspberry Pi handling the media server side of things. After a bit of tinkering, I got everything running smoothly. Here’s how I did it.

Step 1: Setting Up Jellyfin on the Raspberry Pi

Since Ubuntu Server doesn’t come with a desktop environment and I wanted something lightweight, I chose Jellyfin as the media server. It’s free, open source, and works very well with Kodi.

To install Jellyfin on the Pi, I ran the following commands via SSH:

sudo apt update
sudo apt install apt-transport-https
curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash
sudo apt install jellyfin

Once installed, I enabled and started the Jellyfin service:

sudo systemctl enable jellyfin
sudo systemctl start jellyfin

I then accessed the Jellyfin setup page by opening a web browser and visiting:

http://<raspberry_pi_ip>:8096

There, I set up an admin account and prepared it to scan my media library.

Step 2: Mounting a Windows Shared Folder on the Pi

My film collection is stored on my Windows PC, so I needed the Raspberry Pi to access that folder over the network.

On my Windows machine, I right-clicked the media folder, enabled sharing with read access for “Everyone”, and noted down the IP address using the ipconfig command.

Back on the Pi, I installed the necessary tools to mount Windows shares:

sudo apt install cifs-utils

Then I created a mount point:

sudo mkdir -p /mnt/media

And mounted the Windows folder using my username and password:

sudo mount -t cifs //192.168.1.50/SharedFolder /mnt/media -o username=MyWindowsUser,password=MyPassword,uid=1000

To ensure it mounts automatically on boot, I created a credentials file and added a line to /etc/fstab pointing to the shared folder.

Step 3: Connecting Kodi to Jellyfin

With Jellyfin set up and my media accessible, I turned to Kodi for playback.

Kodi doesn’t include the Jellyfin add-on by default, so I downloaded the Jellyfin repository zip file from their GitHub page, transferred it to the device running Kodi, and installed it using:

Kodi > Settings > Add-ons > Install from zip file

After installing the repo, I went to:

Kodi > Install from repository > Jellyfin Add-ons > Video Add-ons > Jellyfin

Once installed, I opened the add-on, pointed it to my server address (http://<pi_ip>:8096), and logged in with the account I created during setup. Kodi was then able to browse and play all the media indexed by Jellyfin.

I also enabled the library sync option in the add-on’s settings, so the media shows up in Kodi’s main interface with metadata, covers, and all the usual features.

Final Thoughts

This setup gave me a simple and cost-effective home media server using equipment I already had. The Raspberry Pi handles the backend quietly in the background, while Kodi provides a slick, user-friendly interface for browsing and watching films.

No more copying files to USB sticks or plugging in external drives — I can now stream everything directly across the network, and it all works seamlessly.

If you’re running Ubuntu Server on your Pi and want a reliable media server setup, I’d definitely recommend this approach. It’s lightweight, flexible, and entirely self-hosted.

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*