Skip to content

Jellyfin

Jellyfin is the volunteer-built media solution that puts you in control of your media. Stream to any device from your own server, with no strings attached. Your media, your server, your way.


Install Jellyfin

echo ">=media-video/ffmpeg-4.4.3 vpx" > /etc/portage/package.use/jellyfin
emerge --ask www-apps/jellyfin

Prepare Folders to Mount in Jellyfin

mkdir -p /mnt/rar2fs/archive; 
mkdir -p /mnt/rar2fs/incoming/;
rar2fs -o allow_other /mnt/usb/site/archive/ /mnt/rar2fs/archive/
rar2fs -o allow_other /mnt/usb/site/incoming /mnt/rar2fs/incoming
mkdir -p ~/docker/jellyfin/{config,cache}

Create docker-compose.yml

version: '3.5'
services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    user: uid:gid
    network_mode: 'host'

    ### Example Mounts with Rar2fs(fuse)

    volumes:
      - ~/docker/jellyfin/config:/config
      - ~/docker/jellyfin/cache:/cache
      - /mnt/rar2fs/archive/x2641080p:/x2641080p
      - /mnt/rar2fs/archive/x264720p:/x264720p
      - /mnt/rar2fs/archive/tv:/tv
      - /mnt/rar2fs/archive/xxxsd:/xxxsd
      - /mnt/rar2fs/archive/mvids:/mvids
      - /mnt/rar2fs/archive/mbluray:/mbluray
      - /mnt/rar2fs/archive/mp3:/mp3
      - /mnt/rar2fs/incoming/mp3:/mp3
      - /mnt/rar2fs/incoming/mbluray:/mbluray
      - /mnt/rar2fs/incoming/x2641080p:/x2641080p
      - /mnt/rar2fs/incoming/x264720p:/x264720p
      - /mnt/rar2fs/incoming/tv:/tv
      - /mnt/rar2fs/incoming/xxxsd:/xxxsd
      - /mnt/rar2fs/incoming/mvids:/mvids
    restart: 'unless-stopped'
    # Optional - alternative address used for autodiscovery
    environment:
      - JELLYFIN_PublishedServerUrl=http://127.0.0.1
    extra_hosts:
      - "host.docker.internal:host-gateway"
cd ~/docker/jellyfin/config
docker compose up -d
  • Stop Docker Container for Jellyfin
docker jellyfin stop