How To Install Tautulli (A Python based monitoring and tracking tool for Plex Media Server.)

Supa

Patron
Joined
Jan 10, 2014
Messages
204
Reference:

https://github.com/Tautulli/Tautulli-Wiki/wiki/Installation#freenas

Tautulli will be installed to /usr/local/share/Tautulli.

  • Create a new jail for Tautulli (you can also install it within the PMS jail if you wish)
  • Open the jail shell.
  • Install pre-requisites: pkg install python2 py27-sqlite3 py27-openssl py27-pycryptodome security/ca_root_nss git
  • Type: cd /usr/local/share/
  • Type: git clone https://github.com/Tautulli/Tautulli.git
  • Fix permissions:
    • Allow all users to run: chmod -R 777 Tautulli OR
    • Allow only a certain user to run: chown -R user:group Tautulli
  • Type: cd Tautulli
  • Type: python2 Tautulli.py
  • Tautulli will be loaded in your browser or listening on http://localhost:8181 (http://[JAIL-IP]:8181)
  • To start Tautulli on startup, refer to Install as a daemon or see below!
To automate the Tautulli script just do this in the jail shell (in root directory):
  • Make sure Tautulli is shutdown. Tautulli > Settings > Shutdown
  • Ensure user permissions are correct: chown -R root:wheel /usr/local/share/Tautulli
  • Copy init script: cp /usr/local/share/Tautulli/init-scripts/init.freenas /usr/local/etc/rc.d/tautulli
  • Set user to run: sysrc tautulli_user="root"
  • Enable at boot: sysrc tautulli_enable="YES"
  • To start service tautulli start
    • You can use service tautulli [start | stop | restart | status] to start/stop/restart or check the status of the Tautulli service
Optional:

  • If you need to change user: sysrc tautulli_user="USERNAME"
    • Set user permissions for the Tautulli directory: chown -R USERNAME:GROUPNAME /usr/local/share/Tautulli
  • Run from another directory: sysrc tautulli_dir="DIRECTORY"

Once Tautulli is running just fetch the plex token with your login info and it should auto-generate the plex IP / server URL.

l1ylhSS.png



 
Last edited:

Qosmo

Cadet
Joined
Dec 20, 2014
Messages
7
Was gonna post this in the How-To tutorial section but no privileges.


PlexPy Setup:


  • Add PlexPy Jail (you can also install it within the PMS if you wish)
  • Open the shell through plexpy.
  • pkg install python2 databases/py-sqlite3 security/py-openssl security/ca_root_nss git
  • cd /usr/local/share/
  • git clone https://github.com/drzoidberg33/plexpy.git
  • chmod 777 plexpy or to allow one user: chown -R user:group plexpy
  • cd plexpy
  • python2 PlexPy.py
  • PlexPy will be loaded in your browser or listening @ http://localhost:8181
  • To automate the PlexPy script just do this (in root directory):
    • cp /usr/local/share/plexpy/init-scripts/init.freenas /etc/rc.d/plexpy
    • chmod 777 /etc/rc.d/plexpy
      • edit /etc/rc.d/plexpy
        • edit the following line: ${plexpy_user:="username you would like it to run with"} I just used 'root'
    • edit /etc/rc.conf and add plexpy_enable="YES"
    • Restart the plexpy jail
    • service plexpy status start/stop/
Worked great!! Thanks for this!!
 

traderjay

Explorer
Joined
Oct 16, 2015
Messages
58
I am running the latest version of FreeNAS 9.3 and tried to install plexpy following the instructions posted here -
I encountered the following errors after entering the first command:
Code:
Installing p5-Digest-HMAC: 1.03                                        
        Installing p5-Net-SSLeay: 1.63                                         
        Installing p5-Socket: 2.014                                            
        Installing p5-IO-Socket-IP: 0.29                                       
        Installing p5-Error: 0.17022                                           
        Installing cvsps: 2.1_1                                                
        Installing p5-MIME-Base64: 3.14                                        
        Installing py27-sqlite3: 2.7.6_3                                       
        Installing py27-cffi: 0.8.2                                            
        Installing p5-Authen-SASL: 2.16                                        
        Installing p5-IO-Socket-SSL: 1.992                                     
        Installing py27-cryptography: 0.2.2_1                                  
        Installing p5-Net-SMTP-SSL: 1.01_2                                     
        Installing py27-openssl: 0.14                                          
        Installing git: 2.0.0                                                  
                                                                               
The installation will require 187 MB more space                                
                                                                               
4 MB to be downloaded                                                          
                                                                               
Proceed with installing packages [y/N]: y                                      
pkg: http://pkg.FreeBSD.org/freebsd:9:x86:64/latest/All/sqlite3-3.8.4.3.txz: Not Found


and then the following

Code:
root@Plexpy:/ # cd /usr/local/share/                                           
root@Plexpy:/usr/local/share # sudo git clone https://github.com/drzoidberg33/pl
expy.git                                                                       
sudo: Command not found.                                                       
root@Plexpy:/usr/local/share #   


What am I doing wrong :(
 

Aaron W Floch

Dabbler
Joined
Mar 10, 2015
Messages
14
Was gonna post this in the How-To tutorial section but no privileges.


PlexPy Setup:


  • Add PlexPy Jail (you can also install it within the PMS if you wish)
  • Open the shell through plexpy.
  • pkg install python2 databases/py-sqlite3 security/py-openssl security/ca_root_nss git
  • cd /usr/local/share/
  • git clone https://github.com/drzoidberg33/plexpy.git
  • chmod 777 plexpy or to allow one user: chown -R user:group plexpy
  • cd plexpy
  • python2 PlexPy.py
  • PlexPy will be loaded in your browser or listening @ http://localhost:8181
  • To automate the PlexPy script just do this (in root directory):
    • cp /usr/local/share/plexpy/init-scripts/init.freenas /etc/rc.d/plexpy
    • chmod 777 /etc/rc.d/plexpy
      • edit /etc/rc.d/plexpy
        • edit the following line: ${plexpy_user:="username you would like it to run with"} I just used 'root'
    • edit /etc/rc.conf and add plexpy_enable="YES"
    • Restart the plexpy jail
    • service plexpy status start/stop/

Thanks for the guide. Everything is working great!
 

tonyp1983

Dabbler
Joined
Feb 17, 2015
Messages
31
Thank you for this, been wanting to monitor Plex usage and PlexWatch was a bit of a chore to get setup on FreeNAS. Your guide had me setup in 5 minutes! :)
 

travanx

Explorer
Joined
Jul 1, 2014
Messages
62
Was getting some weird errors after installing this. After restarting, and putting my plex id/pass in at restart made it all work.

Been wanting to have a way to display play info on my iRule remote control, and PlexPy might make this easier.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Great 'How To...' and very simple to set-up.

I've been using plexWatch/Web for a while, and whilst it works OK is a little basic and was a pain to initially set-up. This took about 10 minutes including importing my plexWatch database!

UPDATE:

How much better is Plexpy? It's fantastic, and provides much more information than PlexWatch! A must for anyone with a PMS and so simple to create in a jail. Thanks again for the guide!
 
Last edited:

dTardis

Dabbler
Joined
Jan 29, 2016
Messages
24
  • Add PlexPy Jail (you can also install it within the PMS Jail if you wish)
  • Open the shell through plexpy.
  • pkg install python2 databases/py-sqlite3 security/py-openssl security/ca_root_nss git
  • cd /usr/local/share/
  • git clone https://github.com/drzoidberg33/plexpy.git
  • chmod 777 plexpy or to allow one user: chown -R user:group plexpy
  • cd plexpy
  • python2 PlexPy.py
  • PlexPy will be loaded in your browser or listening @ http://localhost:8181 (http://192.168.1.xxx:8181)
  • To automate the PlexPy script just do this (in root directory):
    • cp /usr/local/share/plexpy/init-scripts/init.freenas /etc/rc.d/plexpy
    • chmod 777 /etc/rc.d/plexpy
      • edit /etc/rc.d/plexpy
        • edit the following line: ${plexpy_user:="xxxx"} I just used 'root'
    • edit /etc/rc.conf and add plexpy_enable="YES" to another line.
    • Restart the plexpy jail
    • service plexpy start or service plexpy stop or service plexpy status can now be run
FYI you are awesome!
 

Carmageddon

Cadet
Joined
Mar 6, 2016
Messages
4
  • Add PlexPy Jail (you can also install it within the PMS Jail if you wish)
  • Open the shell through plexpy.

Could you please elaborate on the above quoted actions?
I am new to Freenas which works greatly, but I still don't understand how to install Plex.. Cant wait to try it.
Doing it via the Plugins didn't work, I cant get it to start, so I want to try your method.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231

camedwardo

Cadet
Joined
Mar 1, 2016
Messages
2
Could you please elaborate on the above quoted actions?
I am new to Freenas which works greatly, but I still don't understand how to install Plex.. Cant wait to try it.
Doing it via the Plugins didn't work, I cant get it to start, so I want to try your method.

Hey Carmageddon,

Add PlexPy Jail (you can also install it within the PMS Jail if you wish)

This means you need to create a new jail for this specific application. You could also skip the creation of a new jail and install it in the existing PMS Jail(Plex Server) if you prefer.

If you have questions about how to create a new jail or about jails in general, check out the documentation section for your version of FreeNAS.

Open the shell through plexpy.

FreeNAS is built on FreeBSD and uses Jails. When you SSH or shell into your FreeNAS instance you will need to select which jail you would like to work in. In this case we want to work in the newly created plexpy jail or the existing PMS jail if you chose to do so.

1. Use the command jls to list all existing jails once SSH'd into your FreeNAS instance.

You should see something like this but with dirs related to your personal NAS:

JID IP Address Hostname Path
1 - calbre /mnt/SilverNAS/jails/calbre
2 - plexmediaserver_1 /mnt/SilverNAS/jails/plexmediaserver_1
3 - plexpy /mnt/SilverNAS/jails/plexpy

2. With the number of the corresponding jail do the following to move to it in the command line:

I want to get into the plexpy jail so I use the number 3

jexec 3 csh

If you are curious, csh refers to the type of shell you will be using, you could use Bash if you prefer but csh will work just fine. It is also installed by default, bash is not.

Again, if you have further questions about Jails and how to work with them, hit up the documentation, it will answer all of your questions.

Best of luck
 

DeanB

Dabbler
Joined
Sep 28, 2015
Messages
14
I followed this guide and had plexpy running fine for the last 3 weeks. All of sudden it stopped working today, i believe there was a recent update.
I deleted the jail and recreated it from scratch and the web interface would work initially but would then stop functioning after a while. Browser shows webpage isn't available.
When I try to run "service plexpy start" I get the message

env: python: No such file or directory
/etc/rc.d/plexpy: WARNING: failed to start plexpy


Any ideas?
 

cruto

Cadet
Joined
Mar 15, 2016
Messages
1
env: python: No such file or directory
/etc/rc.d/plexpy: WARNING: failed to start plexpy

I had the same problem with my install. It reminded me of similar issues with sabtosickbeard.py.
I solved it by editing the first line in plexpy.py from

#!/usr/bin/env python


to

#!/usr/local/bin/python2.7


This reflects where python is installed in my jail. I don't know why this fixed it (I mean isn't the line commented out?), but it did;)
 

soulburn

Contributor
Joined
Jul 6, 2014
Messages
100
Thanks to Supa for the guide and cruto for the python env fix!
 
Last edited:
Top