Skip to content

Instantly share code, notes, and snippets.

@qubitrenegade
Forked from zenxedo/TrueNAS Setup.md
Last active August 23, 2021 01:25
Show Gist options
  • Save qubitrenegade/80a67b8f9634dba83e6269cc983156f5 to your computer and use it in GitHub Desktop.
Save qubitrenegade/80a67b8f9634dba83e6269cc983156f5 to your computer and use it in GitHub Desktop.
Ultimate FreeNAS 11.2 Setup

FreeNAS 11.2

WARNING This page contains incomplete and possibly incorrect info. The page is constantly being edited and worked on. Many of these should work but some may be broken. Read the code carefully to understand what you are doing, stuff may be nedd to be changed for your use. Use at your own risk.

Credit for IOCAGE setup goes to https://forums.freenas.org/index.php?resources/fn11-1-iocage-jails-plex-tautulli-sonarr-radarr-lidarr-jackett-ombi-transmission-organizr.58/

*** QBRD note: I have chosen different names for my zvol and so. I HAVE TRIED TO USE THE NAMES DESCRIBBED IN "Setup" SECTION! Please be aware of copy/paste errors where my actual zvol name may be used.

Side note: in retrospect, it might be better to just shell into the jail and execute commands there... The iocage commands were written with the intent that these things would be wrapped in some kind of [probably bash] script... That hasn't happened yet... (because I haven't done it)

Setup

myVol > media >  -series
                 -movies
                 -downloads > -radarr
                              -sonarr
                              -complete
                              -incomplete
                              -recycle bin   
                            ```

I have pool named myVol. I created a dataset named "media" owned by the default freenas user media:media. The dataset contains the folders series,movies,downloads. Radarr, Sonarr, Transmission will need to run as the user media:media to have access to them, this is very important and should not be overlooked. I also have dataset named "apps" to hold the config data.

Permissions

UNIX/POSIX uses user groups and GIDs. The secret is the group names don't have to be the same as long as the GID matches. The correlary is, where people get bit a lot is that group names are the same but GIDs are different. To that end, we'll use the system default gid 8675309 (get it?) for the media user/group, and make the user of every service primary group media

create a media group

We'll Use the default "media" GID in FreeNAS.

In every jail with, run the following command

# from within the jail
pw group add media -g 8675309
# from the freenas cli
# iocage exec <jailname> pw group add media -g 8675309
iocage exec plex pw group add media -g 8675309

Update $user groups

Because we're lazy, we'll let the various packages we install in the jails create the users they need. Then, we'll update their group settings so they behave in the way we want. (e.g.: writing files in $user:media)

pw user mod <username> -g 8675309
pw group mod <groupname> -m <username>

For example we want to make the plex users primary group "media"

pw user mod plex -g 8675309
pw group mod plex -m plex

(ok actually this is dumb, no need to do that... you will for the deluge, sonarr, and I think something else users though)

***QBRD Note: unstrikethrough dates have been validated

Configuration:

Apps

Deluge

TODO: Figure out a way to make the deluge install independent from the deluge config. (i.e.: how do we upgade jails)

echo '{"pkgs":["deluge-cli"]}' > /tmp/deluge-pkg.json
iocage create --release 11.2-RELEASE --pkglist /tmp/deluge-pkg.json --name deluge-01 dhcp=on vnet=on bpf=yes boot=on

# There's no progress bar when you start and install the package at the same time...  
# If for some reason you'd like to manually insatll packages:
# iocage create --release 11.2-RELEASE --name deluge-01 dhcp=on vnet=on bpf=yes boot=on
# iocage start deluge-01
# iocage exec deluge-01 'export ASSUME_ALWAYS_YES=yes; pkg'
# iocage exec deluge-01 'export ASSUME_ALWAYS_YES=yes; pkg install deluge-cli'

# create media group, make nobody primary group media
iocage exec deluge-01 pw group add media -g 8675309
iocage exec deluge-01 pw user mod nobody -g 8675309
iocage exec deluge-01 pw group mod nobody -m nobody

# Mount your media directory
iocage fstab -a deluge-01 /mnt/myVol/media /mnt/Media nullfs rw 0 0

# mount deluge config directory
iocage fstab -a deluge-01 /mnt/nasferatu/apps/deluge-01 /usr/local/etc/deluge nullfs rw 0 0
# update permissions on deluge dir
iocage exec deluge-01 chown -R nobody:wheel /usr/local/etc/deluge

# Enable and start deluge
iocage exec deluge-01 sysrc deluged_enable=YES
iocage exec deluge-01 sysrc deluged_user="nobody"
iocage exec deluge-01 sysrc deluged_confdir="/usr/local/etc/deluge"
iocage exec deluge-01 service deluged start

# optional to enable and start web interface
# iocage exec deluge-01 sysrc deluge_web_enable=YES
# iocage exec deluge-01 sysrc deluge_web_user="nobody"
# iocage exec deluge-01 sysrc deluge_web_confdir="/usr/local/etc/deluge"
# iocage exec deluge-01 service deluge_web start

# Add a user so you can connect
iocage exec deluge-01 "echo 'yourusername:yourpassword:10' | tee -a /usr/local/etc/deluge/auth"

# Allow remote users to connect
iocage exec deluge-01 "deluge-console -c /usr/local/etc/deluge 'config -s allow_remote True'"
iocage exec deluge-01 "deluge-console -c /usr/local/etc/deluge 'config allow_remote'"

# optional "other" settings
iocage exec deluge-01 "deluge-console -c /usr/local/etc/deluge 'config -s download_location /mnt/media/downloads'"
iocage exec deluge-01 "deluge-console -c /usr/local/etc/deluge 'config -s max_active_downloading -1'"
iocage exec deluge-01 "deluge-console -c /usr/local/etc/deluge 'config -s max_active_limit -1'"
iocage exec deluge-01 "deluge-console -c /usr/local/etc/deluge 'config -s max_active_seeding -1'"
iocage exec deluge-01 "deluge-console -c /usr/local/etc/deluge 'config -s max_connections_global 600'"
iocage exec deluge-01 "deluge-console -c /usr/local/etc/deluge 'config -s max_upload_slots_global -1'"

# restart to pick up new user and listen for remote connections
iocage exec deluge-01 service deluged restart

Sonarr V3

Have to upgrade to a later version of Mono.

# echo '{"pkgs":["mono","mediainfo","sqlite3","ca_root_nss","curl", "sonarr-devel"]}' > /tmp/pkg.json
# echo '{"pkgs":["ca_root_nss"]}' > /tmp/pkg.json
# iocage create --pkglist /tmp/pkg.json --release 11.4-RELEASE --name sonarr-v3 dhcp=on vnet=on bpf=yes boot=on
# rm /tmp/pkg.json

iocage create --release 11.4-RELEASE --name sonarr-v3 dhcp=on vnet=on bpf=yes boot=on

iocage fstab -a sonarr-v3 /mnt/myVol/media /mnt/Media nullfs rw 0 0
iocage fstab -a sonarr-v3 /mnt/myVol/app/sonarr /usr/local/sonarr nullfs rw 0 0

iocage exec sonarr-v3 pkg install -y ca_root_nss sonarr-devel
# You shouldn't have to install the old version of mono first... but when this is installed first I get SSL errors...
# iocage exec sonarr-v3 fetch https://github.com/jailmanager/jailmanager.github.io/releases/download/v0.0.1/mono-6.8.0.105.txz
# iocage exec sonarr-v3 pkg install -y mono-6.8.0.105.txz

# iocage exec sonarr-v3 pw user add sonarr -c sonarr -u 351 -d /nonexistent -s /usr/bin/nologin
iocage exec sonarr-v3 pw group add media -g 8675309
iocage exec sonarr-v3 pw user mod sonarr -g 8675309
iocage exec sonarr-v3 pw group mod sonarr -m sonarr
iocage exec sonarr-v3 id sonarr
iocage exec sonarr-v3 chown -R sonarr:sonarr /usr/local/share/sonarr /usr/local/sonarr
iocage exec sonarr-v3 sysrc "sonarr_enable=YES"
iocage exec sonarr-v3 service sonarr start
iocage exec sonarr-v3 fetch https://github.com/jailmanager/jailmanager.github.io/releases/download/v0.0.1/mono-6.8.0.105.txz
iocage exec sonarr-v3 pkg install -y mono-6.8.0.105.txz
iocage restart sonarr-v3

Radarr

mmm... actually, I just installed this plugin too...

## 
# Again create the jail in the gui with dhcp
# echo '{"pkgs":["mono","mediainfo","sqlite3","ca_root_nss","curl"]}' > /tmp/pkg.json
# iocage create -n "radarr" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|10.68.69.27/24" defaultrouter="10.68.69.1" vnet="on" allow_raw_sockets="1" boot="on"
# rm /tmp/pkg.json

# update to Latest Repo

iocage exec radarr "mkdir -p /usr/local/etc/pkg/repos"
iocage exec radarr "ee /usr/local/etc/pkg/repos/FreeBSD.conf"
FreeBSD: {
    url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
iocage fstab -a radarr /mnt/myVol/apps/radarr /config nullfs rw 0 0
iocage fstab -a radarr /mnt/myVol/media /Media nullfs rw 0 0
iocage exec radarr ln -s /usr/local/bin/mono /usr/bin/mono
# Get the latest from github, this isn'tit
# iocage exec radarr "fetch https://github.com/Radarr/Radarr/releases/download/v0.2.0.1120/Radarr.develop.0.2.0.1120.linux.tar.gz -o /usr/local/share"
iocage exec radarr "tar -xzvf /usr/local/share/Radarr.develop.0.2.0.1120.linux.tar.gz -C /usr/local/share"
iocage exec radarr rm /usr/local/share/Radarr.develop.0.2.0.1120.linux.tar.gz

## Media Permissions

iocage exec radarr "pw user add radarr -c radarr -u 352 -d /nonexistent -s /usr/bin/nologin"

iocage exec radarr service radarr onestop
iocage exec radarr "pw user add media -c media -u 8675309 -d /nonexistent -s /usr/bin/nologin"
iocage exec radarr "pw groupadd -n media -g 8675309"
iocage exec radarr "pw groupmod media -m radarr"
iocage exec radarr chown -R media:media /usr/local/share/Radarr /config
iocage exec radarr sysrc 'radarr_user=media'
iocage exec radarr service radarr start
On Windows, you need to change the End of Line (EOL) format in Notepad++ to UNIX:

use ee editor or it won't work at leats for me!
Create an rc file for radarr using your favorite editor at /mnt/iocage/jails/radarr/root/usr/local/etc/rc.d/radarr

iocage exec radarr mkdir /usr/local/etc/rc.d
iocage exec radarr "ee /mnt/iocage/jails/radarr/root/usr/local/etc/rc.d/radarr"

#!/bin/sh

# $FreeBSD$
#
# PROVIDE: radarr
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# radarr_enable:    Set to YES to enable radarr
#            Default: NO
# radarr_user:    The user account used to run the radarr daemon.
#            This is optional, however do not specifically set this to an
#            empty string as this will cause the daemon to run as root.
#            Default: media
# radarr_group:    The group account used to run the radarr daemon.
#            This is optional, however do not specifically set this to an
#            empty string as this will cause the daemon to run with group wheel.
#            Default: media
# radarr_data_dir:    Directory where radarr configuration
#            data is stored.
#            Default: /var/db/radarr

. /etc/rc.subr
name=radarr
rcvar=${name}_enable
load_rc_config $name

: ${radarr_enable:="NO"}
: ${radarr_user:="media"}
: ${radarr_group:="media"}
: ${radarr_data_dir:="/config"}

pidfile="${radarr_data_dir}/nzbdrone.pid"
command="/usr/sbin/daemon"
procname="/usr/local/bin/mono"
command_args="-f ${procname} /usr/local/share/Radarr/Radarr.exe --data=${radarr_data_dir} --nobrowser"

start_precmd=radarr_precmd
radarr_precmd() {
    if [ ! -d ${radarr_data_dir} ]; then
    install -d -o ${radarr_user} -g ${radarr_group} ${radarr_data_dir}
    fi

    export XDG_CONFIG_HOME=${radarr_data_dir}
}

run_rc_command "$1"

iocage exec radarr chmod u+x /usr/local/etc/rc.d/radarr
iocage exec radarr sysrc "radarr_enable=YES"
iocage exec radarr service radarr start

Organizr

echo '{"pkgs":["nginx","ca_root_nss"]}' > /tmp/pkg.json
iocage create -n "organizr" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|10.68.69.7/24" defaultrouter="10.68.69.1" vnet="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json

pkg install -y nginx wget php70 php70-curl php70-pdo php70-sqlite3 php70-simplexml php70-zip php70-openssl curl php70-hash php70-json php70-session php70-pdo_sqlite ca_root_nss

iocage fstab -a organizr /mnt/myVol/apps/organizr /config nullfs rw 0 0

iocage exec organizr sed -i '' -e 's?listen = 127.0.0.1:9000?listen = /var/run/php-fpm.sock?g' /usr/local/etc/php-fpm.conf
iocage exec organizr sed -i '' -e 's/;listen.owner = www/listen.owner = www/g' /usr/local/etc/php-fpm.conf
iocage exec organizr sed -i '' -e 's/;listen.group = www/listen.group = www/g' /usr/local/etc/php-fpm.conf
iocage exec organizr sed -i '' -e 's/;listen.mode = 0660/listen.mode = 0600/g' /usr/local/etc/php-fpm.conf
iocage exec organizr cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
iocage exec organizr sed -i '' -e 's?;date.timezone =?date.timezone = "Universal"?g' /usr/local/etc/php.ini
iocage exec organizr sed -i '' -e 's?;cgi.fix_pathinfo=1?cgi.fix_pathinfo=0?g' /usr/local/etc/php.ini

iocage exec organizr git clone https://github.com/causefx/Organizr.git /usr/local/www/Organizr
iocage exec organizr chown -R www:www /usr/local/www /config
iocage exec organizr sysrc nginx_enable=YES
iocage exec organizr sysrc php_fpm_enable=YES
iocage exec organizr service nginx start
iocage exec organizr service php-fpm start

iocage exec organizr cp -a /usr/local/www/Organizr/config/config.php /config/config.php
iocage exec organizr rm /usr/local/www/Organizr/config/config.php
iocage exec organizr ln -s /config/config.php /usr/local/www/

Jackett

##
# Again, create the jail in your web GUI until there's a better way...
# Use DHCP
# echo '{"pkgs":["curl","ca_root_nss"]}' > /tmp/pkg.json
# iocage create -n "jackett" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|10.68.69.98/24" defaultrouter="10.68.69.1" vnet="on" allow_raw_sockets="1" boot="on"
# rm /tmp/pkg.json
#Update to Latest Repo
iocage exec jackett "pw user add jackett -c jackett -u 818 -d /nonexistent -s /usr/bin/nologin"
iocage exec jackett chown -R jackett:jackett /usr/local/share/Jackett /config
iocage exec jackett mkdir /usr/local/etc/rc.d

ee /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d/jackett
#!/bin/sh

# $FreeBSD$
#
# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# jackett_enable:    Set to YES to enable jackett
#            Default: NO
# jackett_user:    The user account used to run the jackett daemon.
#            This is optional, however do not specifically set this to an
#            empty string as this will cause the daemon to run as root.
#            Default: media
# jackett_group:    The group account used to run the jackett daemon.
#            This is optional, however do not specifically set this to an
#            empty string as this will cause the daemon to run with group wheel.
#            Default: media
# jackett_data_dir:    Directory where jackett configuration
#            data is stored.
#            Default: /var/db/jackett

. /etc/rc.subr
name=jackett
rcvar=${name}_enable
load_rc_config $name

: ${jackett_enable:="NO"}
: ${jackett_user:="jackett"}
: ${jackett_group:="jackett"}
: ${jackett_data_dir:="/config"}

command="/usr/sbin/daemon"
procname="/usr/local/bin/mono"
command_args="-p ${jackett_data_dir}/jackett.pid -f ${procname} /usr/local/share/Jackett/JackettConsole.exe -d ${jackett_data_dir}"

start_precmd=jackett_precmd
jackett_precmd() {
    export USER=${jackett_user}
    if [ ! -d ${jackett_data_dir} ]; then
    install -d -o ${jackett_user} -g ${jackett_group} ${jackett_data_dir}
    fi

    export XDG_CONFIG_HOME=${jackett_data_dir}
}

run_rc_command "$1"
iocage exec jackett chmod u+x /usr/local/etc/rc.d/jackett
iocage exec jackett sysrc "jackett_enable=YES"
iocage exec jackett service jackett restart

Plex

# Nope.  I want my plex server to be DHCP...
# Leaving the following in the event someone else DOES want to manually create their jails... 
# would love feedback on how to create jail with dhcp interface
##### no
# echo '{"pkgs":["plexmediaserver","ca_root_nss"]}' > /tmp/pkg.json
iocage create -n "plex" -p /tmp/pkg.json -r 11.2-RELEASE ip4_addr="vnet0|10.68.69.3/24" defaultrouter="10.68.69.1" vnet="on" allow_raw_sockets="1" boot="on" 
# rm /tmp/pkg.json
##### /no

# We'll assume you created a jail named "plex", if you name it something else (like plex2) replace `plex` with `plex2`.
# Also note, you can run a `iocage console plex` and omit the `iocage exec plex`.
# Final note, commands like `iocage fstab` will _require_ you to be in the host FreeNAS shell.

echo '{"pkgs":["plexmediaserver-plexpass","ca_root_nss"]}' > /tmp/pkg.json
iocage create --name plex --pkglist /tmp/pkg.json --release 11.2-RELEASE vnet=on dhcp=on bpf=yes
iocage set boot=on plex
iocage start plex


# We'll use ports for plex since it seems like that version is newer for some reason?
#! if you don't have plexpass omit the `-plexpass` or `_plexpass` where appropriate.
## setup ports
iocage exec plex portsnap fetch extract

## Install Plex
### this would be where you would omit the `-plexpass`, e.g.:
### cd /usr/ports/multimedia/plexmediaserver/
iocage exec plex cd /usr/ports/multimedia/plexmediaserver-plexpass/ && make install clean

# Update our plex install with our shares
## mount the plexdb directory, this is where plex stores all of its snapshots and metadata and etc
iocage fstab -a plex /mnt/myVol/apps/plexdb /usr/local/plexdata-plexpass nullfs rw 0 0
## Mount your universially shared "media" directory.  This will include things like Movies, TV Shows and Music
iocage fstab -a plex /mnt/myVol/media /mnt/Media nullfs ro 0 0
# make sure we own the files in our shared directory.
iocage exec plex chown -R plex:plex /usr/local/plexdata-plexpass
# update /etc/rc.local to start plexmedia server
iocage exec plex sysrc "plexmediaserver_plexpass_enable=YES"
# Start plex mediaserver
iocage exec plex service plexmediaserver_plexpass start

Ombi

echo '{"pkgs":["mono","ca_root_nss","unzip","sqlite3"]}' > /tmp/pkg.json
iocage create -n "ombi" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|10.68.69.21/24" defaultrouter="10.68.69.1" vnet="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json

iocage exec ombi pkg install -y mono ca_root_nss unzip sqlite3
iocage fstab -a ombi /mnt/myVol/apps/ombi /config nullfs rw 0 0
iocage exec ombi ln -s /usr/local/bin/mono /usr/bin/mono
iocage exec ombi "fetch https://ci.appveyor.com/api/buildjobs/0s9th9l5c0you5c1/artifacts/Ombi.zip -o /usr/local/share"
iocage exec ombi "unzip -d /usr/local/share /usr/local/share/Ombi.zip"
iocage exec ombi mv /usr/local/share/Release /usr/local/share/ombi
iocage exec ombi rm /usr/local/share/Ombi.zip


 iocage exec ombi service ombi onestop
 
You only need to run the next two commands if you are creating the jail for the first time.

iocage exec ombi sqlite3 /config/Ombi.sqlite "create table aTable(field1 int); drop table aTable;"
iocage exec ombi mkdir -p /config/Backups

iocage exec ombi ln -s /config/Ombi.sqlite /usr/local/share/ombi/Ombi.sqlite
iocage exec ombi ln -s /config/Backups /usr/local/share/ombi/Backups
iocage exec ombi "pw user add ombi -c ombi -u 819 -d /nonexistent -s /usr/bin/nologin"
iocage exec ombi chown -R ombi:ombi /usr/local/share/ombi /config
iocage exec ombi mkdir /usr/local/etc/rc.d

ee /mnt/iocage/jails/ombi/root/usr/local/etc/rc.d/ombi

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: ombi
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# ombi_enable (bool): Set to NO by default.
# Set it to YES to enable it.
# ombi_user: The user account ombi daemon runs as what
# you want it to be. It uses 'ombi' user by
# default. Do not sets it as empty or it will run
# as root.
# ombi_group: The group account ombi daemon runs as what
# you want it to be. It uses 'ombi' group by
# default. Do not sets it as empty or it will run
# as wheel.
# ombi_data_dir:    Directory where ombi configuration
#            data is stored.
#            Default: /usr/local/share/ombi

. /etc/rc.subr

name=ombi
rcvar=ombi_enable
load_rc_config ${name}

: ${ombi_enable:=NO}
: ${ombi_user:=ombi}
: ${ombi_group:=ombi}
: ${ombi_data_dir:="/config"}

procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /usr/local/share/ombi/Ombi.exe"

start_precmd=ombi_precmd
ombi_precmd() {
if [ ! -d ${ombi_data_dir} ]; 
then install -d -o ${ombi_user} -g ${ombi_group} ${ombi_data_dir}
fi
export XDG_CONFIG_HOME=${ombi_data_dir}
}

run_rc_command "$1"
iocage exec ombi chmod u+x /usr/local/etc/rc.d/ombi
iocage exec ombi sysrc ombi_enable=YES
iocage exec ombi service ombi start

Unifi

BROKEN

https://www.freshports.org/net-mgmt/unifi5/ https://forums.freenas.org/index.php?resources/installing-ubiquiti-unifi-controller-in-a-jail.55/

pkg update && pkg upgrade -y
pkg install -y bash llvm40 openjdk8
portsnap fetch extract
cd /usr/ports/net-mgmt/unifi5/ && make -DBATCH install clean
sysrc unifi_enable=YES
service unifi start

You must use the ssl site https://yourip:8443

Updates:
portsnap fetch extract
cd /usr/ports/net-mgmt/unifi5
service unifi stop
make reinstall clean
service unifi start

Tautulli

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|10.68.69.97/24" defaultrouter="10.68.69.1" vnet="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json
iocage fstab -a tautulli /mnt/myVol/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

Updates

pkg upgrade "name of package without quotes"
pkg upgrade  :updates all the packages in the jail

Config Locations

Jackett
/usr/local/jackett/ServerConfig.json
/usr/local/jackett/indexers

Sonarr
/usr/local/sonarr/cofig.xml
/usr/local/sonarr/nzbdrone.db

Radarr
/usr/local/radarr/cofig.xml
/usr/local/radarr/nzbdrone.db

Transmission
/usr/local/etc/transmission/home

Plex 
/usr/local/plexdata/Plex Media Server
Ples Pass
/usr/local/plexdata-plexpass/Plex Media Server

Backups

Important files

Sonarr: download backup through web interface or nzbdrone.db & config.xml
Radarr: download backup through web interface or nzbdrone.db & config.xml
Unifi: download backup through web interface
Ombi: Ombi.sqlite
Headphones: headphones.db config.ini
PEXPY:/usr/local/plexpy/config.ini
/usr/local/plexpy/plexpy.db 
/usr/local/plexpy/plexpy.log
/usr/local/plexpy/backups

Common Commands

https://www-uxsup.csx.cam.ac.uk/pub/doc/suse/suse9.0/userguide-9.0/ch24s04.html

cd /directorypath	: Change to directory.
chmod [options] mode filename	: Change a file’s permissions.
chown [options] filename :	Change who owns a file.
cp [options] :source destination	: Copy files and directories.
ln -s test symlink	: Creates a symbolic link named symlink that points to the file test
mkdir [options] directory	: Create a new directory.
mv -i myfile yourfile : Move the file from "myfile" to "yourfile". This effectively changes the name of "myfile" to "yourfile".
mv -i /data/myfile :	Move the file from "myfile" from the directory "/data" to the current working directory.
rm [options] directory	: Remove (delete) file(s) and/or directories.
tar [options] filename :	Store and extract files from a tarfile (.tar) or tarball (.tar.gz or .tgz).
touch filename :	Create an empty file with the specified name.

Testing

service [name of service] start
service [name of service] stop
service [name of service] restart

Changing the config file location

This is optional and adds another layer of complexity but keeps the files safe when the jail is deleted

Using Radarr for example:
/mnt/myVol/apps/Radarr to /config

In the jail you then link the files
ln -s /config/config.xml /usr/local/sonarr/config.xml
ln -s /config/nzbdrone.db /usr/localsonarr/nzbdrone.db

You will either need to delete the config files or move them depending on if you already have the files before linking. After you do this your config files will be safe if you delete the jail

Default User Ports/UID/Location some info not correct

PORT - SERVICE - USER (UID) - DATA-DIRECTORY
sonarr - 8989 - media (816) - /usr/local/share/sonarr
radarr - 7878 - radarr (352) - /usr/local/share/radarr
jackett - 9117 - jackett (818) - /usr/local/share/jackett
Ombi -  - jackett (819) - /usr/local/share/
plexmediaserver 32400 - plex (972) - /usr/local/plexdata
transmission - 9091 -transmission (921) - /usr/local/etc/transmission
unifi  - 8443
deluge-web: 8112
deluge thin client: 58846
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment