Set up Sonarr
Sonarr watches for new episodes of your TV shows, sends downloads to SABnzbd and files the results into your library.
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/datafolders 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(runhostname -Ion the server). ReplaceSERVER-IPbelow 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 -dChange 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
- Go to Settings → Media Management.
- Under Root Folders, choose Add Root Folder and select
/data/media/tv. - Turn on Rename Episodes so files get season and episode numbers.
- Choose Save Changes.
Sonarr names and files everything the way Yarr Media expects (see Organize your media folders).
4. Connect SABnzbd
- Go to Settings → Download Clients and choose +, then SABnzbd.
- Host:
SERVER-IP(notlocalhost; each app runs in its own container). Port:8080. - API Key: SABnzbd's API key (SABnzbd → Config → General → Security).
- Category:
tv. - 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
- In Sonarr, go to Settings → General and copy the API Key.
- In Yarr Media, go to Settings → Integrations → Sonarr.
- Enter the address
http://SERVER-IP:8989and 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 -dGood 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.