- 
                Notifications
    You must be signed in to change notification settings 
- Fork 56
Ubuntu Install
This is a guide to get Plex Remote Transcoder setup on two Ubuntu machines.  The first machine will be the master node with IP address 192.168.0.2 and the transcode slave node with IP address 192.168.0.3.  This guide assumes that you have already installed the Plex Media Server (PMS) .deb package on the master.  The slave should be a vanilla install of Ubuntu Server 14.04.  A good way to test this out if you don't have access to multiple machines is to simply use something like VirtualBox.  Let's get started.
First off, let's install Plex Remote Transcoder:
git clone https://github.com/wnielson/Plex-Remote-Transcoder.git
cd Plex-Remote-Transcoder
sudo python setup.py install
You may need to install git (sudo apt-get install git) and setuptools (sudo apt-get install python-setuptools) if you don't already have them installed.
Now we need to configure Plex Remote Transcoder via prt
sudo prt install
You will be prompted for the IP address of the master node.  In this example, it is 192.168.0.2.  Behind the scenes this command will rename the original Plex New Transcoder to plex_trancoder and install a new Plex New Transcoder provided by Plex Remote Transcoder.
Now we need to tell the master about the transcode slave.  We can do this via the following command
prt add_host
which will prompt you for the slave details.  For our example, the values we should enter are
Host: 192.168.0.3
Port: 22
User: plex
That does it for Plex Remote Transcoder.
The slave nodes must be able to access certain directories contained on the master node.  The easiest way to go about doing this is by sharing the directories over the network.  In our case, we're going to use NFS, but if you are more comfortable with a different protocol the approach should be similar.
If your master node doesn't have NFS installed, you can do so via
sudo apt-get install nfs-kernel-server
Once that is complete, you will have a new file names /etc/exports which defines the network shares.  For Plex Remote Transcoder to work, we need to share three things
- The Plex configuration directory
- The Plex binaries directory
- The temporary Plex transcoder directory
- Every directory that PMSlooks for media in
The first directory is /var/lib/plexmediaserver and the second is /usr/lib/plexmediaserver.  The third directory can be found/changed via Plex's web interface. Log in, go to settings, select your server, click "Show Advanced", click on "Transcoder" and the path will be under "Transcoder temporary directory".  In this example, I've set this to /opt/plex/tmp.  Finally, for this example we are assuming that all media is contained in /mnt/media.
If you also decide to use /opt/plex/tmp (or something similar) make sure the directory exists (sudo mkdir -p /opt/plex/tmp) and that it is writable (sudo chown -R plex:plex /opt/plex).
With these paths in mind, we can now create the network shares.  Open /etc/exports with your favorite editor (make sure to do so as sudo) and add the following:
/var/lib/plexmediaserver 192.168.0.3(ro,sync,no_subtree_check)
/usr/lib/plexmediaserver 192.168.0.3(ro,sync,no_subtree_check)
/opt/plex/tmp 192.168.0.3(rw,sync,no_subtree_check)
/mnt/media 192.168.0.3(ro,sync,no_subtree_check)
In these shares we explicitly told NFS to only share these with the slave (IP address 192.168.0.3).  Additionally, the temporary transcoder directory, /opt/plex/tmp, must be exported read-write (hence the rw option).  The other directories are simply exported as read-only (ro).
Now it is time to configure the slave node.  Like on the master, lets start by installed Plex Remote Transcoder
git clone https://github.com/wnielson/Plex-Remote-Transcoder.git
cd Plex-Remote-Transcoder
sudo python setup.py install
Again, installing git and python-setuptools as needed via apt-get.  However, there is no need to run prt install on the slave.
We need to tell the slave how to mount the network shares that we've exposed on the master.  Open up /etc/fstab with and editor, as sudo, and add the following:
192.168.0.2:/var/lib/plexmediaserver /var/lib/plexmediaserver nfs defaults 0 0
192.168.0.2:/usr/lib/plexmediaserver /usr/lib/plexmediaserver  nfs defaults 0 0
192.168.0.2:/opt/plex/tmp /opt/plex/tmp  nfs defaults 0 0
192.168.0.2:/mnt/media /mnt/media nfs defaults 0 0