How to: Migrate Tautulli (formetly PlexPy) from a Warden jail to an iocage jail

Status
Not open for further replies.

ryanakata

Explorer
Joined
Jul 26, 2015
Messages
63
Writing this one up as I had some trouble when migrating Plex and thanks to @sretalla helping me with Plex and @Pentaflake having written an excellent thread on jails, I wanted to have a quick resource for anyone looking on what and how to move to an iocage jail.

https://forums.freenas.org/index.ph...lidarr-jackett-ombi-transmission-organizr.58/ was where most of the setup came from.

#Create jail and install Tautulli
Code:
echo '{"pkgs":["python2","py27-sqlite3","py27-openssl","ca_root_nss","git"]}' > /tmp/pkg.json
iocage create -n "tautulli" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.3/24" defaultrouter="192.168.1.1" vnet="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json
mkdir /mnt/jailssd/apps/tautulli
iocage fstab -a tautulli /mnt/jailssd/apps/tautulli /config nullfs rw 0 0
iocage exec tautulli git clone https://github.com/Tautulli/Tautulli.git /usr/local/share/Tautulli
iocage exec tautulli "pw user add tautulli -c tautulli -u 109 -d /nonexistent -s /usr/bin/nologin"
iocage exec tautulli chown -R tautulli:tautulli /usr/local/share/Tautulli /config
iocage exec tautulli cp /usr/local/share/Tautulli/init-scripts/init.freenas /usr/local/etc/rc.d/tautulli
iocage exec tautulli chmod u+x /usr/local/etc/rc.d/tautulli
iocage exec tautulli sysrc "tautulli_enable=YES"
iocage exec tautulli sysrc "tautulli_flags=--datadir /config"
iocage exec tautulli service tautulli start


#Stop the jail to move your db into it
iocage exec tautulli service tautulli stop

#Old filepath for reference
Code:
/mnt/jailssd/PlexPy/usr/local/share/plexpy/


#Copy your tautulli.db file over, and nothing else into the newly create config folder for your jail.
Code:
cp -f -i "/mnt/jailssd/PlexPy/usr/local/share/plexpy/tautulli.db" "/mnt/jailssd/apps/tautulli"


Start Tautulli, login to plex and all should be there. Shut down your old jail and delete it!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Nice work.

I installed my tautulli inside the plex jail (since it doesn't make a lot of sense to run it without plex running too).
I just added the pkgs to the json before creating the plex jail and then ran the rest of the instructions substituting the jail name and paths (I needed to use plexpyconfig instead of config as it was already used by plex itself).

Since tautulli is self-updating, you don't really need to stop the jail for it to update and it doesn't seem to bother plex to coexist with it.

When I do my pkg update && pkg upgrade, both plex and tautulli get the updates they need in terms of supporting packages.

Just a thought for people's consideration.
 

ryanakata

Explorer
Joined
Jul 26, 2015
Messages
63
Nice work.

I installed my tautulli inside the plex jail (since it doesn't make a lot of sense to run it without plex running too).
I just added the pkgs to the json before creating the plex jail and then ran the rest of the instructions substituting the jail name and paths (I needed to use plexpyconfig instead of config as it was already used by plex itself).

Since tautulli is self-updating, you don't really need to stop the jail for it to update and it doesn't seem to bother plex to coexist with it.

When I do my pkg update && pkg upgrade, both plex and tautulli get the updates they need in terms of supporting packages.

Just a thought for people's consideration.

Makes sense, and that would have been something for me to consider before I moved it over. All I would have had to change was a port forwarding rule in my USG to match.

Does the pkg upgrade get you to the latest plex release or are you still using the script?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Pkg upgrades are useful for the supporting software like python (or mono for Sonarr)... All the stuff that is in the json (and the dependencies that those pkgs install).

The plex script only gets you the latest plex code (which pkg will not), being stuck with outdated python isn't a disaster, but you could be missing out on performance improvements.
 
Status
Not open for further replies.
Top