How to install Plex on OMV6 with docker image linuxserver/plex + On the fly transcoding files only in tmpfs (living on RAM not HDD)

  • Conventions in this tutorial

    • URLs in the format of http://omv.local/#/storage/shared-folders mean the following:
      • omv.local as in your OpenMediaVault hostname (e.g. homeserver.local or just homeserver) or IP address (e.g. 192.168.1.100)
      • https (secure HTTP) instead of http, in case you have a SSL certificate in use on your OMV device (then you are likely already advanced)

    Tutorial

    1. You need a clean OMV6 install. ~1h manual/config effort + ~2h waiting
      • Upgrading from OMV 5 to 6 via omv-release-upgrade brings troubles!
      • Even if all OMV5 plugins are compatible with OMV6 (as I checked) and omv-release-upgrade itself reports it completed fine.
      • In actuality it's not. Already experienced that when migrating OMV 4→5. Fresh install!
      • Plex was available to install as a OMV plugin up until OMV4.
      • OMV5+ Plex gets installed via Docker. Don't fear, it's not too hard.
      • This here will guide you, no prior docker knowledge required.
    2. Add the shares "docker", "docker-compose" and "plex"    2min + 3min waiting
      • Go to http://omv.local/#/storage/shared-folders
      • We will now create the Shares, if we do not have them already.
      • Per each share creation do this:
        • Name: The name of the share you create.
        • File system: Choose your HDD, usually /dev/sda.
        • Relative path: Gets autofilled from name.
          • Point it to an existing directory (e.g. if you have it on disk from an earlier OMV)
          • Or else it will create the folder automatically.
          • By default on root of the filesystem. If needed change it to: folder/nested/deep/your-share-name/
        • Permissions: Leave the defaults.
      • Create these shares:
        • docker — Your docker containers will live here (the software and config files that a docker image is made up of)
        • docker-compose — Your docker compose files live here. That are just small YAML configuration files, which state which container to use and their environment variables (which OMV shares to bind to the docker containers internal paths, behavioral flags, network config, etc)
        • plex — Your plex configuration (DB, metadata, cache, etc) will live here. Not the videos! They will be exposed to the docker container from an OMV share.
    3. Install Docker   1min + ~20min wait
      • At http://omv.local/#/system/omvextras/docker
      • Docker Storage (variable)
        • By default is /var/lib/docker which is on the rootFS (SD card for many installations)
        • Change that to: /srv/dev-disk-by-uuid-YOUR-UID/docker (=the filepath of your "docker" share)
        • Click SAVE. Important!!! Your change is not automatically picked up when clicking install in the next step! [❌ usability bug]
      • Then click INSTALL.
    4. Install the openmediavault-compose plugin   2min
      • Background Info: This allows the creation of compose files and then executing commands on the docker containers which they define (pull, check, up, down) and seeing the overall docker status ("ps" command)
        • pull — download, decompress and install the docker image from the URL/canonical-name given at the image variable in the docker compose file (a YAML file)
        • check — will inspect and check that it's syntactically correct
        • up — as in "start" or "run" the container.
        • down — as in "quit" or "close" the container.
        • ps — shows the status of the selected docker container(s) as a table
      • Go to http://omv.local/#/system/plugins
        • Search for "openmediavault-compose"
        • Select it.
        • Click INSTALL.
        • The UI shortly refreshes.
      • Now we configure docker compose.
    5. Install the Plex docker container and launch it 5min + 30min wait
      • Go to http://odroid.local/#/services/compose/files
      • Click "Create"
      • You are now in the docker file creation
        • Name: plex
        • File: See below (too long to put it here inline)
        • Effectively this is written to: /srv/dev-disk-by-uuid-YOUR-UID/docker-compose/plex.yaml
        • Click SAVE.
      • Your return to the overview.
        • In the listing select "plex" which you just created.
        • On the top you have these buttons now:
          • create | edit | delete | check | up | down | pull | ps
          • Meaning explained in section 4.
        • With "plex" selected you now click "up" (as in "start the container")
          • If it's the first time (only the docker compose file exists at /srv/dev-disk-by-uuid-YOUR-UID/docker-compose/plex.yaml) then clicking "up" automatically also performs "pull".
          • "Pull" downloads and installs the docker image (the URL is determined from the "image" variable in the docker compose file) to the "docker" share location ( /srv/dev-disk-by-uuid-YOUR-UID/docker/ as we previously defined it )
          • When complete it runs the "up" command:
          • You should have a sequence of: Creating … Created… Starting… Started
          • You can close the dialog and return to the overview.
      • To be sure that the docker container runs:
    6. Connect to Plex and set it up 5min for basic setup + 1-2h to explore config deeply
      • Access Plex at http://omv.local:32400/web/ (change the port if in you defined another port in your docker compose file)
      • Follow the onscreen instructions
        • More Plex instructions is out of scope of this tutorial. But it's pretty straight forward.
      • Most important settings
        • Login with local account only (if needed): On the login screen where it offers the various "log in with Apple, Google, Facebook, Email" you also have the possibility to login just locally. At the bottom there's a small link "What's this?" (or similarly named at a later time maybe). This opens the possibility to login without any Plex account creation. You do not need it if you only use Plex in your LAN and don't plan to access Plex from the Internet.
        • When creating your first Library, you get a filepath chooser.
          • What the docker portainer sees as /videos is pointing to your "videos" share.
          • Choose video, or navigate deeper.
          • Note that the Library system of Plex does not support "totally mixed up content".
          • So make one Library for "Movies", one for "Series", etc, so that the scanner can work well.
        • Persistently turn off debugging, otherwise your HDD spins 24/7 (as of Plex 1.27.2.5929)
          • Go to Plex > Settings (wrench icon on the top right) > Section Settings > General
          • Disable these options


            • Enable Plex Media Server verbose logging
            • Enable Plex Media Server debug logging
          • Click SAVE CHANGES. This alone is not enough!
            • With the help of fatrace I found out that Plex every few seconds writes to the log at:
              /srv/dev-disk-by-uuid-UID/Plex/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log
          • So shut down the docker container and then restart the container!
          • Do this at: OMV Menu > Services > Compose > Files: Select "plex" container, then click button "down" (as in shutdown).
          • Only upon the next start of Plex the deactivation of debugging is effective!
        • Set Transcoder temporary directory to tmpfs (which lives in the RAM)
          • By default this writes to the container path /config which on your OMV system lives in the "Plex" share which lives on the HDD!
          • We will change it to tmpfs which lives in the RAM, and you will then have significantly less write operations to your HDD when having videos which require on the fly transcoding (no direct playback)
          • Plex > Settings (wrench icon on the top right) > section "Settings" > Transcoder
          • Transcoder temporary directory: /tmpfs-host
        • Beware: Maintenance Timeslots are in UTC, not the actual server time!
          • Settings > Settings > Scheduled Tasks
          • Set the start + end time accordingly!



    Docker compose file

    • As referred in Step 5 > File.
    • Be sure to adapt some variables according your setup!
      • See the explanations as inline comments (# stuff behind the pound symbol).
      • Prior saving in any line remove the pound character until the end of line and any entirely empty line.
      • Or use the clean version below. But don't forget to adapt it.


    Clean config

    Odroid HC2 - Armbian 24 Bookworm - OMV7

    7 Mal editiert, zuletzt von porg () aus folgendem Grund: Main chainges are noted in separate posts below. And keep getting integrated into the guide.

  • ryecoaaron

    Hat das Thema freigeschaltet.
  • porg

    Hat das Label 3rd-party hinzugefügt.
  • porg

    Hat das Label OMV 6.x hinzugefügt.
  • Update 2022-07-16 (integrated in the guide above):

    • In "Plex" set the "Transcoder Temporary Directory" to use /tmpfs-host which on the host is at /tmp which is tmpfs which lives purely in RAM, and is by default limited to use 50% of the RAM.
    • And Plex has a mechanism that if space gets narrow in the temporary folder, that it removes the older transcoding fragments.

    Odroid HC2 - Armbian 24 Bookworm - OMV7

  • porg

    Hat den Titel des Themas von „How to install Plex on OMV6 with docker + docker-compose + docker image linuxserver/plex“ zu „How to install Plex on OMV6 with docker image linuxserver/plex + On the fly transcoding files only in tmpfs (living on RAM not HDD)“ geändert.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!