Setting Up A Media Server With Jellyfin
Setting up a media server with Jellyfin: a practical, self-hosted solution
Jellyfin is an open-source alternative to Plex and Emby that lets you organize movies, TV shows, music, and photos in one place and stream them to your devices. It’s privacy-friendly, free, and self-hosted, so you control your own media library.
Why Jellyfin
- Fully open source with no paid tier
- Supports a wide range of clients (Windows, macOS, iOS, Android, web, streaming devices)
- Metadata and library management built in, with community-driven metadata sources
- Works well on modest hardware and scales to NAS-level setups
Prerequisites
- A computer or NAS with enough storage for your media
- For basic streaming: a modern multi-core CPU and 2–4 GB RAM are usually enough
- For transcodes and multiple streams, more CPU power or hardware acceleration helps
- Network: wired Gigabit ethernet is ideal for multiple simultaneous streams
- Operating system: Linux (Ubuntu/Debian), Windows, macOS, or run Jellyfin in Docker
Option 1: Quick start with Docker (cross-platform)
This method works on Linux, Windows (with Docker Desktop), and macOS. It’s a portable, repeatable setup.
1) Install Docker and Docker Compose (or Docker Desktop bundles these)
- Linux (example, Ubuntu/Debian):
- Install Docker:
- sudo apt update
- sudo apt install -y ca-certificates curl gnupg lsb-release
- curl -fsSL https://get.docker.com -o get-docker.sh
- sudo sh get-docker.sh
- Install Docker Compose (if you don’t have it):
- sudo apt-get install -y docker-compose
- Add your user to the docker group (log out/in after):
- sudo usermod -aG docker $USER
- Windows/macOS: install Docker Desktop from Docker’s site
2) Create directories for config and media
- mkdir -p ~/jellyfin/config
- mkdir -p ~/jellyfin/movies
- mkdir -p ~/jellyfin/tv
- mkdir -p ~/jellyfin/music
3) Create a docker-compose.yml
- Create a file at ~/jellyfin/docker-compose.yml with:
version: "3.8"
services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
ports:
- "8096:8096"
- "8920:8920" # optional, for HTTPS (if you set up TLS)
volumes:
- ./config:/config
- ./movies:/media/movies
- ./tv:/media/tv
- ./music:/media/music
restart: unless-stopped
environment:
- TZ=YOUR_TIME_ZONE # e.g., TZ=America/New_York
# If you want to use host networking instead of port mappings:
# network_mode: host
4) Start Jellyfin
- cd ~/jellyfin
- docker compose up -d
- Open http://localhost:8096 (or http://:8096) in your browser
5) First-time setup in the web UI
- Create an admin user
- Add libraries:
- Movies: /media/movies
- TV: /media/tv
- Music: /media/music
- Jellyfin will scan and fetch metadata (posters, descriptions, episode artwork)
6) Optional: enable remote access
- In Jellyfin, go to Admin Dashboard > Networking and enable remote access
- If you’re behind a router, forward port 8096 (and 8920 for HTTPS if used)
- For secure remote access, consider enabling TLS with a reverse proxy (let’s Encrypt) or using a VPN
Option 2: Native Linux install (Ubuntu/Debian)
1) Install Jellyfin from official repo
- wget -O - https://repo.jellyfin.org/keys/jellyfin-deb.key | sudo apt-key add -
- echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/debian $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
- sudo apt update
- sudo apt install jellyfin
2) Adjust permissions and start
- sudo systemctl enable jellyfin
- sudo systemctl start jellyfin
3) Open and configure
- Access http://localhost:8096 and proceed with library setup as above
Option 3: Windows or macOS install
- Jellyfin provides an installer or can run via Docker on Windows/macOS.
- The web UI similarly guides you through library setup and metadata sources.
Adding libraries and metadata
- Library folders: point Jellyfin to folders where your media lives (e.g., /mnt/media/movies, /mnt/media/tv, /mnt/media/music)
- Metadata: Jellyfin ships with metadata agents. You can enable/disable sources in Admin Dashboard > Metadata downloaders. Popular options include TMDB for movies, TheTVDB or TMDB for TV, and Discogs for music.
- Organize your library structure consistently (e.g., Movies/Year/Movie Title (Year).ext, TV/Show/Season/S01E01 - Episode Title.ext)
Remote access and clients
- Jellyfin has client apps for Windows, macOS, iOS, Android, web browsers, and many streaming devices. Install the client on your devices and sign in to your Jellyfin server.
- For remote access, use Jellyfin’s built-in remote access or set up a VPN to your home network for secure streaming.
Performance and hardware acceleration
- Direct play is preferred; transcode only when needed.
- Hardware acceleration:
- On Linux with Intel/AMD GPUs: enable VA-API (install libva and your distro’s VA-API drivers) and enable hardware acceleration in Jellyfin’s Admin Dashboard > Transcoding.
- Nvidia GPUs: install NVIDIA drivers and the NVENC/NVDEC stack; select Nvidia NVENC as the hardware acceleration method.
- If you’re using a Raspberry Pi or ARM device: Jellyfin runs via Docker on ARM or native ARM builds; performance will be modest and drama-free for lighter libraries.
Maintenance and security
- Regularly update Jellyfin to benefit from fixes and new features.
- Back up your config and metadata:
- For Docker: backup the ./config directory.
- For native installs: back up /var/lib/jellyfin or /config if you used a custom path.
- Use strong admin passwords and consider enabling TLS/HTTPS for remote access.
What to expect
- Jellyfin gives you a private, versatile home media hub with broad device support.
- The initial setup is quick, with optional tinkering for performance and automations.
- If you need guides for specific hardware (e.g., NAS models, Raspberry Pi, or a particular Linux distro), I can tailor steps.
Want a compact starter setup? The Docker Compose approach is the easiest cross-platform path to get Jellyfin up and running quickly. If you prefer, I can tailor instructions to your OS, hardware, and network setup.