Jellyfin is a self-hosted media server that provides streaming access to video, music, and photos. This guide covers installation and configuration of Jellyfin in portable mode on a Hetzner auction server, including systemd service management, backup configuration, and firewall rules. This is a consideration if you need the software to be running directly on the hardware, usually for some performance or driver requirement.
Prerequisites
This guide assumes a Debian or Ubuntu-based Linux server with sudo or root access. The configuration was tested on Ubuntu 26.04 Server in 2026. You need basic familiarity with systemd service management and Linux file permissions. A static IP address and proper DNS configuration are recommended for consistent access.
This test was made against a Hetzner Auction Server running Ubuntu Server26.04, but any Debian based installation, should work here, too.
Docker vs Native Installation
Jellyfin can run either in Docker containers or directly on the operating system. Docker provides isolation and simplified version management at the cost of additional complexity in hardware acceleration configuration. Direct installation on the host OS offers simpler GPU and hardware transcoding setup, which matters for media servers handling multiple streams or high-resolution content.
This guide uses a native installation because portable mode provides equivalent portability benefits to Docker while maintaining direct hardware access. Portable mode keeps all Jellyfin data in a single directory structure that can be backed up, moved, or restored without system-wide dependencies. The configuration directory contains all user data, metadata, and settings.
Install Jellyfin in Portable Mode
Create the installation directory structure:
sudo mkdir -p /opt/amp/jellyfin
cd /opt/amp/jellyfinDownload the latest portable release from the Jellyfin repository. As of January 2025, Jellyfin 10.9.x is current. Verify the latest release version at https://github.com/jellyfin/jellyfin/releases before proceeding:
sudo wget https://repo.jellyfin.org/files/server/linux/latest-stable/amd64/jellyfin_10.9.11-amd64.tar.gz
sudo tar -xzf jellyfin_10.9.11-amd64.tar.gz
sudo rm jellyfin_10.9.11-amd64.tar.gzCreate required directories for portable mode operation:
sudo mkdir -p /opt/amp/jellyfin/data
sudo mkdir -p /opt/amp/jellyfin/config
sudo mkdir -p /opt/amp/jellyfin/cache
sudo mkdir -p /opt/amp/jellyfin/logCreate the backup directory:
sudo mkdir -p /mnt/backups/jellyfinSet appropriate ownership. Replace username with your service account or the account that will run Jellyfin:
sudo chown -R username:username /opt/amp/jellyfin
sudo chown -R username:username /mnt/backups/jellyfinConfigure Systemd Service
Create a systemd service file for automatic startup and shutdown. Create the file at /etc/systemd/system/jellyfin.service:
sudo nano /etc/systemd/system/jellyfin.serviceAdd the following service configuration:
[Unit]
Description=Jellyfin Media Server
After=network-online.target
[Service]
Type=simple
User=username
Group=username
WorkingDirectory=/opt/amp/jellyfin
ExecStart=/opt/amp/jellyfin/jellyfin/jellyfin \
--datadir=/opt/amp/jellyfin/data \
--configdir=/opt/amp/jellyfin/config \
--cachedir=/opt/amp/jellyfin/cache \
--logdir=/opt/amp/jellyfin/log
Restart=on-failure
RestartSec=10
TimeoutStopSec=20
[Install]
WantedBy=multi-user.targetReplace username and group with the appropriate service account. The ExecStart directive specifies all directory paths explicitly for portable mode operation. This configuration keeps all Jellyfin files within /opt/amp/jellyfin.
Reload systemd to recognize the new service:
sudo systemctl daemon-reloadEnable the service to start at boot:
sudo systemctl enable jellyfinStart the service:
sudo systemctl start jellyfinVerify the service status:
sudo systemctl status jellyfinThe service should show active and running. Check the log directory at /opt/amp/jellyfin/log if the service fails to start.
Configure UFW Firewall
Jellyfin uses port 8096 for HTTP access and port 8920 for HTTPS access by default. Open these ports in UFW:
sudo ufw allow 8096/tcp comment 'Jellyfin HTTP'
sudo ufw allow 8920/tcp comment 'Jellyfin HTTPS'If you use Jellyfin auto-discovery features, also open port 1900 for UDP:
sudo ufw allow 1900/udp comment 'Jellyfin Discovery'Verify the rules:
sudo ufw status numberedConfigure Hetzner Cloud Firewall
Hetzner auction servers may use Hetzner Cloud Firewall or the firewall interface in Hetzner Robot. Log into your Hetzner account and navigate to the firewall configuration for your server.
Add inbound rules for the following:
- Port 8096 TCP from your access networks
- Port 8920 TCP from your access networks
- Port 1900 UDP from your access networks (optional, for discovery)
Restrict source IP addresses to your home network, VPN endpoint, or trusted networks. Jellyfin should not be exposed to the entire internet without additional authentication or reverse proxy protection.
If using Hetzner Robot firewall, create a firewall template or modify the existing rules through the web interface. Changes apply immediately after saving.
Initial Configuration
Access the Jellyfin web interface at http://server_ip:8096 to complete initial setup. The setup wizard guides you through administrator account creation, media library configuration, and basic settings.
Configure the following during initial setup:
- Administrator username and strong password
- Media library paths pointing to your media storage locations
- Metadata download preferences
- Remote access settings if needed
All configuration data saves to /opt/amp/jellyfin/config. The portable installation keeps all server state in the designated directories.
Backup Configuration
Create a backup script to regularly copy Jellyfin data to the backup location. Create the script at /usr/local/bin/backup-jellyfin.sh:
#!/bin/bash
BACKUP_DATE=$(date +%Y%m%d_%H%M%S)
BACKUP_DIR="/mnt/backups/jellyfin/${BACKUP_DATE}"
SOURCE_DIR="/opt/amp/jellyfin"
mkdir -p "${BACKUP_DIR}"
echo "Starting Jellyfin backup at ${BACKUP_DATE}"
rsync -avh --exclude='cache' --exclude='log' --exclude='transcodes' \
"${SOURCE_DIR}/" "${BACKUP_DIR}/"
echo "Backup completed to ${BACKUP_DIR}"
find /mnt/backups/jellyfin -type d -mtime +30 -exec rm -rf {} +
echo "Old backups removed"This script creates timestamped backups while excluding cache, log, and transcode directories. The final command removes backups older than 30 days. Adjust the retention period as needed.
Make the script executable:
sudo chmod +x /usr/local/bin/backup-jellyfin.shTest the backup script:
sudo /usr/local/bin/backup-jellyfin.shVerify backup files appear in /mnt/backups/jellyfin.
Automate Backups with Cron
Create a cron job to run backups automatically. Edit the crontab for the root user:
sudo crontab -eAdd a line to run backups daily at 2 AM:
0 2 * * * /usr/local/bin/backup-jellyfin.sh >> /var/log/jellyfin-backup.log 2>&1This configuration runs the backup script every day at 2:00 AM and logs output to /var/log/jellyfin-backup.log.
Service Management
Control the Jellyfin service with standard systemd commands:
Stop the service:
sudo systemctl stop jellyfinStart the service:
sudo systemctl start jellyfinRestart the service:
sudo systemctl restart jellyfinCheck service status:
sudo systemctl status jellyfinView service logs:
sudo journalctl -u jellyfin -fDisable automatic startup:
sudo systemctl disable jellyfinMaintenance Tasks
Monitor disk space usage in the cache and transcode directories. Jellyfin automatically manages these directories but rapid growth may indicate configuration issues.
Check cache directory size:
du -sh /opt/amp/jellyfin/cacheClear cache if needed:
sudo systemctl stop jellyfin
sudo rm -rf /opt/amp/jellyfin/cache/*
sudo systemctl start jellyfinUpdate Jellyfin by downloading the new portable release, stopping the service, extracting the new version to /opt/amp/jellyfin, and restarting the service. The portable mode directories persist across version updates.
Review logs periodically for errors or warnings:
tail -f /opt/amp/jellyfin/log/log_*.txtRestore from Backup
To restore from backup, stop the Jellyfin service, replace the contents of /opt/amp/jellyfin with the backup data, and restart the service:
sudo systemctl stop jellyfin
sudo rsync -avh /mnt/backups/jellyfin/BACKUP_DATE/ /opt/amp/jellyfin/
sudo chown -R username:username /opt/amp/jellyfin
sudo systemctl start jellyfinReplace BACKUP_DATE with the timestamp of the backup to restore. Verify the service starts correctly after restoration.
AI assistance is used on this site for language, formatting, and turning research into a consistent template. It is not used to perform the underlying research or verify technical claims. Every command, configuration, and step in this post is tested by hand before publication.