The Dad Tax Guide to Setting up a Plex Server [On CentOS]
Disclosure: Some of the links in this post are affiliate links and if you go through them to make a purchase I will earn a commission. Keep in mind that I link o these companies and their products because of their quality and not because of the commission I receive from your purchases. The decision is yours, and whether or not you decide to buy something is completely up to you.
Cut the Cord
I worked in the cable industry for almost 10 years. I left it in 2015. The last few years I advocated for change. Packaged television was not working anymore. No one wanted to pay $120/month to have 200 channels of which they watched maybe 10.
While I was still working in the cable industry I cut the cord. I still have cable internet because the alternative in my area is terrible.
I use Netflix (I actually get this free because of the plan I have with TMobile). I have Hulu, and I have a Plex Server.
I have considered, and am still considering using one of the now many streaming services for live TV. Right now it’s looking like YouTube Live.
I am also considering using an antenna. What year is it again?
I love my Plex Server.
First, let me start out by introducing you to Plex.
Plex is software that allows you to stream your movie/video collection to multiple devices. For a low yearly rate of $40 you can purchase the Plex Pass. With this, you get a bunch of add-ons including the ability to watch and record TV shows (not live).
I should point out that purchasing a Plex Pass is not required but it is nice to have!
You can also add on some other features like Podcasts. You can configure it to stream videos from any of your devices as well.
I mainly use it as my movie library. I have taken years of movies off of DVD, added some newer movies, and now have over 500 movies on my server.
I no longer own a DVD player unless you count the Xbox or computers. Incidentally, I use the Xbox for Plex.
I also use my Roku Players for Plex. Get the Roku Streaming Stick Here>>>>>
Why CentOS (Linux)?
I originally set up my Plex Server on a Windows 2012 Server. Compared to my current Plex Server it was beefy. It was running 16 GB of RAM and a relatively newer Xeon processor.
The installation and set up on the Windows Server was very simple. It was easy to attach other drives to the server and have Plex pick them up.
Then the unthinkable happened. The motherboard and processor on the server died. I had a decision to make. Do I replace the motherboard and processor?
The Windows Server also ran hard. It was literally being used to heat my office in the winter. No heater needed. It was consuming a lot of electricity. And I was really not using it for anything else.
Should I fix it? Parts would have cost me a few hundred dollars. Not too bad. But was it worth it?
I had a few older Dell Desktops not really being used for anything. I installed CentOS 7 (on older computers I typically run Linux as it just runs more efficiently). Then I set out to find a guide on how to set up Plex.
The issue was there was not ONE guide to help with everything I was trying to accomplish. I was installing a Plex Server on CentOS..that’s one guide. I was installing a Windows Hard Drive on the Linux machine (another guide). I was transferring movies from an external drive formatted with Windows. (another guide).
The information was all over the place. Some of it was also wrong or did not work.
Why should anyone else suffer?
My Plex “Server” Specs
I wouldn’t necessarily call the computer a server. It definitely runs on a lot less than the Windows Server did.
- Dude, you have a Dell
- Older generation i3 Processor
- 4 GB of RAM
- I added a 2TB drive to it.
- Basically, I took the drive from the Windows Server and put it in this machine. Originally it came with a 500GB drive. So the operating system is installed on the 500GB drive and the movies are on the 2TB drive.
To my dismay, there was not a single guide that had every step to set up and maintain a Plex Server on CentOS. CentOS is easily one of the more popular versions of Linux so that seemed odd.
I pieced together a guide from what I found. Here it is!
Warning: This is done almost exclusively using Terminal (Linux Command Line). If you prefer a GUI or are uncomfortable with using strictly command line then this might not be the best approach for you.
The Dad Tax Guide to Setting Up & Maintaining Plex on CentOS 7
You will first need to have a machine running CentOS 7. This guide assumes that if you are here then you already have the knowledge to install CentOS.
If I get enough requests then I will create a guide on how to install CentOS as well. Installing most versions of Linux is not that hard to do these days, and there are lots of guides on the internet regarding installing CentOS and Linux in general.
First thing I would suggest is setting up SSH. I set up my Plex Server to allow SSH internally only. You can choose otherwise. I won’t get into the risks and how to prevent them here.
My Plex Server is in my basement office. It’s easier to manage from anywhere else in the house using SSH. I don’t even keep a keyboard and mouse connected to it. It’s just quicker to SSH from my phone or laptop.
Get an Account
You will also need to have a plex account. You can set this up on their website. You can create a free account but I would really encourage you to get a Plex Pass. It’s $3.99 a month, or $40/year or you can get a lifetime pass or $120 for life.
I originally chose the one year plan. I will be going to lifetime when my one year is up. That should be soon.
First Do This
yum update -y
This will update your machine. If you have not done this in a while it may take some time. It may also require a reboot if the kernel is updated.
Set Up SSH on CentOS
Open Terminal and Enter
Enter Your Username and Password. This will give you root access so you don’t have to keep typing in your password or Sudo
systemctl start sshd.service
Now, you’re not going to want to do this every time your computer reboots so you can configure your machine to start SSH on boot.
systemctl enable sshd
Now SSH will start whenever the computer reboots.
Like I said earlier, I configured SSH immediately so that I don’t have to go all the way down to the basement to manage my Plex Server.
There are other things to consider. For example, there are different versions of SSH, one more secure than the other.
You may also want to determine if you want to be able to access SSH from outside your network. I decided against this for my reasons but you may want to.
This step is actually pretty easy. Before you do this step you will need to go to the downloads page and get the URL for the latest version.
- Go to this page and select Linux.
- Choose your distribution (64 or 32 bit).
- Right click on the distribution and select copy link address.
As of this writing, the command you would use is:
Now Install Plex (this assumes you still have sudo access). If not include sudo in the beginning of the below command.
yum install plexmediaserver*.rpm
Finally, you will want to configure Plex to automatically start on reboot. I can’t think of a reason you wouldn’t.
sudo systemctl enable plexmediaserver.service
Last but definitely not least, fire it up!!
sudo systemctl start plexmediaserver.service
You will now need to open a browser. The default browser on CentOS is fine.
You may want to install Chrome on your shiny new (old) Linux machine. I chose not to install anything additional besides Plex and some monitoring software.
Browse to http://localhost:8888/web
Enter your username and password. We set this up earlier..remember???
Give your new Plex server a name.
Optional: Put a check in the box Allow me to access my media outside my home. I chose not to do this. Keep in mind if you do this you will also need to configure your router to allow access.
And then create your media folders. In my scenario, these folders were already created because I used a hard drive that was set up on my Windows Server originally. That’s another set of instructions that will not be included here.
To create new media folders go back to your terminal window and enter:
cd ~/ mkdir -p plex-media/movies
You will need to do this for each folder you want to be created. So if you want one for TV you would run this command again but change movies to tv, or you can append to the first command using:
&& mkdir plex-media/tv
I transferred my movies from a back up drive originally set up on Windows. This means I would have another set of instructions. I will include those as a bonus once I am done with this guide.
For now, I am going to assume you have some knowledge of how to transfer media to your Linux hard drive (the folders you created in the previous step.
Open Plex on your local machine. Alternatively, you can navigate to Plex from inside your network using another computer.
For example, on my network, I can go to http://192.168.0.115:32400 and log in from there. This will be different for you depending on the IP address scope of your router and what IP address you assigned to your Plex Server. The :32400 at the end is the port number for Plex.
If you are still on your local machine then just use http://localhost:8888/web.
- Click Add Library
- Select the media type (Movies, TV, Music..etc)
- Navigate to the folder that the media is in
- Click Add
- Repeat for additional libraries
It is important to follow Plex’s naming conventions as outlined on their website. I did not when I first set this up and it did not go smoothly. I had some cleaning up to do.
After you’ve done the initial set up anytime you add more media (to the same folders) just use the scan library files option to update Plex with the new media.
Updating Plex is pretty simple. The heavy lifting is done now.
It just so happened that an update is available as I am putting this guide together so I am going to screen capture it.
First you will want to make sure CentOS is up to date. As you will see in the video you will need to make sure you have su access.
yum update -y
service plexmediaserver stop
yum localupdate plexmediaserver*
service plexmediaserver start
Note, the url used in wget may not be the current version. It probably will not be by the time you read this. You will need to either use the version number shown in the Plex application or go to the Plex website to get the right version.
Transferring Media from a Windows Formatted Drive (Bonus Round)
I am adding this because a lot of people I know are more familiar with Windows. You might be more of a Linux user but if you are then you’re probably not reading this guide.
My backup of my movies is a portable hard drive that was originally formatted in Windows. CentOS does not recognize this natively but there is a way to transfer media from a Windows formatted drive to CentOS.
You will first need to install some software
yum install ntfs-3g
Now create a directory where the Windows Drive will attach
/mnt/windows can be whatever you want it to be but make sure it makes sense.
Now mount the Windows drive
mount -t ntfs-3g /dev/sdb1 /mnt/win
You may need to change sdb1 to sdc1 or higher depending on how many mounts you have on your server. I had to use sdc1 because I have two hard drives in the computer. You can use the df command to see what mounts you have.
On Windows when you detach an external drive you have to select eject from the system tray. (If you don’t do this you risk losing data or corrupting the drive). This is not an option on CentOS. To detach the drive you have to:
To Transfer the Movies I just transfer the entire folder. This is easier than going movie by movie.
cp -r -n /mnt/bkup/Movies\ 2 /mnt/win
The -r sets the copy to be recursive. The -n tells the computer not to overwrite anything if it already exists. Less wear and tear on the hard drive and a much quicker copy drive in my case.
The folder name on my external drive is Movies 2. Note the space. CentOS does not recognize the space so to get around that you have to enter it as Movies\ 2.
That’s going to do it for this Guide to Installing Plex on CentOS 7. I am sure I missed a thing or two so if I did let me know.
If you use this guide let me know.