Jellyfin Media Server


Purpose

Jellyfin is a self-hosted media server that can host all of your media content on one central platform, and has nice customisation and features for users and video transcoding as well as metadata retrieval for things like ratings, present actors and information about the movies or TV Shows like show description or cover art..

Docker Compose

services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    user: UID:GID     # set to jellyfin user
    read_only: true     # set docker filesystem read-only
    cap_drop: [all]     # remove all unessasary packages
    # dont let the container escilate to new privileges like root
    security_opt: [no-new-privileges:true]
    restart: 'always'   # allow the container to update
    environment:
      - JELLYFIN_PublishedServerUrl=https://jellyfin.mosseater.me
    volumes:
    # Permissions for the storage volumes are set on the host filesystem
      - /usr/jellyfin/config:/config
      - /usr/jellyfin/cache:/cache
      - type: bind
        source: /usr/jellyfin/series
        target: /series
        read_only: true
      - type: bind
        source: /usr/jellyfin/movies
        target: /movies
        read_only: true
    # GPU Passthrough for AMD graphics cards, commented out because
    # I dont currently have it installed in the computer
    # devices:
    #  - /dev/kfd:/dev/kfd
    #  - /dev/dri:/dev/dri

Allowing for GPU pass-through on the Jellyfin docker container allows for faster and more efficient video transcoding. On AMD systems, you need the AMD ROCm drivers installed and enabled on the host system, and then pass through the two devices on the bottom of the compose file.

The config and cache folders need to be writeable for Jellyfin to function, but the volumes where media is stored in can be set to read_only.

The Jellyfin container also lets us set the file-system to read-only, a custom user, strict security opt and dropped capabilities for security.




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • picoCTF - DISKO
  • picoCTF - Forensics in CTF's IV
  • picoCTF - Forensics in CTF's III