Install PlexPy on Ubuntu 14.04

The Goal

To install PlexPy on Ubuntu 14.04. So what is PlexPy? Well, it a python based web application for monitoring your Plex Media Server (PMS). I have it installed and it is very useful. Go to the official website here for more information.

We will also configure PlexPy to start on boot by configuring it to run as a service.

The Process

Firstly, ssh onto the Ubuntu server you want to install PlexPy onto.

1. Install Git

sudo apt-get install git-core

2. Change diriectory to /opt

cd /opt

3. Clone PlexPy from the official git repository:

git clone https://github.com/JonnyWong16/plexpy.git

4. Change directory to plexpy (in /opt)

cd plexpy

5. Start PlexPy:

sudo python PlexPy.py

Note: PlexPy will be installed to /opt/plexpy.

PlexPy is now installed, you will now have to configure it according to your desired settings. Open a browser and go to the IP address of the server running PlexPy @ http://x.x.x.x:8181.

Next, we will configure PlexPy to start on boot.

6. Stop PlexPy in the browser by going to PlexPy > Settings > Shutdown

7. Go back to /opt/plexpy:

cd /opt/plexpy

8. Create a plexpy file for service options:

sudo touch /etc/default/plexpy

Adjust settings in /etc/default/plexpy per your requirements. See the comments in /opt/plexpy/init-scripts/init.ubuntu for the list of parameters.

9. Create plexpy user, the plexpy service will run using this user:

sudo adduser --system --no-create-home plexpy

10. Apply ownership permissions to the plexpy user on the /opt/plexpy folder recursively:

sudo chown plexpy:nogroup -R /opt/plexpy

11. Run the following comands to configure PlexPy as a service and to start on boot:

sudo chmod +x /opt/plexpy/init-scripts/init.ubuntu
sudo ln -s /opt/plexpy/init-scripts/init.ubuntu /etc/init.d/plexpy
sudo update-rc.d plexpy defaults

12. Then start PlexPy back up:

sudo service plexpy start

PlexPy is now installed successfully and configured to start on boot.

Now you can monitor PMS statistics to your heart's content.

Reference(s)

PlexPy installation instructions

Configure PlexPy as a daemon


Comments