Sign inSign up

dshap/jellyfin

By dshap

•Updated 8 days ago

Jellyfin video streaming server

Image
Web servers
Content management system
0

59

dshap/jellyfin repository overview

⁠Jellyfin video streaming server

Docker image for jellyfin video streaming server.

Container runs as non-root user. This user owns jellyfin process and owns jellyfin files.

To run container next volumes should be mapped:

  • folder for configs
  • folder for metadata
  • folder for media files
  • folder to upload files
  • logs folder
  • backups folder

⁠Installation

⁠Installation from docker image
  1. Pull docker image
  2. Create user and group to own jellyfin files and to run docker container:
    sudo groupadd -g 1191 jellyfin
    
    useradd -u 1191 -g 1191 -M jellyfin
    
  3. Proceed to configuration
⁠Installation from source
  1. Pull project sources from version control system
  2. Create user and group to own jellyfin files and to run docker container:
    sudo useradd -r jellyfin
    
    sudo groupmod -g 1191 jellyfin
    
    sudo usermod -u 1191 jellyfin
    
  3. Make build executable:
    sudo chmod u+x ./build
    
  4. Execute build:
    sudo ./build jellyfin
    
  5. Proceed to configuration
⁠Configuration
  1. Obtain configuration files and scripts from the container:
    cd ~
    
    mkdir conf
    
    sudo chown jellyfin:jellyfin ~/conf
    
    sudo docker run \
        --rm \
        -v ~/conf:/export \
        dshap/jellyfin:12.0 export-assets
    
  2. Create folders for jellyfin files:
    sudo mkdir /jellyfin
    
    sudo mkdir /jellyfin/config
    
    sudo touch /jellyfin/config/fileNameExcludes
    
    sudo touch /jellyfin/config/fileContentExcludes
    
    sudo mkdir /jellyfin/data
    
    sudo mkdir /jellyfin/media
    
    sudo mkdir /jellyfin/media/movies
    
    sudo mkdir /jellyfin/media/series
    
    sudo mkdir /jellyfin/upload
    
    sudo chown -R jellyfin:jellyfin /jellyfin
    
  3. Create a folder for logs:
    sudo mkdir /var/log/jellyfin
    
    sudo chown -R jellyfin:jellyfin /var/log/jellyfin
    
  4. Create a folder for backups:
    sudo mkdir /var/backups/jellyfin
    
    sudo chown -R jellyfin:jellyfin /var/backups/jellyfin
    
  5. Copy service configuration file:
    sudo cp ~/conf/etc/init.d/jellyfin /etc/init.d
    
    sudo chmod a+x /etc/init.d/jellyfin
    
  6. Copy docker run script:
    sudo cp ~/conf/usr/sbin/jellyfin /usr/sbin
    
    sudo chmod a+x /usr/sbin/jellyfin
    
  7. Copy util script:
    sudo cp ~/conf/usr/bin/jfutil /usr/bin
    
    sudo chmod a+x /usr/bin/jfutil
    
  8. Remove temporary config folder:
    sudo rm -rf ~/conf
    
  9. Register service:
    sudo update-rc.d jellyfin defaults
    
  10. Start jellyfin service:
    sudo service jellyfin start
    
  11. Open jellyfin UI and initialize jellyfin
  12. Restart jellyfin service:
    sudo service jellyfin restart
    

⁠Management

⁠Service management
sudo service jellyfin (start|stop|status|restart)
⁠Create backup
sudo jfutil backup <filename>

Backup file /var/backups/jellyfin/<filename>.tar.gz will be created.

⁠Restore backup
sudo jfutil restore <filename>
⁠Command line (bash)
sudo jfutil bash

⁠Apache mod_proxy configuration

Jellyfin video streaming server can be located with another web applications. For example, mercurial, bugzilla, wiki etc can be run as docker containers on the same host. In this case apache server can be used to redirect requests to different docker containers.

  1. Enable apache mod_proxy:
    sudo a2enmod deflate headers proxy proxy_ajp proxy_balancer proxy_connect proxy_html proxy_http rewrite
    
  2. Configure proxy:
    <VirtualHost *:80>
        ...
        ProxyPreserveHost On
        <Proxy *>
            Order allow,deny
            Allow from all
        </Proxy>
        ...
    </VirtualHost>
    
  3. Copy site configuration file:
    sudo cp ~/conf/etc/apache2/sites-available/jellyfin.conf /etc/apache2/sites-available
    
  4. Enable apache sites:
    sudo a2ensite jellyfin
    
  5. Restart apache service:
    sudo service apache2 restart
    

⁠HOW TO

⁠How to get media directory structure
sudo jfutil show-tree
⁠How to check if uploaded files and folders have valid name and content
sudo jfutil check-files
⁠How to set permit of uploaded files and folders
sudo jfutil set-permit
⁠How to configure valid name and content checks
  1. Edit file /jellyfin/config/fileNameExcludes and specify wrong file names in grep format.
    # Check wrong file extensions
    *.png
    *.jfif
    *.avi
    *.mkv
    
    # Check wrong symbols in file names
    *–*
    *—*
    *  *
    *…*
    *!*
    *..*
    *·*
    *"*
    *`*
    *“*
    
  2. Edit file /jellyfin/config/fileContentExcludes and specify wrong char sequences in nfo files.
    # Check wrong symbols in file content
    –
    —
    …
    "
    ·
    `
    “
    !?
    !!
    ?!
    ??
    
⁠How to create cron job for backups
sudo crontab -l | { cat; echo "minute hour * * * /usr/bin/jfutil backup <filename>"; echo ""; } | sudo crontab -

Tag summary

Content type

Image

Digest

sha256:8d2d5db01…

Size

607.4 MB

Last updated

8 days ago

docker pull dshap/jellyfin:12.0