Skip to content

Sonarr

Sonarr integration enables lifecycle actions on TV series managed by Sonarr.

  1. Go to Settings → Integrations
  2. Under the Sonarr section, click Add Instance
  3. Enter:
    • Name: A label for this instance (e.g., “Main Sonarr”)
    • URL: Sonarr’s base URL (e.g., http://192.168.1.100:8989) — the address Librariarr uses to reach Sonarr
    • External URL (optional): The address your browser uses for Sonarr, starting with http:// or https://. Used for “open in Sonarr” links; falls back to URL when empty
    • API Key: Found in Sonarr → Settings → General → API Key
  4. Click Test to verify — Save stays disabled until the test passes
  5. Save

You can add multiple Sonarr instances. A rule set reads its Sonarr criteria from the instance its action is linked to (see lifecycle rules).

Deleting an instance cancels the pending lifecycle actions bound to it and detaches it from every rule set that used it; those rule sets’ actions are turned off until you pick another instance.

Librariarr matches series to Sonarr using TVDB IDs:

  1. During media sync, the series’ external IDs (including TVDB) are fetched from your media server and stored on every episode
  2. When lifecycle rules or lookups need Sonarr data, Librariarr looks the series up in Sonarr by TVDB ID
  3. There is no title fallback: a series without a TVDB ID is never found in Sonarr, and an action on it fails. Before acting, Librariarr also checks that the Sonarr series’ title matches, so a wrong ID never acts on a different show

Once connected, Librariarr can perform these operations via lifecycle rules:

Operation Description
Delete from Sonarr Remove the series from Sonarr and delete its files from disk
Unmonitor & Delete Files Unmonitor the series and delete the matched episodes’ files
Monitor & Delete Files Make sure the series is monitored, delete the matched episodes’ files, then re-monitor those episodes so Sonarr grabs new copies
Delete Files Only Delete the matched episodes’ files without changing monitoring
Unmonitor Only Stop Sonarr from monitoring the series
Change Quality Profile Move the series to another quality profile (skipped if it is already on it)
Search for New Copy Trigger a Sonarr search, changing nothing else
Do Nothing Only track the match (and apply tag changes, if configured)

The file deletes act only on the matched episodes — see which files a file delete removes. Every action except Delete from Sonarr (which removes the record and its tags) can also add and remove Sonarr tags, applied before the main action. Delete from Sonarr can also add an import list exclusion so import lists don’t add it back, and the file-delete and quality-profile actions can search after the change. When a destructive action is linked to an instance with no recycle bin configured, the rule editor warns you before saving. See Available Actions.

The following Sonarr metadata is available for lifecycle rule conditions:

  • Found in Arr, Monitored, Tag, Quality Profile, Status, Ended, Series Type
  • Rating (Sonarr’s single series rating), Original Language, Size on Disk, Path, First Aired, Date Added
  • Season Count, Episode Count, Has Unaired, Monitored Seasons, Monitored Episodes (specials are left out of every count)
  • API keys are stored securely in the database and never sent to the frontend
  • Connection testing uses a secure server-side endpoint — your API key is never sent to the browser
  • All API responses containing integration data are sanitized to mask sensitive fields
  • Matching requires TVDB IDs — series without one are not found in Sonarr
  • Lifecycle actions call Sonarr’s API in real time. Requests time out after 15 seconds; reads are retried up to 3 times, writes are not. If Sonarr is unreachable during a scheduled run, its remaining actions stay pending for the next run; a manual Execute fails them