Sonarr Homelab Setup Guide: Install, Update, Optimize, and Connect to Tdarr
Sonarr is one of those homelab tools that looks simple at first: add a series, choose a quality profile, point it at a download client, and let it work. The part that separates a clean media automation stack from a messy one is everything around that simple loop: paths, permissions, quality rules, indexer behavior, download categories, list imports, Plex visibility, and what happens after Tdarr replaces a file.
This guide is written for a practical Plex homelab where Sonarr manages TV, Radarr manages movies, SABnzbd or another download client handles the download work, Prowlarr manages indexers, and Tdarr performs post-import transcoding. The goal is not just to install Sonarr. The goal is to build a TV automation workflow that stays understandable, keeps metadata current, prefers efficient releases going forward, and still gives Tdarr room to standardize files after import.
Rights and lawful use: This Sonarr workflow is limited to monitoring and organizing television media that you own or are authorized to use. Indexer, download-client, naming, import, and Tdarr automation do not grant permission to acquire or process copyrighted programs; configure those connections only for lawful sources and libraries.
Before You Start: Safe Defaults
- Use Sonarr only with media and services you are allowed to use.
- Create a shared
mediagroup and useUMASK=002so imports, renames, and Tdarr replacements do not break permissions. - Keep config directories persistent and backed up before changing install method, profiles, lists, or paths.
- Keep admin ports private until authentication, reverse proxy rules, VPN, or access lists are in place.
- Test one item end to end before enabling broad automation.
Where Sonarr Fits
In a well-behaved stack, Sonarr should not be a random downloader with a pretty interface. It should be the TV authority. It knows which series exist in your library, which episodes are monitored, which quality profile each series uses, which files are already imported, and whether an episode still qualifies for an upgrade.
- Prowlarr keeps indexers synchronized into Sonarr.
- Sonarr decides whether an episode should be grabbed, upgraded, ignored, imported, renamed, or rescanned.
- SABnzbd or another download client downloads into a dedicated download path, not the TV library folder.
- Plex serves the final organized TV library.
- Tdarr works after import to normalize codec, audio, subtitle, and size policy.
The key is ownership. Sonarr owns TV organization and episode state. Tdarr owns post-processing and transcode policy. Plex owns playback and library presentation. If you blur those responsibilities, you end up with duplicate files, stale MediaInfo, constant re-downloads, and a queue full of avoidable failures.
The important handoff is from completed download staging into Sonarr’s final TV root folder.
1. WantedEpisode State
Monitoring, season rules, quality profile, language, and custom formats decide what is wanted.
2. SearchCandidate Results
Sonarr searches synced sources and rejects candidates that do not meet rules.
3. DownloadSAB tv Category
Accepted releases go to the TV category and complete outside the final Plex library root.
4. ImportTV Root Folder
Sonarr imports, renames, tracks the episode file, and updates its database.
5. OptimizeTdarr Later
Tdarr can optimize after import, then Sonarr should rescan to keep MediaInfo current.
Install Strategy
For most homelabs, Docker Compose is the easiest way to run Sonarr because it makes the install repeatable and puts config, paths, and environment variables in one file. Native Ubuntu installs are still perfectly valid, especially if you already run the rest of the stack directly under systemd. The important part is consistency: the user, group, paths, and permissions must line up with your download client, Plex, Radarr, and Tdarr.
Docker Compose Example
Before creating this Sonarr service, make the host account and shared media group explicit. Replace PUID=1000 and PGID=1001 with the output of id -u mediauser and the actual media group query shown below. Sonarr, SABnzbd, Radarr, Plex, and Tdarr must interpret ownership consistently across /data; UMASK=002 then permits intended group collaboration without falling back to broad world-writable permissions.
sudo groupadd -f media
id -u mediauser
getent group media | cut -d: -f3
sudo mkdir -p /opt/media-stack
cd /opt/media-stack
cat > .env <<'EOF'
PUID=1000
PGID=1001
TZ=America/Chicago
UMASK=002
EOF
Production Docker note: Once the Sonarr test container can search, import, rename, and rescan one authorized episode through the shared /data mount, replace lscr.io/linuxserver/sonarr:latest with the exact tested release tag or digest. Back up /opt/media-stack/sonarr/config and the environment and Compose definitions together, then review Sonarr release notes before changing that pin so the application database and container version can be recovered as a known pair.
This example uses the single-path pattern recommended by the Servarr Docker guidance: expose one shared /data path to the media tools so they agree on where downloads and libraries live. The UI port is bound to localhost by default; expose it through VPN, reverse proxy, or a deliberate LAN binding only after authentication is configured.
services:
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
env_file: .env
volumes:
- /opt/media-stack/sonarr/config:/config
- /data:/data
ports:
- "127.0.0.1:8989:8989"
networks:
- media
restart: unless-stopped
networks:
media:
name: media
driver: bridge
If you want Sonarr reachable from other machines on your LAN, change the port binding intentionally after setting Sonarr authentication. Do not copy a public 8989:8989 binding onto an internet-facing host without another access layer.
Native Ubuntu Install
Sonarr provides an official Linux installer script. Treat any remote installer script like infrastructure code: download it, skim it, then run it. During setup, use a dedicated service user and the shared media group so imports and renames work consistently.
sudo apt update
sudo apt install -y curl sqlite3 mediainfo acl
sudo groupadd -f media
installer_base="https://raw.githubusercontent.com/Sonarr/Sonarr"
installer_path="develop/distribution/debian/install.sh"
installer_url="$installer_base/$installer_path"
curl -fsSLo /tmp/install-sonarr.sh "$installer_url"
less /tmp/install-sonarr.sh
sudo bash /tmp/install-sonarr.sh
sudo usermod -aG media sonarr
sudo systemctl restart sonarr
sudo systemctl status sonarr --no-pager
sudo journalctl -u sonarr --since "10 minutes ago" --no-pager
ss -ltnp | grep ':8989' || true
If your installer prompts for a user or group, choose sonarr and media. If you use a different service account, document it in your restore notes and make sure SABnzbd, Plex, Radarr, and Tdarr can read or write the same paths as needed.
Updates and Backups
Before updating Sonarr, make sure you know where the config lives. For Docker, that is the host folder mapped to /config. For native Ubuntu, it is commonly /var/lib/sonarr. That directory contains the database, settings, quality profiles, indexer settings, download clients, tags, history, and API key. It is the rebuild-critical part.
# Docker Compose update
cd /opt/media-stack
docker compose pull sonarr
docker compose up -d sonarr
docker compose logs --tail=100 sonarr
# Native service checks
sudo systemctl status sonarr
sudo journalctl -u sonarr --since "30 minutes ago"
Do not rely only on the built-in Sonarr backup list. Let Sonarr create its scheduled backups, but also copy the application data folder to separate storage such as a NAS. The backup target should include the Sonarr config directory and a small restore note that records the installed method, service user, paths, and compose file or systemd unit.
Path Planning
Most Sonarr pain comes from path planning. Sonarr's root folder is the final organized TV library. It is not the incomplete download folder, the completed download folder, or a temporary unpack folder. The download client writes to the download area. Sonarr imports from that area into the media library. Plex and Tdarr then see the organized library.
/data
/downloads
/usenet
/tv
/movies
/torrents
/tv
/movies
/media
/tv
/movies
- Sonarr root folder:
/data/media/tv - SABnzbd TV category folder:
/data/downloads/usenet/tv - Plex TV library:
/data/media/tv - Tdarr TV library path:
/data/media/tv
If you run components on different machines, the path still needs to resolve consistently from each application's point of view. Remote path mappings are a workaround for truly different paths, but they should not be the default answer for a Docker stack on one host. Consistent paths are cleaner.
Permissions That Stay Fixed
Pick a permission model and make every media component follow it. In a shared media stack, the most practical model is usually a shared group such as media, writable group permissions, and a UMASK of 002. That gives new folders 775 permissions and new files 664 permissions, which lets Sonarr, Radarr, Plex, SABnzbd, and Tdarr cooperate without every file becoming a permissions puzzle.
sudo groupadd -f media
sudo usermod -aG media sonarr
sudo usermod -aG media sabnzbd
sudo usermod -aG media plex
sudo usermod -aG media tdarr
sudo chgrp -R media /data
sudo chmod -R g+rwX /data
For Docker, set PUID, PGID, and UMASK consistently across containers. For native services, verify the User= and Group= in systemd. If the service user can read but not write, Sonarr may show series correctly while imports, deletes, upgrades, and renames quietly fail.
Initial Sonarr Configuration
Media Management
- Enable advanced settings.
- Enable rename episodes so files remain understandable outside Sonarr.
- Use a consistent naming scheme that includes series title, season/episode number, episode title, quality, and release group where possible.
- Enable completed download handling.
- Enable hardlinks when your storage layout supports them.
- Import extra files only when useful, typically subtitles such as
.srt. - Set propers and repacks to
Do Not Preferif you use custom format scoring for repack/proper behavior.
Good naming matters because custom formats often rely on release names and filenames after import. If you strip too much information from the final filename, Sonarr may have less evidence later when deciding whether a file is still desirable.
Root Folders
Add the final TV root folder only. Do not add a download folder as a root folder. Do not add incomplete or completed SAB folders. Do not add temporary Tdarr cache folders. If you have multiple TV roots, name and document them intentionally, such as TV, Kids TV, or Anime. Each root should map to a real Plex library decision.
Quality Profiles
Quality profiles decide what Sonarr is allowed to grab and when it should stop upgrading. For a balanced Plex homelab that later uses Tdarr, a practical TV profile usually prefers high-quality WEB releases, avoids low-quality encodes, and does not chase huge files forever just because they are technically higher in the quality list.
- Daily or standard TV: allow WEB 1080p and Bluray 1080p, with WEB 1080p often good enough.
- Prestige or favorite shows: allow Bluray 1080p and better WEB sources, with a higher custom format cutoff.
- 4K TV: use a separate profile and root if you actually want 4K TV. Do not mix it into a normal 1080p profile by accident.
- Anime: use a separate profile because release groups, absolute numbering, subtitles, and dual audio expectations can differ.
If your end state is HEVC/H.265 10-bit, do not make Sonarr redownload everything forever trying to solve a problem Tdarr can solve after import. Use Sonarr to prefer better source releases going forward. Use Tdarr to normalize the file after it lands.
Custom Formats
Custom formats are where Sonarr gets smarter. They can reward releases you want, penalize releases you dislike, and reject releases that should never be grabbed. Sonarr applies custom format scoring through quality profiles. A minimum score blocks bad releases. An upgrade-until score tells Sonarr when custom format quality is good enough.
For a Plex plus Tdarr setup, I would use custom formats this way:
- Prefer English audio when that is the intended library language.
- Reward reliable WEB sources and known good release patterns.
- Reward x265/HEVC 10-bit modestly for new grabs, but do not let that preference beat obviously bad quality.
- Reject or heavily penalize low-quality, upscaled, cam, telesync, hardcoded subtitle, and unwanted language releases.
- Use repack/proper custom formats instead of blindly preferring every proper release.
- Handle Dolby Vision carefully if your playback devices do not support it.
The TRaSH Guides are the best starting point here because they maintain practical custom format collections, quality profiles, naming guidance, and sync tooling. The important warning is that custom formats do not change what Sonarr searches for. They change how search results are evaluated. That means your indexers, categories, and allowed qualities still matter.
Indexers Through Prowlarr
For most stacks, Prowlarr should manage indexers and sync them into Sonarr. That gives you one place to test indexers, update categories, manage API limits, and keep Radarr and Sonarr consistent. In Sonarr, each indexer should support the right TV categories, RSS sync, automatic search, and interactive search where appropriate.
- Use TV-specific categories, not broad catch-all categories.
- Keep RSS sync enabled for indexers you trust.
- Keep automatic search enabled only when the indexer is reliable.
- Use interactive search for troubleshooting and quality tuning.
- Avoid all-in-one aggregate endpoints that hide indexer-specific behavior.
Download Client Setup
Sonarr talks to your download client through the client's API. It does not need to watch the completed folder directly. It sends a grab with a category, watches downloads in that category, and imports when the client reports the job is complete and ready.
- Use a dedicated Sonarr category such as
tv. - Point that category to the TV download folder, not the TV media library.
- Keep completed download handling enabled in Sonarr.
- Keep download history long enough for Sonarr to see and import completed jobs.
- Do not let SABnzbd sorting move files into the Sonarr root folder.
- Do not mix movie and TV categories.
For Usenet, local incomplete downloads are usually best for performance, especially if your final library is on NAS storage. Let SAB assemble and repair locally, then let Sonarr import to the media root. That keeps partial files and heavy unpack work away from your final library.
Monitoring Strategy
Monitoring is not one setting. It is a policy. A new series can be monitored by all episodes, future episodes, missing episodes, first season only, latest season only, or none. The right choice depends on whether you are adding an old finished show, a current show, or a list-imported show you are only evaluating.
- Current shows: monitor future episodes or missing plus future episodes.
- Finished shows you really want: monitor all episodes and run a controlled search.
- List-imported shows: start conservative. Monitor future or none until you trust the list.
- Kids or family shows: use a dedicated root folder and profile if retention, language, or quality expectations differ.
- Anime: separate profile, separate tags, and often separate indexer rules.
Avoid pressing a giant search-all button unless you understand the scale. Sonarr can generate a lot of API calls and queue activity very quickly, and indexers may rate-limit or block you if you flood them.
Import Lists Without Creating Chaos
Sonarr supports import lists, but TV lists need more caution than movie lists. A movie list adds one item per movie. A TV list can add a series with hundreds of episodes, multiple seasons, specials, alternate episode ordering, and language or anime complications. A bad Sonarr list can fill your wanted queue fast.
- Physically review the list before enabling automatic add.
- Use list tags such as
list-trakt,list-kids-tv, orlist-watchlist. - Use a conservative monitoring option for list imports.
- Do not enable search on add until you trust the list.
- Keep clean-library actions disabled unless you are intentionally building a list-owned library.
- Use separate root folders for categories that should land in different Plex libraries.
The safest pattern is to let lists suggest shows, tag them clearly, and review what they add. Once a list proves itself, you can enable search on add for that list only. That is much better than treating every public list as a trusted acquisition policy.
Tie-In With Tdarr
The companion Tdarr post covers a production-style GPU transcoding flow that standardizes files to HEVC/H.265 10-bit, removes unwanted tracks, keeps English subtitles, validates output, refreshes Plex, and asks Radarr or Sonarr to rescan after replacement. You can read it here: Building a Production-Grade Tdarr GPU Transcoding Stack for a Homelab.
That rescan step matters. After Tdarr replaces an episode file, Sonarr's database may still show the old file size, codec, runtime, or MediaInfo until Sonarr refreshes the series or rescans the episode file. If you want Sonarr to make good future upgrade decisions, keep its file metadata current.
- Tdarr should wait until files settle before processing new imports.
- Tdarr should not process incomplete download folders.
- Tdarr should replace only after validating the output.
- Tdarr should notify Plex so the library reflects the changed file.
- Tdarr should call Sonarr's rescan/refresh path so MediaInfo and file size are current.
Sonarr should still prefer good releases going forward. Tdarr should not be an excuse to download terrible source files. A better rule is: Sonarr chooses a good source within your size and quality policy, then Tdarr optimizes the final file for your playback and storage goals.
Operational Checklist
- System health is clean in Sonarr.
- Sonarr, SABnzbd, Plex, and Tdarr share a compatible permission model.
- Root folders are final library folders only.
- Download client categories are separate for TV and movies.
- Completed download handling is enabled.
- Hardlinks or atomic moves work where storage supports them.
- Quality profiles have realistic cutoffs.
- Custom formats reject bad releases and reward preferred releases.
- Lists are tagged and reviewed before search on add is enabled.
- Backups are stored off-box or on NAS storage.
- Tdarr refreshes Plex and Sonarr after replacing files.
Troubleshooting
Downloads Finish But Do Not Import
Check the category, completed download handling, download client history retention, and whether Sonarr can see the path reported by the download client. If the download client reports /downloads/tv/show but Sonarr only has /data/downloads/tv, Sonarr cannot import without a matching path or remote path mapping.
Files Import But Plex Does Not Update
Sonarr can notify Plex through Connect settings, and Plex can also scan automatically. In a Tdarr workflow, let Tdarr call Plex after replacement as well, because the file changed after Sonarr's original import event.
Sonarr Keeps Re-Downloading Episodes
Review quality cutoff, custom format upgrade score, file naming, and whether Tdarr is changing filenames or stripping evidence Sonarr uses for custom format matching. Also confirm Sonarr rescans after Tdarr replaces the file.
Permission Errors Keep Coming Back
Fix the service user, group, and umask at the source. A one-time chmod may clean up today's files, but tomorrow's imports will break again if the download client creates files with the wrong owner or restrictive permissions.
Final Recommended Baseline
- Run Sonarr through Docker Compose or a clean systemd install.
- Use a shared
/datalayout across Sonarr, download clients, Plex, Radarr, and Tdarr. - Keep downloads and library roots separate.
- Use Prowlarr for indexer sync.
- Use custom formats and quality cutoffs to prefer efficient, high-quality releases.
- Let Tdarr handle final HEVC/H.265 10-bit standardization after import.
- Refresh Plex and Sonarr after Tdarr replaces files.
- Back up Sonarr config to NAS or another system.
That gives you a TV automation setup that is repeatable, recoverable, and realistic. Sonarr gets to be good at TV. Tdarr gets to be good at post-processing. Plex gets a clean library. And you get fewer mystery failures when something updates, moves, or gets replaced.
Validation and Evidence Limits
This guide is documentation-backed; TechGeeks did not deploy the example paths, profiles, containers, indexers, or Tdarr callbacks for this revision. Validate one authorized episode from search through download, import, Plex playback, Tdarr replacement, and Sonarr rescan. Record versions, paths, owners, permissions, quality and custom-format decisions, import history, and health events so the result is reproducible.
A successful import does not prove that every series type, season pack, subtitle, remote path, or future update will work. A clean Sonarr health page does not prove that Plex can play the result or that Tdarr preserves required tracks. One hardlink does not prove all mounts share a filesystem. Treat the operational checklist as acceptance criteria to perform, not as reported TechGeeks test results.
Security, Privacy, Legal, and Recovery Boundaries
- Security: keep Sonarr, download-client, and indexer administration private; restrict API keys; use least-privilege service accounts; and avoid broad writable mounts.
- Privacy: series lists, history, indexer queries, paths, hostnames, and logs can expose household interests and infrastructure. Limit access, exports, and retention.
- Legal: automate only media and services you own or are authorized to use. Sonarr and its integrations do not grant rights to acquire, copy, or share a work.
- Recovery: back up the config and database before updates or bulk profile changes, preserve the previous path map and profile export, and roll out to one series before expanding automation.
Related TechGeeks and Series Navigation
This Sonarr entry covers the television-specific handoff in the Plex, Arr, and Tdarr series: Prowlarr supplies indexers, the download client reports completion, Sonarr imports and records file metadata, and Tdarr later returns a validated replacement for rescan. The linked storage, profile, proxy, backup, and monitoring articles expand each boundary, while the series wrap-up assembles them into one recovery-aware workflow.
- Plex Homelab Architecture: Storage, GPU Transcoding, and Library Design
- Media Server Storage Design: NAS, CIFS/NFS Mounts, Permissions, and Local Cache
- Prowlarr Setup Guide: Clean Indexer Management for Sonarr and Radarr
- Sonarr Homelab Setup Guide: Install, Update, Optimize, and Connect to Tdarr
- Radarr Homelab Setup Guide: Install, Update, Optimize, Lists, and Tdarr Integration
- SABnzbd Performance Tuning for a Homelab Media Server
- Plex + Tdarr GPU Strategy: Sharing NVIDIA GPUs Without Hurting Playback
- Reverse Proxy for Media Apps: Nginx Proxy Manager, SSL, Access Lists, and Security
- Backup and Disaster Recovery for Plex, Sonarr, Radarr, Tdarr, Prowlarr, and SABnzbd
- Radarr Import Lists That Do Not Fill Your Library With Junk
- Custom Formats and Quality Profiles Explained for Radarr and Sonarr
- Monitoring and Health Checks for a Plex and Arr Homelab
- The Complete Plex, Arr, and Tdarr Homelab Media Automation Series
Related foundation: Building a Production-Grade Tdarr GPU Transcoding Stack for a Homelab.
References
- Sonarr official site and Linux install guidance
- Servarr Sonarr Quick Start Guide
- Servarr Sonarr Settings
- Servarr Sonarr System and health checks
- Servarr Docker Guide
- TRaSH Guides for Sonarr
- Production-grade Tdarr GPU transcoding stack
Need help applying this?
Bring TechGeeks into the real environment.
If you are working through this on a live network, WordPress site, Linux server, AI workflow, or PisoWiFi deployment, send the context and we can help turn it into a practical plan.

