Article: 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: Media Server Downloads | Plex Media Server for Windows, Mac, Linux, FreeBSD and More. 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
## 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
  1. place the file in the directory
/etc/sysconfig/SuSEfirewall2.d/services
  1. 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:

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

crontab -e

The table will open and add this line into it:

@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:

http://localhost:32400/web/index.html

Use this web address from within the LAN:

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

If the service fails to start make sure you have a group name of plex with the plex system account assigned to it.

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 :slight_smile:
systemctl enable plexmediaserver.service

Kodi (in the past XBMC) is a free and open-source media player programming application created by the XBMC/Kodi Foundation, a non-benefit innovation consortium.[4] Kodi is accessible for different working frameworks and equipment stages, with a product 10-foot UI for use with TVs and remote controls. It enables clients to play and view most spilling media, for example, recordings, music, podcasts, and recordings from the web, and additionally all regular advanced media documents from nearby and system stockpiling media. lucid dreaming pro

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 :wink:

How it should be done.
Huge thanks!
:good: