DEV Community

Cover image for Deploying Jellyfin Open-Source Media Server on Ubuntu 24.04
Sanskriti Harmukh for Vultr

Posted on with Aashish Chaurasiya • Originally published at docs.vultr.com

Deploying Jellyfin Open-Source Media Server on Ubuntu 24.04

Jellyfin is a free and open-source media server that organizes and streams your personal collection of movies, TV shows, music, and photos to any device, with no tracking or paywalls. This guide deploys Jellyfin using Docker Compose with Traefik handling automatic HTTPS. By the end, you'll have a Jellyfin media server streaming securely at your domain.


Set Up the Directory Structure

1. Create the project directory structure:

$ mkdir -p ~/jellyfin-media-server/{cache,config,media}
$ cd ~/jellyfin-media-server
Enter fullscreen mode Exit fullscreen mode

2. Find your user UID and GID:

$ id USERNAME
Enter fullscreen mode Exit fullscreen mode

3. Create the environment file:

$ nano .env
Enter fullscreen mode Exit fullscreen mode
UID=YOUR_USER_UID
GID=YOUR_USER_GID

DOMAIN=jellyfin.example.com
LETSENCRYPT_EMAIL=admin@example.com
Enter fullscreen mode Exit fullscreen mode

Deploy with Docker Compose

1. Create the Docker Compose manifest:

$ nano docker-compose.yaml
Enter fullscreen mode Exit fullscreen mode
services:
  traefik:
    image: traefik:v3.6
    container_name: traefik
    command:
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
      - "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}"
      - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    restart: unless-stopped

  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    user: "${UID}:${GID}"
    hostname: jellyfin
    expose:
      - "8096"
    volumes:
      - "./config:/config"
      - "./cache:/cache"
      - "./media:/media"
    environment:
      - JELLYFIN_PublishedServerUrl=https://${DOMAIN}
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.jellyfin.rule=Host(`${DOMAIN}`)"
      - "traefik.http.routers.jellyfin.entrypoints=websecure"
      - "traefik.http.routers.jellyfin.tls.certresolver=letsencrypt"
    restart: unless-stopped

volumes:
  letsencrypt:
Enter fullscreen mode Exit fullscreen mode

2. Start the services:

$ docker compose up -d
Enter fullscreen mode Exit fullscreen mode

3. Verify the services are running:

$ docker compose ps
Enter fullscreen mode Exit fullscreen mode

4. View the logs:

$ docker compose logs
Enter fullscreen mode Exit fullscreen mode

Configure Jellyfin

  1. Open https://jellyfin.example.com in a browser.
  2. Choose your display language.
  3. Create the administrator account with a username and password.
  4. Add media libraries by selecting a content type and the matching folder under /media.
  5. Set metadata language and country preferences.
  6. Review the remote access settings.
  7. Complete setup and sign in with the administrator credentials.

Next Steps

Jellyfin is running and streaming securely over HTTPS. From here you can:

  • Install Jellyfin apps on your TV, phone, and desktop devices
  • Add more libraries and enable hardware transcoding for smoother playback
  • Create additional user accounts with per-library access control

For the full guide with additional tips, visit the original article on Vultr Docs.

Top comments (0)