Setting up Jellyfin on your Raspberry Pi involves several steps, from installing the necessary packages to configuring the service for easy access. Jellyfin is a free and open-source media server, and it works well on Raspberry Pi. Below is a guide to help you get started:
1. Update Your Raspberry Pi
First, ensure that your Raspberry Pi system is up to date:
sudo apt update
sudo apt upgrade -y
2. Install Jellyfin
Jellyfin provides official Debian-based packages that you can install on Raspberry Pi.
Install the required dependencies:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
Add the Jellyfin repository:
curl -fsSL https://repo.jellyfin.org/debian/jellyfin_team.gpg.key | sudo tee /etc/apt/trusted.gpg.d/jellyfin.asc
Add the Jellyfin package repository to your sources list:
echo "deb [arch=armhf] https://repo.jellyfin.org/debian stable main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
Update the package list:
sudo apt update
Install Jellyfin:
sudo apt install jellyfin
3. Start Jellyfin Service
After installation, the Jellyfin service should start automatically. You can check its status and start the service manually if needed.
Check Jellyfin service status:
sudo systemctl status jellyfin
Start Jellyfin service if it's not running:
sudo systemctl start jellyfin
Enable Jellyfin to start on boot:
sudo systemctl enable jellyfin
4. Configure Jellyfin
Once the service is running, you can access the Jellyfin web interface for initial configuration.
Open a web browser on a device connected to the same network as your Raspberry Pi.
Visit the Jellyfin web interface by going to:
http://<raspberrypi_ip>:8096
Replace
<raspberrypi_ip>
with the IP address of your Raspberry Pi.Follow the on-screen instructions to set up Jellyfin, including creating an administrator account, adding your media libraries (e.g., movies, music, TV shows), and configuring other preferences.
5. (Optional) Set Up Jellyfin to Use a Reverse Proxy (with Nginx)
If you want to access Jellyfin over HTTPS using a domain name, you can set up a reverse proxy with Nginx. Here’s how you can configure Nginx for Jellyfin:
Create a new Nginx configuration file for Jellyfin:
sudo nano /etc/nginx/sites-available/jellyfin
Add the following configuration:
server {
listen 80;
server_name yourdomain.com; # Replace with your domain
location / {
proxy_pass http://localhost:8096; # Jellyfin runs on port 8096
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Enable the Nginx configuration:
sudo ln -s /etc/nginx/sites-available/jellyfin /etc/nginx/sites-enabled/
Test the Nginx configuration:
sudo nginx -t
Restart Nginx to apply the changes:
sudo systemctl restart nginx
6. Access Jellyfin
You can now access Jellyfin via the domain you configured, or directly via the Raspberry Pi's IP address and port 8096
:
http://raspberrypi_ip:8096
or
http://yourdomain.com
7. Set Up SSL with Certbot (Optional)
To enable HTTPS for your Jellyfin server, you can use Certbot to get a free SSL certificate.
Install Certbot:
sudo apt install certbot python3-certbot-nginx
Obtain and install the SSL certificate:
sudo certbot --nginx -d yourdomain.com
Renew the certificate automatically:
sudo systemctl enable certbot.timer
8. Set Up Firewall (Optional)
If you’re using ufw
(Uncomplicated Firewall) on your Raspberry Pi, make sure to allow traffic on the ports you need:
sudo ufw allow 80,443/tcp
sudo ufw allow 8096/tcp
sudo ufw reload
Conclusion
Jellyfin should now be installed and running on your Raspberry Pi. You can access it via the web interface, add your media files, and enjoy your personal media server! Let me know if you need further assistance!