How To Install Jellyfin with Docker-Compose and GPU Transcoding

Install Docker and Docker Compose:

    1. Ensure that Docker and Docker Compose are installed on your system.


  1. Install NVIDIA Container Toolkit:
    If you have an NVIDIA GPU, install the NVIDIA Container Toolkit to enable GPU support for Docker containers.
sudo apt-get install -y nvidia-container-toolkit

Follow the instructions provided by NVIDIA to configure your system.

  1. Create a Docker Compose File:
    Create a file named docker-compose.yml for Jellyfin. Use a text editor to create and edit the file:

version: "3.5"
    image: jellyfin/jellyfin
    container_name: jellyfin
    user: 1000:1000
    network_mode: "host"
      - ./config:/config
      - ./cache:/cache
      - /path/to/your/media:/media:ro
    restart: "unless-stopped"
    runtime: nvidia
            - capabilities: [gpu]

Make sure to replace Your_Timezone with your actual timezone, and update the paths for /path/to/your/media with the appropriate locations on your system.

    1. Start Jellyfin Container:
      Run the following command to start the Jellyfin container:
docker-compose up -d

This will download the Jellyfin image and start the container in the background.

    1. Access Jellyfin:
      Open your web browser and go to http://localhost:8096 to access the Jellyfin web interface. Follow the setup wizard to configure Jellyfin.
    1. Configure GPU Hardware Acceleration:
      In the Jellyfin web interface, go to “Dashboard” > “Advanced” > “Playback” and enable “Use hardware acceleration when available.” Select “NVIDIA CUVID” as the hardware acceleration method. Save the changes.

Now, Jellyfin is set up in Docker Compose with GPU support. You can add your media libraries and start enjoying your content through Jellyfin.

Final Steps

Ideally you will want to run Jellyfin behind a reverse proxy. We recommend Nginx Proxy Manager using wildcard Let’s Encrypt certificates (you have to use DNS challenge mode) and wildcard subdomains for the A record on your domain as well.

The reason for this is to add an extra layer of security through obscurity. It’s not perfect, but it will hide your Jellyfin instance from most bad-actors and curious individuals. Also when creating the subdomain, use something like your initials and the service, such as Dictionary attacks can be ran on your domain to identify subdomains even using a wildcard, so this will make it that much more difficult to find.

Leave a Reply

Your email address will not be published. Required fields are marked *