Guides · Optional apps

Set up Sonarr

Sonarr watches for new episodes of your TV shows, sends downloads to SABnzbd and files the results into your library.

About 15 minutes

Before you start

  • A server with Docker: Set up a Debian or Ubuntu server and Install Docker. The Yarr Media installer already installs Docker.
  • The /srv/data folders from the server guide (/srv/data/media/… for your library and /srv/data/usenet/… for downloads).
  • The server's address on your network, for example 192.168.1.50 (run hostname -I on the server). Replace SERVER-IP below with it.

1. Start Sonarr

sudo mkdir -p /opt/sonarr && cd /opt/sonarr
sudo tee compose.yaml > /dev/null <<'EOF'
services:
  sonarr:
    image: lscr.io/linuxserver/sonarr:latest
    container_name: sonarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Chicago
    volumes:
      - ./config:/config
      - /srv/data:/data
    ports:
      - 8989:8989
    restart: unless-stopped
EOF
sudo docker compose up -d

Change PUID/PGID to your own numbers (run id; usually 1000) and TZ to your time zone (run timedatectl show -p Timezone --value). The /srv/data:/data line gives the app the same folders as the other apps, so finished downloads are moved into your library instantly instead of copied.

2. Open Sonarr and protect it

Open http://SERVER-IP:8989 in a browser. The first time, Sonarr asks you to choose how to sign in: pick Forms (Login Page), set a username and password, and save. You can choose Disabled for Local Addresses if you only use it at home.

3. Set the library folder

  1. Go to Settings → Media Management.
  2. Under Root Folders, choose Add Root Folder and select /data/media/tv.
  3. Turn on Rename Episodes so files get season and episode numbers.
  4. Choose Save Changes.

Sonarr names and files everything the way Yarr Media expects (see Organize your media folders).

4. Connect SABnzbd

  1. Go to Settings → Download Clients and choose +, then SABnzbd.
  2. Host: SERVER-IP (not localhost; each app runs in its own container). Port: 8080.
  3. API Key: SABnzbd's API key (SABnzbd → Config → General → Security).
  4. Category: tv.
  5. Choose Test, then Save.

No SABnzbd yet? See Set up SABnzbd.

5. Add indexers

Indexers are how Sonarr searches. The easiest way to manage them is Prowlarr: add your indexers there once and it fills them in for Sonarr automatically.

6. Connect Sonarr to Yarr Media

  1. In Sonarr, go to Settings → General and copy the API Key.
  2. In Yarr Media, go to Settings → Integrations → Sonarr.
  3. Enter the address http://SERVER-IP:8989 and paste the API key, then choose Connect Sonarr.

Yarr Media can now use Sonarr for TV show details and send new titles to it. When a download finishes, Sonarr moves it into /data/media/tv and it appears in your Yarr library at the next scan.

Updating

The image is updated by pulling the new version and recreating the container. Your settings in /opt/sonarr/config are kept.

cd /opt/sonarr && sudo docker compose pull && sudo docker compose up -d

Good to know

Only download media you have the rights to. Yarr Media plays files from your own folders and does not supply movies, shows or music.