Last updated on February 22, 2020
Plex is a great way to get access to your media files anywhere you want them. However, setting up Plex on Fedora can be a little bit tricky if you’re not sure what you’re doing. Save yourself the silent screams of rage and use my easy to follow guide to set up Plex securely and with the minimum of fuss.
So this week I have taken the plunge and gone 100% Linux (in this case Fedora 21 on my laptop and Korora on my desktop). I’ve only been using Korora for a few days now, it is essentially Fedora 21 with a few bits added that you probably would have added anyway. I’ll post about my experiences with it another day.
For today I am going to be talking about Plex.
What is Plex?
Plex, if you don’t already know, is a media streaming and sharing tool which enables you to access any of your media content (videos, films, tv music etc) anywhere in the world. It goes without saying that you need a decent computer with a pretty good net connection to make this viable. Thankfully I have both, as I think a lot of people do.
Happily for us, the wonderful people at Plex realise that not everyone uses Windows.. or iOS.. or android and so make versions of their apps for a myriad of different systems including Linux – hooray!
Let’s get started!
Your Plex installing experience starts on their website to download the media server itself. So go to the Plex download page now- make sure you download the correct version for your operating system of choice and whether you are 32bit or 64bit.
Since this tutorial is for Fedora users I will assume you’ve downloaded your rpm and have saved it somewhere sensible (the Desktop is not sensible you unorganised Windows user!)
Install the RPM
Now, if you have Yumex installed (a graphical front-end for Yum) you should be able to find that file, double click it, enter your password and voila it’s installed. If you don’t use yumex, or prefer not to (I know… terminal is usually quicker than anything else) you can use the command below to install it – just change the location and name of the file to wherever yours is saved. Mine was something like this.
sudo yum install /home/bdavis/downloads/plexmediaserver_0.9.8.18.290-11b7fdd_x86_64.rpm
Now Plex is installed! You’re on your way to getting your content anywhere you go!
Start the service
Next up we actually have to start Plex, the following command will do just that as well as create a symlink to always start Plex at boot.
sudo systemctl enable plexmediaserver.service && systemctl start plexmediaserver
If you’re prompted to enter your admin password do so.
Now you should be able to go to http://localhost:32400/web/index.html and access Plex in almost all it’s glory! Why almost? Because now you have a few more bits to iron out!
File permissions and access
Our first big problem (although it’s not really) is to allow Plex to access any of our files. PMS runs as it’s own user (surprisingly a user called plex), not you by default. So we need to give that user access to your files. The easiest way to do this is to add the plex user to your group. Type the following command in a terminal to do just that, remembering to replace bdavis with your username.
sudo gpasswd -a plex bdavis
Now that’s done you can chmod the directory (or directories) in which you keep all your files 755 to allow plex to read them. You can do that with the following command, again make sure you change the directory to match wherever your files are.
chmod -R 755 /mnt/storage
If you still have problems, open up your media folder and right click on the containing folder and select properties. In the windows that opens click the Permissions tab. It will look something like this:
For starters, make sure the last two drop down boxes say create and delete files. Once that’s done click the button at the bottom “Change Permissions for Enclosed Files…” (not sure why three of those words are capitalised, nor why there are thre dots at the end… but hey ho).
Make sure again your drop down boxes look like mine then click the change button. If you have a lot of media this could take a few seconds. But once it’s done we can move onto the last step in this tutorial.
Set your Plex free!
The whole point of using Plex is to be able to access your media from anywhere, however, Fedora (and rightly so) doesn’t by default want any part of your system to be available anywhere. Se we need to let it know certain ports are ok to use. Many people online have actually resorted to disabling their firewalls to allow plex access. This is not necessary or recommended!
Firstly, go back to your Plex web page and load up your settings, then click server and then the button “show advanced”.
You can see in this screenshot that my plex is completely accessible by the outside world, yours right now will not be. So let’s change that. Fire up your firewall, the easiest way is to open your dash and start typing firewall.
Once you’ve opened your firewall gui (and entered your password to unlock it) this is what you will see.
Don’t be alarmed, we really don’t have to do much in here at all. Firstly, where it says configuration there is a drop down box which two choices, runtime or permanent – change it to permanent. Now that’s done click the services tab near the top (the one next to zones)
In the screenshot above you can see where you should be – and you can see the ports I have open on my desktop. Ignore all but the 32400 ones, add your own as these are, on for UDP and one for TCP. When you’ve done that you can close the firewall gui down (it saves changes as it’s going along).
We’re almost there! Now just go back to your plex web page (to the the settings page from earlier) click the tick box to manually specify port then click apply. Assuming your router allows everything through (and if not you can find how to here) you are good to go!
Enjoy your Plex wherever you are!
Any questions or problems, don’t hesitate to ask.