How to install Sonarr v4 on TrueNAS Core 13.2

Most people trying to install Sonarr v4 on TrueNAS will find the server never starts up. The TrueNAS Core Jails versions 13.3 and above simply don’t work with Sonarr, it works on 13.2 however, the release has been archived.

Here’s how to get a new Sonnar v4 iocage Jail up and running on TrueNAS Core

Note: Change all occurrences of media2 to sonarr if you want to use the normal sonarr user. And change the group ID if you need a different one. It will depend how you’ve setup your other jails/storage.

iocage fetch --root-dir /pub/FreeBSD-Archive/old-releases/amd64/ --server ftp-archive.freebsd.org
echo '{"pkgs":["sonarr"]}' > /tmp/pkg.json
iocage create -n "sonarr4" -p /tmp/pkg.json -r 13.2-RELEASE dhcp="on" vnet="on" allow_raw_sockets="1" allow_mlock=1 boot="on" bpf="yes"
rm /tmp/pkg.json
iocage exec sonarr4 mkdir -p /config
iocage exec sonarr4 "pw useradd -n media2 -u 816 -d /nonexistent -s /usr/sbin/nologin"
iocage exec sonarr4 id media2
iocage exec sonarr4  "pw group mod wheel -m media2"
iocage exec sonarr4 chown -R media2:wheel /usr/local/share/sonarr /config
iocage exec sonarr4 chown media2:wheel /usr/local/etc/rc.d/sonarr
iocage exec sonarr4 chmod u+x /usr/local/etc/rc.d/sonarr
iocage exec sonarr4 sysrc "sonarr_enable=YES"
iocage exec sonarr4 sysrc "sonarr_user=media2"
iocage exec sonarr4 sysrc "sonarr_data_dir=/config"
iocage exec sonarr4 service sonarr start
iocage exec sonarr4 service sonarr status

Check running with PID
Browse to your http://your-ip:8989/

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.