Plex Media Server on LibreELEC

  • Hello new here,

    After scrolling down 7 pages of this, some a little bit older, i ask, whats the best way to install plex server on libreelec? Use dockers, install directly, apt-get does not work. Does plex server comes as a add-on or i have to add a repo?

    Edited 3 times, last by t1t0 (February 12, 2020 at 4:34 PM).

  • Hello new here,

    After scrolling down 7 pages of this, some a little bit older, i ask, whats the best way to install plex server on libreelec? Use dockers, install directly, apt-get does not work. Does plex server comes as a add-on or i have to add a repo?

    Libreelec has no package manager so no apt-get. However, there are scripts to install Plex natively (and update) on libreelec. Escalade posted links to them in the previous page.

    Another way of installing Plex is via docker image. There is an add-on in the repo for that. You first install the linuxserver repo from the libreelec repo, then you'll see various docker add-ons in there.

    Which way is best is arguable. I'd say whatever you're more comfortable with is the best way. Try and see.

    1. Copy plex.conf to /storage/.config/plex.conf: http://ix.io/2cip (then run systemctl daemon-reload)
    2. Copy the .service file to /storage/.config/system.d/plex.service (also edit to change location of plex-update.sh, or remove the ExecStartPre)
    3. Run plex-update.sh
    4. Run systemctl enable plex; systemctl start plex
    5. Enjoy
  • So I recently updated to LibreElec version 9.2 and found my previous Plex server install had been wiped out. I attempted to use the instructions above from escalade and was able to install app.plex with the script provided, but the service would always fail to run.

    Error Log: Pastebin

    Edit: Resolved by finding and tweaking an alternative version of the plex.service file using more default settings.

    Edited 6 times, last by Phantomstar (March 11, 2020 at 12:10 AM).

    1. Copy plex.conf to /storage/.config/plex.conf: http://ix.io/2cip (then run systemctl daemon-reload)
    2. Copy the .service file to /storage/.config/system.d/plex.service (also edit to change location of plex-update.sh, or remove the ExecStartPre)
    3. Run plex-update.sh
    4. Run systemctl enable plex; systemctl start plex
    5. Enjoy

    thanks for this.

    how do I do this right ?

    when i get to 3, i cant get further.

    after pasting the 2cip into the plex.conf and upload it to folder my putty gives me:

    LIBREELEC:~ # systemctl daemon-reload

    LIBREELEC:~ # plex-update.sh

    -sh: plex-update.sh: not found

    LIBREELEC:~ #

    can you advice on this ( for you:D ) simple task ...

  • So I recently updated to LibreElec version 9.2 and found my previous Plex server install had been wiped out. I attempted to use the instructions above from escalade and was able to install app.plex with the script provided, but the service would always fail to run.

    Error Log: Pastebin

    Edit: Resolved by finding and tweaking an alternative version of the plex.service file using more default settings.

    Could you please tell what where these settings were? I have the same issue as you

    Update 2:

    Change the ExecStart line of plex.service to

    ExecStart="/storage/.cache/http://app.plex/Plex Media Server"

    And started. Later one these logs appear

    Update 3

    It seems to be a problem with LibreELEC locales. I installed the locale add-on and changed to en_US.UTF-8. I check then on console

    But when I run

    Code
    LibreELEC:~/.cache/app.plex # locale -a
    C
    POSIX

    It is not there.

    The probelm I get when starting the service is:

    Code
    May 30 13:33:04 LibreELEC systemd[1]: plex.service: Ignoring invalid environment assignment 'export LC_ALL=C': /storage/.config/plex.
    May 30 13:33:04 LibreELEC systemd[1]: Started Plex Media Server.
    May 30 13:33:04 LibreELEC Plex Media Server[3246]: terminate called after throwing an instance of 'std::runtime_error'
    May 30 13:33:04 LibreELEC Plex Media Server[3246]:   what():  locale::facet::_S_create_c_locale name not valid
    May 30 13:33:04 LibreELEC systemd[1]: plex.service: Main process exited, code=killed, status=6/ABRT
    May 30 13:33:04 LibreELEC systemd[1]: plex.service: Failed with result 'signal'.

    How do I install this locale?

    Edited 3 times, last by neroxyr (May 30, 2020 at 7:34 PM).

  • You have to be in the same directory of the plex-update.sh file. Then do

    Code
    chmod 755 plex-update.sh; ./plex-update.sh
  • Could you please tell what where these settings were? I have the same issue as you?

    Here is the plex.service file I ended up using and it solved my issue right away. Make sure your paths match.

  • Hello,

    I could install Plex but I can't open the server. I tried with IP:32400/web

    I check with systemctl status plex.service and it says...

    I followed every step . Any help?

  • It's really unfortunate that Emby has an actual plugin you can just install from the Libreelec repository for a server and it just works instantly but Plex does not and have you to go through this entire mess to get a Plex server to work. Updates are a pain in the ass, it still just dies sometimes and stops working for no reason, it's a disaster. I feel like this could be so much better.

  • It's really unfortunate that Emby has an actual plugin you can just install from the Libreelec repository for a server and it just works instantly but Plex does not and have you to go through this entire mess to get a Plex server to work. Updates are a pain in the ass, it still just dies sometimes and stops working for no reason, it's a disaster. I feel like this could be so much better.

    Plex is not officially supported on LibreELEC, so anything that is done with best effort. Plex should and does work on LibreELEC, but when it doesn't, you are on your own.

  • I have the Plex server running fine in the Docker container my RP4, but I have one problem:

    The server seems to start before my external hard drives are finished mounting, so everything comes up as unavailable in the Plex players.

    Is there a way to ensure that the drives mount before Docker / PMS starts?

    Edit:

    I got Plex server to wait until the drives finished mounting! I did it by adding this:

    [Service]

    ExecStartPre=/bin/sleep 30

    ...to the docker.linuxserver.plex.service file in the storage/.config/system.d directory.

    It only took me 24 hours of trial and error to find something that worked!

    Also:

    Tried the way escalade did it but I'm getting this error:

    Code
    /storage/scripts$ sh plex-update.sh
    plex-update.sh: line 2: : not found
    plex-update.sh: .: line 3: can't open '/storage/.config/plex.conf': No such file or directory

    I can confirm that the plex.conf file is in the directory.

    Edited 4 times, last by Morawake (June 23, 2021 at 3:42 AM).