This post documents the steps required to install qBittorrent , Jackett , Lidarr , Radarr , Sonarr , and Plex in TrueNAS jails version 12.0-U6.
The FN11.3 iocage jails - Plex, Tautulli, Sonarr, Radarr, Lidarr, Jackett, Transmission, Organizr guide inspired me to write this guide. I’ll also briefly cover permissions.
Disclaimer# From Wikipedia on BitTorrent Legislation :
Although the protocol itself is legal, problems stem from using the protocol to traffic copyright infringing works, since BitTorrent is often used to download otherwise paid content, such as movies and video games.
See also: Legal issues with BitTorrent (Wikipedia)
I’ll only cover options that deviate from the defaults. I use DHCP reservations to manage my server IPs, so I use the dhcp=1 option to create jails.
Note that using hardlinks with the *arrs doesn’t work with this setup. For hardlinking to work, the torrent client and *arrs must share the same dataset and jail mount points.
Goals# The diagram above translates to the following requirements:
Each service lives inside a separate jail Each service inside the jail runs as a different user Each jail owns a dataset for configuration data Jails share media datasets, but only one user has write permissions. E.g., Radarr can only read (ro) from the torrent dataset but write (rw) to the movies dataset. Groups# Navigate to Accounts → Groups and add the following groups.
GID 850Name qbittorrentSamba Authentication unchecked
GID 354Name jackettSamba Authentication unchecked
GID 356Name lidarrSamba Authentication unchecked
GID 352Name radarrSamba Authentication unchecked
GID 351Name sonarrSamba Authentication unchecked
GID 972Name plexSamba Authentication unchecked
Users# Navigate to Accounts → Users and add the following users.
Full Name qBittorrentUsername qbittorrentUser ID 850New Primary Group uncheckedPrimary Group qbittorrentPrimary Group qbittorrentDisable Password YesShell nologinSamba Authentication unchecked
Full Name JackettUsername jackettUser ID 354New Primary Group uncheckedPrimary Group jackettDisable Password YesShell nologinSamba Authentication unchecked
Full Name LidarrUsername lidarrUser ID 356New Primary Group uncheckedPrimary Group lidarrDisable Password YesShell nologinSamba Authentication unchecked
Full Name RadarrUsername radarrUser ID 352New Primary Group uncheckedPrimary Group radarrDisable Password YesShell nologinSamba Authentication unchecked
Full Name SonarrUsername sonarrUser ID 351New Primary Group uncheckedPrimary Group sonarrDisable Password YesShell nologinSamba Authentication unchecked
Full Name PlexUsername plexUser ID 972New Primary Group uncheckedPrimary Group plexDisable Password YesShell nologinSamba Authentication unchecked
Datasets# Navigate to Storage → Pools and add the datasets and permissions. We’ll use default 755 permissions for all datasets.
Jail Config Datasets# Path /mnt/vault0/apps/qbittorrentUser qbittorrentApply User checkedGroup qbittorrentApply Group checked
Path /mnt/vault0/apps/jackettUser jackettApply User checkedGroup jackettApply Group checked
Path /mnt/vault0/apps/lidarrUser lidarrApply User checkedGroup lidarrApply Group checked
Path /mnt/vault0/apps/radarrUser radarrApply User checkedGroup radarrApply Group checked
Path /mnt/vault0/apps/sonarrUser sonarrApply User checkedGroup sonarrApply Group checked
Path /mnt/vault0/apps/plexUser plexApply User checkedGroup plexApply Group checked
Path /mnt/vault0/media/torrentsUser qbittorrentApply User checkedGroup qbittorrentApply Group checked
Path /mnt/vault0/media/musicUser lidarrApply User checkedGroup lidarrApply Group checked
Path /mnt/vault0/media/moviesUser radarrApply User checkedGroup radarrApply Group checked
Path /mnt/vault0/media/seriesUser sonarrApply User checkedGroup sonarrApply Group checked
Jails# Connect to TrueNAS via SSH or similar.
qBittorrent Jail# # Create jail
iocage create --name qbittorrent --release 12.2-RELEASE dhcp= 1 boot= 1
# Mount jail config dataset
iocage exec qbittorrent mkdir /mnt/config
iocage fstab --add qbittorrent /mnt/vault0/apps/qbittorrent /mnt/config nullfs rw 0 0
# Mount media dataset
iocage exec qbittorrent mkdir /mnt/torrents
iocage fstab --add qbittorrent /mnt/vault0/media/torrents /mnt/torrents nullfs rw 0 0
# Update packages
iocage exec qbittorrent "pkg update && pkg upgrade"
# Install qBittorrent without GUI
iocage exec qbittorrent pkg install qbittorrent-nox
# Enable qBittorrent service
iocage exec qbittorrent sysrc qbittorrent_enable= YES
# Configure config directory
iocage exec qbittorrent sysrc qbittorrent_conf_dir= /mnt/config
# Start the service
iocage exec qbittorrent service qbittorrent start
Navigate to http://<jail IP>:8080 in your browser and login with the default credentials.
Username Password adminadminadmin
Navigate to Tools → Options... and change the Default Save Path to /mnt/torrents:
Jackett Jail# # Create jail
iocage create --name jackett --release 12.2-RELEASE dhcp= 1 boot= 1
# Mount jail config dataset
iocage exec jackett mkdir /mnt/config
iocage fstab --add jackett /mnt/vault0/apps/jackett /mnt/config nullfs rw 0 0
# Change pkg repository set from `quarterly` to `latest`
# At the time of this writing, `jackett` from the quarterly repo wasn't working
iocage exec jackett sed -i '' 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf
# Update packages
iocage exec jackett "pkg update && pkg upgrade"
# Install
iocage exec jackett pkg install jackett
# Enable service
iocage exec jackett sysrc jackett_enable= YES
# Configure config directory
iocage exec jackett sysrc jackett_data_dir= /mnt/config
# Start the service
iocage exec jackett service jackett start
Navigate to http://<jail IP>:9117 in your browser to use Jackett.
Lidarr Jail# # Create jail
iocage create --name lidarr --release 12.2-RELEASE dhcp= 1 boot= 1
# Mount jail config dataset
iocage exec lidarr mkdir /mnt/config
iocage fstab --add lidarr /mnt/vault0/apps/lidarr /mnt/config nullfs rw 0 0
# Mount media datasets
iocage exec lidarr mkdir /mnt/music
iocage fstab --add lidarr /mnt/vault0/media/music /mnt/music nullfs rw 0 0
iocage exec lidarr mkdir /mnt/torrents
iocage fstab --add lidarr /mnt/vault0/media/torrents /mnt/torrents nullfs ro 0 0
# Change pkg repository set from `quarterly` to `latest`
iocage exec lidarr sed -i '' 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf
# Update packages
iocage exec lidarr "pkg update && pkg upgrade"
# Install
iocage exec lidarr pkg install lidarr
# Enable service
iocage exec lidarr sysrc lidarr_enable= YES
# Configure config directory
iocage exec lidarr sysrc lidarr_data_dir= /mnt/config
# Start the service
iocage exec lidarr service lidarr start
Navigate to http://<jail IP>:8686 in your browser to use Lidarr.
Radarr Jail# # Create jail
iocage create --name radarr --release 12.2-RELEASE dhcp= 1 boot= 1 allow_mlock= 1
# Mount jail config dataset
iocage exec radarr mkdir /mnt/config
iocage fstab --add radarr /mnt/vault0/apps/radarr /mnt/config nullfs rw 0 0
# Mount media datasets
iocage exec radarr mkdir /mnt/movies
iocage fstab --add radarr /mnt/vault0/media/movies /mnt/movies nullfs rw 0 0
iocage exec radarr mkdir /mnt/torrents
iocage fstab --add radarr /mnt/vault0/media/torrents /mnt/torrents nullfs ro 0 0
# Change pkg repository set from `quarterly` to `latest`
iocage exec radarr sed -i '' 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf
# Update packages
iocage exec radarr "pkg update && pkg upgrade"
# Install
iocage exec radarr pkg install radarr
# Enable service
iocage exec radarr sysrc radarr_enable= YES
# Configure config directory
iocage exec radarr sysrc radarr_data_dir= /mnt/config
# Start the service
iocage exec radarr service radarr start
Navigate to http://<jail IP>:7878 in your browser to use Radarr.
Sonarr Jail# # Create jail
iocage create --name sonarr --release 12.2-RELEASE dhcp= 1 boot= 1
# Mount jail config dataset
iocage exec sonarr mkdir /mnt/config
iocage fstab --add sonarr /mnt/vault0/apps/sonarr /mnt/config nullfs rw 0 0
# Mount media datasets
iocage exec sonarr mkdir /mnt/series
iocage fstab --add sonarr /mnt/vault0/media/series /mnt/series nullfs rw 0 0
iocage exec sonarr mkdir /mnt/torrents
iocage fstab --add sonarr /mnt/vault0/media/torrents /mnt/torrents nullfs ro 0 0
# Change pkg repository set from `quarterly` to `latest`
iocage exec sonarr sed -i '' 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf
# Update packages
iocage exec sonarr "pkg update && pkg upgrade"
# Install
iocage exec sonarr pkg install sonarr
# Enable service
iocage exec sonarr sysrc sonarr_enable= YES
# Configure config directory
iocage exec sonarr sysrc sonarr_data_dir= /mnt/config
# Start the service
iocage exec sonarr service sonarr start
Navigate to http://<jail IP>:8989 in your browser to use Sonarr.
Plex Jail# # Create jail
iocage create --name plex --release 12.2-RELEASE dhcp= 1 boot= 1
# Mount jail config dataset
iocage exec plex mkdir /mnt/config
iocage fstab --add plex /mnt/vault0/apps/plex /mnt/config nullfs rw 0 0
# Mount media datasets
iocage exec plex mkdir /mnt/music
iocage fstab --add plex /mnt/vault0/media/music /mnt/music nullfs ro 0 0
iocage exec plex mkdir /mnt/series
iocage fstab --add plex /mnt/vault0/media/series /mnt/series nullfs ro 0 0
iocage exec plex mkdir /mnt/movies
iocage fstab --add plex /mnt/vault0/media/movies /mnt/movies nullfs ro 0 0
# Update packages
iocage exec plex "pkg update && pkg upgrade"
# Install
iocage exec plex pkg install plexmediaserver
# Enable service
iocage exec plex sysrc plexmediaserver_enable= YES
# Configure config directory
iocage exec plex sysrc plexmediaserver_support_path= /mnt/config
# Start the service
iocage exec plex service plexmediaserver start
Navigate to http://<jail IP>:32400/web in your browser to use Plex.