• Set up Plex Media Server in openSUSE Tumbleweed

    Introduction

    Hi. I found installing Plex Server in openSUSE was a bit quirky, so I'm putting a few workarounds here or else some new Linux users might have difficulty setting Plex Server up.

    Software

    As far as I know there is no openSUSE RPM available so you have to use the Plex offering available here: https://plex.tv/downloads. At time of writing there was a Centos and a Fedoas RPM on offer. I chose the Fedora RPM. If someone of you chooses to try Centos RPM, let us know in the comment section below.

    I put collected RPMs like this in a simple directory in my /home and add that directory as a repo in Yast ==> Software ==> Repositories ==> Add ==> Local Directory.
    Then install using yast in the normal fashion.

    Ports and Firewall

    The main website lists a bunch of ports so I put them all in a service list this way:
    1. Name a text file as plexmedia-server
    2. Put these entries in the file
      Code:
      ## Name: Plexmedia Server
      ## Description: Opens ports for Plex Media Server with broadcast allowed.
      
      # space separated list of allowed TCP ports
      TCP="3005 8324 32400 32469"
      
      # space separated list of allowed UDP ports
      UDP="1900 5353 32410 32412 32413 32414"
      
      # space separated list of allowed RPC services
      RPC=""
      
      # space separated list of allowed IP protocols
      IP=""
      
      # space separated list of allowed UDP broadcast ports
    3. place the file in the directory
      Code:
      /etc/sysconfig/SuSEfirewall2.d/services
    4. Open the Friewall in Yast ==> Allowed Services ==> Service to allow ==> Plexmedia Server (in the drop-down box) + Add ==> Next etc


    Activating the service to start at boot time

    A service file exists after installing the RPM and you can see an entry for it in Yast ==> System ==> Services ==> in the list will be "plexmediaservice" and it will be Disabled and Inactive. The daemon doesn't turn on and it doesn't persist in this tool. Instead use this workaround to activate the server:

    You have to put a line in the root cron table to activate the Plex Server a little time after boot up. I did it this way:
    I like to use kwrite as the editor (because I never did like the default editor vi in a gui environment), so in a su console I ran this command to temporarily change the root editor:
    Code:
    export EDITOR='dbus-launch /usr/bin/kwrite'
    That will change the cron editor to kwrite until the next boot. If you like to use Vi, the default editor, then dont run the command.

    Then run this command (in su console) to open the root cron table
    Code:
    crontab -e
    The table will open and add this line into it:
    Code:
    @reboot sleep 60;systemctl start  plexmediaserver.service
    There must also be a final line in the file, a blank line, or it will fail.
    That entry will give the cron a 1 minute pause at boot time, then execute the startup of the media server.

    Access the Server from a Computer in the LAN

    Use this web address from within the openSUSE server:
    HTML Code:
    http://localhost:32400/web/index.html
    Use this web address from within the LAN:
    HTML Code:
    http://IPaddressOfTheServer:32400/web/index.html
    There's a software (app?) for windows I didn't use it, I just use chrome browser in windows.

    Accessing from Android devices
    Use the Play Store App. Search on "Plex for Android" and choose the app by Plex, inc.

    That's all folks. Be well.

    FFI see YouTube video here by Geeko Tutorials
    Comments 4 Comments
    1. armyhoium's Avatar
      armyhoium -
      If the service fails to start make sure you have a group name of plex with the plex system account assigned to it.
    1. schietzsch's Avatar
      schietzsch -
      Sorry but setting your default editor, has nothing to do with setting up plex.
      And why do a @reboot cron, if you can just enable it like this?

      systemctl enable plexmediaserver.service

      But thank you for the Firewall/Port list, realy helpfull
      systemctl enable plexmediaserver.service
    1. luke2235's Avatar
      luke2235 -
      If anyone else is having this problem, I had to take a couple extra steps after installing the fedora rpm.
      1) create plex group in yast and add plex user to the group (as stated above)
      2) change ownership of /var/lib/plexmediaserver (sudo chown : plex /var/lib/plexmediaserver)
      3) give plex group write permission to this directory (sudo chmod g+w /var/lib/plexmediaserver)
      4) then sudo systemctl restart plexmediaserver && sudo systemctl enable plexmediaserver
    1. ezio84's Avatar
      ezio84 -
      Quote Originally Posted by luke2235 View Post
      If anyone else is having this problem, I had to take a couple extra steps after installing the fedora rpm.
      1) create plex group in yast and add plex user to the group (as stated above)
      2) change ownership of /var/lib/plexmediaserver (sudo chown : plex /var/lib/plexmediaserver)
      3) give plex group write permission to this directory (sudo chmod g+w /var/lib/plexmediaserver)
      4) then sudo systemctl restart plexmediaserver && sudo systemctl enable plexmediaserver
      This did the trick, thank you