Sonarr (formerly NzbDrone) is a web application written in C# that automatically downloads TV shows from both Usenet and torrents. It can be executed under both Windows and Linux using the mono framework.

Installation[edit | edit source]

I recommend running Sonarr inside Docker.

Docker[edit | edit source]

The Docker image can be built from my Dockerfile or pulled from

Using docker-compose, I use the following deployment. The downloads volume was for Drone Factory which is now deprecated.

    container_name: sonarr
      - backend
      - traefik
      - sabnzbd
      - /var/volumes/sonarr-config:/config
      - downloads:/downloads
      - TV:/TV
    restart: always
      - "8989"
      - "traefik.enable=true"
      - "traefik.port=8989"
      - ""
      - ""
      - "traefik.frontend.redirect.entryPoint=https"
      - "traefik.frontend.auth.forward.address=http://auth/index.php"

CentOS 7[edit | edit source]

Installation under CentOS 7 is relatively straight forward. You must use a more recent version of mono than the one packaged with CentOS 7 which is another 3rd party repository needs to be used.

Use the setup script below as a guide.


rpm -ivh
curl -L -o /etc/yum.repos.d/mono.repo

# yum install gcc-c++ gcc mediainfo libzen libmediainfo curl gettext
yum install sqlite mediainfo libzen libmediainfo curl gettext mono-opt mono-opt-devel

groupadd -r -g 250 downloaders
adduser -M -d /usr/local/sonarr -r -u 252 -g 250 sonarr

mkdir /usr/local/sonarr
chown sonarr:downloaders /usr/local/sonarr

# Download the master release
wget -O /tmp/nzbdrone.tar.gz
su - sonarr -c "tar -xzf /tmp/nzbdrone.tar.gz -C /tmp; mv /tmp/NzbDrone/* /usr/local/sonarr"

# Or clone from github.
# su - sonarr -c "git clone /usr/local/sonarr"

Sonaar can be started using a systemd startup script by executing:

# screen -S sonarr -dm su - sonarr -c " /opt/mono/bin/mono NzbDrone.exe -nobrowser -data /home/sonaar/"
Tip: Serve Sonaar on its own domain
You may wish to serve Sonaar on its own domain such as By default, Sonaar will listen on port 8989. You may either change the listen IP and port or use IPTables to forward port 80 to 8989:

iptables -A PREROUTING -t nat -i eno16777736 -p tcp -d --dport 80 -j REDIRECT --to-port 8989

See Also[edit | edit source]