PlexPy

Deprecated - Tautulli has taken over development. The final version of PlexPy v1 was released in October of 2017.

PlexPy (legacy) is a web application for monitoring, analytics and notifications for Plex. PlexPy runs on its own port; 60294 has been automatically generated for you, but you may use another 5 digit port between 10000 and 65535.

Installation

  1. SSH to your slot

  2. Clone the repository: git clone https://github.com/JonnyWong16/plexpy.git

  3. Start PlexPy: screen -dmS plexpy ~/plexpy/PlexPy.py -p 60294

  4. Access PlexPy at http://server.whatbox.ca:60294 and follow the setup wizard's instructions. Use server.whatbox.ca as your Plex hostname and the port you chose during Plex setup. You can find this port in Plex's settings under Server -> Remote Access.

Manual update

  1. Terminate existing PlexPy processes: pkill -f PlexPy.py

  2. Change to the PlexPy directory: cd ~/plexpy

  3. Update PlexPy with git: git pull

  4. Start PlexPy: screen -dmS plexpy ~/plexpy/PlexPy.py -p 60294

Update to Tautulli (PlexPy v2)

  1. Backup your database! Go to the PlexPy Settings > General tab > Backup Database.

  2. Terminate existing PlexPy processes: pkill -f PlexPy.py

  3. Change to the PlexPy directory: cd ~/plexpy

  4. Update PlexPy with git: git fetch and git checkout beta

  5. Start PlexPy: screen -dmS plexpy ~/plexpy/PlexPy.py -p 60294

Automatically Restart

Below are steps to take to have your PlexPy instance automatically restart if it crashes, or if the server is rebooted.

  1. Make a file to be used for the script. touch ~/plexpy_restart.cron

  2. Edit the file and enter the text below. nano -w ~/plexpy_restart.cron

     #!/bin/bash
     if pgrep -fx "/usr/lib/python-exec/python2.7/python /home/user/plexpy/PlexPy.py -p 60294" > /dev/null
     then
         echo "PlexPy is running."
     else 
         echo "PlexPy is not running, starting PlexPy"
         screen -dmS plexpy ~/plexpy/PlexPy.py -p 60294
     fi
     exit
    
  3. Save the file with Ctrl+x and the "y" and Enter to accept overwriting.

  4. Make the script executable. chmod +x ~/plexpy_restart.cron

  5. Open your crontab. EDITOR=nano crontab -e

  6. Enter the following text

     @reboot /home/user/plexpy_restart.cron >/dev/null 2>&1
     */5 * * * * /home/user/plexpy_restart.cron >/dev/null 2>&1
    
  7. Save the crontab with Ctrl+x and the "y" and Enter to accept overwriting.