Jellyfin streams your movies, series and music from your server to your browser, TV and phone. This page installs it with Docker on a plain Linux server, set up so that nobody else can reach it before you have finished its setup. The steps were tested with Jellyfin 12.4.0 and Docker 29 on Ubuntu 26.04 LTS; run the commands as root.


1. Install Docker

apt install docker.io docker-compose-v2

On Debian 13: apt install docker.io docker-compose. More about Docker: Docker on Your Linux Server.

2. Folders

Jellyfin needs a folder for its settings and one for its cache, and it reads your media folder. The example uses /srv/media with a subfolder for each kind, such as /srv/media/movies, and runs Jellyfin as your normal user. Find the number of your user (here alex, usually 1000):

id -u alex
mkdir -p /srv/jellyfin/config /srv/jellyfin/cache /srv/media/movies
chown -R 1000:1000 /srv/jellyfin

Jellyfin recognises movies best in a folder per movie, named with the year: /srv/media/movies/Big Buck Bunny (2008)/Big Buck Bunny (2008).mkv.

3. Start Jellyfin

Create the file /srv/jellyfin/compose.yaml:

services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    user: 1000:1000
    ports:
      - "127.0.0.1:8096:8096"
    volumes:
      - /srv/jellyfin/config:/config
      - /srv/jellyfin/cache:/cache
      - /srv/media:/media:ro
    restart: unless-stopped
  • 127.0.0.1:8096:8096: Jellyfin is reachable only from the server itself for now; step 4 shows how you still open it.
  • /srv/media:/media:ro: inside Jellyfin your media folder is /media, read-only, so Jellyfin cannot change your files.
cd /srv/jellyfin
docker compose up -d
docker compose ps

After about half a minute, docker compose ps shows Up … (healthy).

⚠ Why not open the port right away?

Until its setup is finished, Jellyfin lets anyone who reaches it create the administrator. With "8096:8096" instead of 127.0.0.1:…, the server answers from the internet at once, with the setup open. Also note that ports published by Docker are open even when ufw has no rule for them.

4. Set It Up Through an SSH Tunnel

On your computer, open a tunnel to the server and keep the window open:

ssh -L 8096:127.0.0.1:8096 alex@your-server-IP

Then open http://localhost:8096 in your browser. The setup wizard asks for the language, your administrator user and password, and your libraries. When you add a library, choose the folder as Jellyfin sees it: /media/movies. A film in that folder appears in the library within about a minute. How to use Jellyfin, its apps and users: Jellyfin.

5. Use It From Anywhere

For everyday use, on your TV or phone, Jellyfin needs an address that works without the tunnel. The safe way is a web address with HTTPS: put Nginx in front of Jellyfin, with proxy_pass http://127.0.0.1:8096;, as described in Website With HTTPS on a Linux Server: Nginx and Let's Encrypt. Jellyfin's own documentation lists the extra proxy settings it recommends.

The simple way: after you have finished the setup and set a strong password, change the port line to "8096:8096" and run docker compose up -d again. Jellyfin is then open at http://your-server-IP:8096, without encryption.

6. Update and Logs

cd /srv/jellyfin
docker compose pull
docker compose up -d
docker compose logs --tail 50

Your settings and libraries stay in /srv/jellyfin/config; keep a copy of that folder in your backups.


Related Guides

View all Ubuntu and Debian guides

Was this answer helpful? 0 Users Found This Useful (0 Votes)