Featured Post

HOW TO: Install VPN server on Ubuntu when server is behind firewall

The whole point in this post is to run your own VPN service, and allow you to connect remote devices to your home network. To start off yo...

Jan 30, 2015

Building a Dedicated Plex Media Server

So I finally decided to build a dedicated Plex Media Server, my desktop wasn't cutting it.
I used the following Plex link to educate myself about the system requirements.


The Hardware
Basically it stated that for every HD movie I wish to trans-code and stream I needed a passmark of about 2000.

Check passmark.com to determine your CPU passmark, and investigate what you need.
I decided that at maximum I would have 3 simultaneous streams going on, of my home movies of course. All these streams being HD - factor in your network upload speeds when determining what you can handle.

So, ballpark I needed a processor capable of about 6000 on the passmark scale - and I also made room for overhead.

I went with the following processor which gave me a passmark around 7300.:

Start with the processor then let this dictate the rest, I like to keep my systems small so I was looking for a mini-ITX that was LGA 1150 compatible. Please remember and check the CPU maker site to confirm motherboard (MB) compatability.

The MB I chose in the end was:

Mini-ITX means smaller case. I went with the following for simplicity.

So I have my processor, my MB, my case. I added 4GB of RAM and a 120GB SSD. The solid state disk was a little large, since I won't keep my movies locally. This is the RAM and HD:

The Software
So to keep things slick I decided to install Plex on Ubuntu, I figure any future services I want to run will no doubt work on Linux, that and I know Ubuntu. Check the official Plex site for more details on setting this up


I installed Ubuntu Server, because I don't really see a need for a GUI front-end, Plex is configured via the web. After installing Ubuntu Server, installing Plex is simple enough:

Download the .deb package from https://plex.tv/downloads. if you are putting it on a USB for installing on the Ubuntu Server, you may want to install usbmount to automount inserted USB sticks.

sudo apt-get install usbmount

Once you have the .deb package on your server, go ahead and install with the following command, relative to your .deb filename of course:

sudo dpkg -i plexmediaserver_0.9.8.18.290-11b7fdd_amd64.deb

To setup the server, open a browser window, and go to http://127.0.0.1:32400/web, replacing 127.0.0.1 for the IP of the server if you are configuring this remotely.

Setting Up NAS Shares
The next thing you are going to want to do before getting involved with the configuration is map all your samba shares.

You will need cifs-utils:
sudo apt-get install cifs-utils

I used the following link to work out my samba situation:


Make a .smbcredential file in your home directory so you can map your fstab correctly. In this file put username and equals sign and the access username for the share (and domain if loging into a domain) on the first line, put password and equals sign and the password for that user account on the second line of the file. The file should look like:

username=MyUsername
password=MyPassword

# OR:
# username=MyUsername@MyDomain
# password=MyPassword

# OR: (for cifs on Windows Serve 2003)
# username=MyDomain/MyUsername
# password=MyPassword

Edit fstab to map your mounts (sudo nano /etc/fstab). Entries in your fstab should look similar to the following:

//master/install_files /path/to/mnt cifs iocharset=utf8,credentials=/path/to/.smbcredentials,uid=1000 0 0

Where...

//$SERVER/$SHARE $MOUNTPOINT $FS_TYPE credentials=$SMB_CREDENTIALS,uid=$UID,gid=$GID

# e.g.
SERVER=master
SHARE=install_files
MOUNTPOINT=/path/to/mnt
FS_TYPE=smbfs
SMB_CREDENTIALS=/path/to/.smbcredentials
UID=1000
GID=1000

Once completed exit nano and save the changes to fstab. Make sure that the shares mount correctly:

sudo mount -a

If successful, reboot and make sure that mounts and Plex start automagically.

Now configure your Plex shares! Enjoy.