# 01-sonarr.md

kstack:
  book: Centerpoint Home Lab
  chapter: Media Management
  page: Sonarr
  tags: [sonarr, tv, arr, media-management]
---

## Overview

Sonarr monitors RSS feeds and indexers (via Prowlarr) for new TV show episodes,
automatically searches for and downloads them via NZBGet, then renames and
organises the files into the media library on UnRAID.

## Access

| Type      | URL                                    | Notes                                           |
|-----------|----------------------------------------|-------------------------------------------------|
| Internal  | `https://sonarr.home.local`            | LAN access via Step-CA TLS                      |
| External  | `https://sonarr.jeeves5454.ddns.net`   | Authentik SSO + GeoBlock + CrowdSec             |

## Configuration

**Image:** `lscr.io/linuxserver/sonarr:latest`
**Compose project:** `arr` stack (managed via Portainer)

### Traefik Labels

```yaml
# External route
traefik.http.routers.sonarr-external.rule: Host(`sonarr.jeeves5454.ddns.net`)
traefik.http.routers.sonarr-external.entrypoints: websecure
traefik.http.routers.sonarr-external.tls.certresolver: letsencrypt
traefik.http.routers.sonarr-external.middlewares: authentik-auth@docker,plex-geoblock@file,crowdsec-bouncer@file
traefik.http.routers.sonarr-external.service: sonarr-svc

# Internal route
traefik.http.routers.sonarr-internal.rule: Host(`sonarr.home.local`)
traefik.http.routers.sonarr-internal.entrypoints: websecure
traefik.http.routers.sonarr-internal.tls.certresolver: step-ca
traefik.http.routers.sonarr-internal.service: sonarr-svc

traefik.http.services.sonarr-svc.loadbalancer.server.port: 8989
```

## Volumes / Bind Mounts

| Host Path                              | Container Path  | Purpose                                      |
|----------------------------------------|-----------------|----------------------------------------------|
| `/home/jeeves/docker/arr/Sonarr/config`| `/config`       | Sonarr database, settings, and series index  |
| `/media/jeeves/1TB_Vol2/downloads`     | `/downloads`    | NZBGet download staging (Ceph OSD)           |
| `/mnt/Multimedia`                      | `/media`        | Final media library (NFS from UnRAID)        |

Both `/downloads` and `/media` must be in the same container path namespace so
Sonarr can hardlink completed downloads rather than copy them — essential for
atomic moves between the download staging area and the media library.

## Integration Points

| Service     | Connection Method                         | Purpose                     |
|-------------|-------------------------------------------|-----------------------------|
| Prowlarr    | API (`http://prowlarr:9696`) via `media-network` | Indexer search       |
| NZBGet      | API (`http://nzbget:6789`) via `media-network`   | Download client      |
| Bazarr      | API (Bazarr polls Sonarr)                 | Subtitle fetching           |
| Pulsarr     | Sonarr webhook / API                      | Watchlist sync              |
| Seerr       | API                                       | Receives show requests      |

## Notes / Gotchas

- Sonarr's root folder for TV series must point to `/media/TV` (or equivalent)
  inside the container, which maps to `/mnt/Multimedia/TV` on the host via NFS.
- Quality profiles are managed centrally via Profilarr and pushed to Sonarr via
  its API — do not manually edit quality profiles in Sonarr if Profilarr is active.
- API key is stored in `/config/config.xml` — required to configure Prowlarr,
  Bazarr, Seerr, and Pulsarr integrations.

---
*Last Updated: 2026-06-16*