How to Install Sonarr on Ubuntu 24.04 — Automate Your TV Library
Sonarr turns a VPS into a personal television PVR: you add a series once, and Sonarr watches your indexers, grabs new episodes as they appear, hands them to your download client, renames everything to a clean library layout, and notifies Plex, Jellyfin, or Emby to refresh. This guide walks you through a production-ready Sonarr v4 install on Ubuntu 24.04 using the official apt.sonarr.tv repository, from the first SSH session to an Nginx-fronted HTTPS deployment.
Looking for a lean, affordable base for your media stack? The CloudCore Starter plan at EUR 7.99/month gives you enough CPU and RAM to run Sonarr, Prowlarr, qBittorrent, and a reverse proxy on the same box, with block storage available when the library grows.
Table of Contents
What is Sonarr?
Sonarr is an open-source PVR (Personal Video Recorder) for Usenet and BitTorrent users. It monitors RSS feeds from indexers, tracks which episodes of which series you have, queues missing or upgrade-eligible episodes to your download client, and organises finished downloads into your library with consistent naming. Sonarr v4 is built on .NET 6 and ships as a single daemon with an embedded web UI at port 8989.
Sonarr sits in the "Servarr" family — alongside Radarr for movies, Prowlarr for indexer management, Lidarr for music, and Readarr for books. The four tools share a common UI language, API schema, and configuration approach, which makes a full media stack feel coherent once you have installed one of them. The project's canonical documentation lives at wiki.servarr.com/sonarr and is a high-quality reference once you start tuning quality profiles and custom formats.
Typical uses include: building a legally sourced library from your own capture files or public-domain archives, automating the delivery of shows you already have distribution rights to, keeping a running backup of streaming originals you own through a platform's download feature, and bridging Usenet/torrent workflows into polished on-demand libraries served by Jellyfin or Plex.
Why Self-Host Media Automation?
Running Sonarr on your own VPS instead of juggling downloads manually delivers concrete, measurable improvements:
- Zero manual babysitting. Add a series once and Sonarr handles every future episode. No more checking an indexer every week or manually queueing each release.
- Consistent library layout. Sonarr renames files to a scheme you define (
Show Name - S01E02 - Episode Title [Bluray-1080p].mkv), so Plex, Jellyfin, and Emby match every file correctly on the first pass. - Quality upgrades. Start with a 720p grab, and when a 1080p Bluray release hits your indexer, Sonarr automatically grabs the upgrade and replaces the old file.
- One system of record. Sonarr knows what you have, what is missing, and what is monitored. No more duplicate downloads or forgotten seasons.
- Private, portable, no account. Your library metadata, your wanted list, your history — all stored in a local SQLite database you can back up or move between servers in seconds.
- Runs 24/7 on cheap infrastructure. Sonarr itself is light: roughly 200 MB RAM with a few hundred series. A VPS with 4 GB RAM comfortably runs Sonarr, Prowlarr, and a download client side by side.
- Works with any download path. Point it at a local disk, a mounted NFS share, object storage via rclone, or a block volume attached to the VPS. Your library can live anywhere Linux can see it.
Manual downloading vs. Sonarr automation
| Task | Manual workflow | Sonarr-automated workflow |
|---|---|---|
| Finding a new episode | Check 3-5 indexers, compare releases | Runs automatically on RSS sync |
| Renaming files | Rename by hand or run a script | Done on import, every time |
| Library matching in Plex/Jellyfin | Hit-or-miss, frequent mismatches | Deterministic — Plex matches 100% |
| Upgrading to higher quality | Re-download, delete old, rename | One setting, fully automated |
| Missing episodes | Manual spreadsheet tracking | Dashboard shows exactly what is missing |
| Backfilling a season | Grab each release by hand | "Search Season" and walk away |
| Scheduling RSS checks | Cron + custom glue | Built in, configurable per indexer |
Prerequisites
Before you begin, make sure you have:
- A VPS running Ubuntu 24.04 LTS with root or sudo access.
- SSH access to your server.
- A domain or subdomain (for example,
sonarr.yourdomain.com) with an A record pointing at the server — required for TLS in Step 9. - At least 2 GB RAM and 20 GB of free disk space for Sonarr itself. Media files should live on a larger, separately mounted volume.
- A download client already installed or planned — qBittorrent and SABnzbd are covered in Step 6.
Recommended Plan: CloudCore Starter>
For a single-user Sonarr + Prowlarr + qBittorrent stack, the CloudCore Starter plan is the right starting point:>
- 4 vCPU cores
- 6 GB RAM
- 100 GB NVMe SSD
- Unmetered bandwidth
- EUR 7.99/month>
Attach additional block storage for the media library as your collection grows.
Connect via SSH to get started:
ssh root@your-server-ipStep 1: Update System Packages
Update the package index and apply security patches before installing anything new.
sudo apt update && sudo apt upgrade -yInstall a few small utilities used later in the guide:
sudo apt install -y curl gnupg ca-certificates apt-transport-httpsIf the kernel was updated, reboot before continuing:
sudo rebootReconnect after a minute.
Step 2: Add the Sonarr APT Repository
Sonarr v4 ships through an official Debian/Ubuntu repository at apt.sonarr.tv. This is the method the Servarr team recommends: it keeps Sonarr on the latest stable release, pulls in the bundled .NET 6 runtime as dependencies, and integrates with normal apt upgrade flows.
A note on Mono and Sonarr v3. Older guides suggest apt install mono-runtime and running Sonarr v3 on Mono. That path is deprecated. Sonarr v4 runs on .NET 6 (shipped as part of the package) and no longer needs Mono at all. Do not install Mono for a fresh Sonarr install — it is not used.Register the Servarr signing key:
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://apt.sonarr.tv/pubkey.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/sonarr.gpgAdd the repository to the apt sources:
echo "deb [signed-by=/etc/apt/keyrings/sonarr.gpg] https://apt.sonarr.tv/ubuntu noble main" \
| sudo tee /etc/apt/sources.list.d/sonarr.listRefresh the package index so apt picks up the new repository:
sudo apt updateExpected output (abbreviated):
Get:1 https://apt.sonarr.tv/ubuntu noble InRelease [1,234 B]
Get:2 https://apt.sonarr.tv/ubuntu noble/main amd64 Packages [4,567 B]
Reading package lists... DoneStep 3: Install Sonarr v4
Create a dedicated system user for the service and a media group that your download clients and media servers can share.
sudo groupadd --system media || true
sudo useradd --system --no-create-home --gid media --home-dir /var/lib/sonarr sonarr || trueInstall the Sonarr package:
sudo apt install -y sonarrThe installer will prompt for the user and group Sonarr should run as. Enter:
- User:
sonarr - Group:
media
/var/lib/sonarr.Expected output (abbreviated):
Setting up sonarr (4.0.x.xxxx-0~noble) ...
Created symlink /etc/systemd/system/multi-user.target.wants/sonarr.service
→ /lib/systemd/system/sonarr.service.
Sonarr has been installed and is now running. Access it at http://<server-ip>:8989Confirm the installed version:
dpkg -l sonarr | tail -n 1Step 4: Verify the systemd Service
The package ships a systemd unit at /lib/systemd/system/sonarr.service that starts Sonarr under the sonarr user.
Check the service status:
sudo systemctl status sonarrExpected output:
● sonarr.service - Sonarr Daemon
Loaded: loaded (/lib/systemd/system/sonarr.service; enabled; preset: enabled)
Active: active (running) since Wed 2026-04-16 10:00:00 UTC; 30s ago
Main PID: 2345 (Sonarr)
Tasks: 24
Memory: 182.4M
CGroup: /system.slice/sonarr.service
└─2345 /usr/lib/sonarr/bin/Sonarr -nobrowser -data=/var/lib/sonarrConfirm Sonarr is listening on port 8989:
sudo ss -lntp | grep 8989Expected output:
LISTEN 0 128 :8989 :* users:(("Sonarr",pid=2345,fd=25))If you need to restart after a config change:
sudo systemctl restart sonarrView live logs:
sudo journalctl -u sonarr -fSonarr also writes a detailed log at /var/lib/sonarr/logs/sonarr.txt. For anything UI-related, that file is usually more useful than the systemd journal.
Step 5: Complete the First-Run Wizard
Sonarr does not expose itself on 0.0.0.0 by default on some installs, so the easiest way to finish first-time setup is an SSH tunnel from your workstation:
ssh -L 8989:127.0.0.1:8989 root@your-server-ipThen open http://localhost:8989 in your browser. The first-run wizard walks you through:
On the next screens you will land in the main Sonarr UI. Leave it open — the rest of the guide alternates between the shell and this UI.
Step 6: Configure Download Clients
Sonarr does not download files itself. It hands grabbed releases to a download client over that client's own API. The two most common choices are qBittorrent (for torrents) and SABnzbd (for Usenet).
Option A: qBittorrent (Torrents)
Install qBittorrent-nox (headless, web UI only):
sudo apt install -y qbittorrent-nox
sudo useradd --system --gid media --home-dir /var/lib/qbittorrent --create-home qbittorrentCreate a systemd unit:
sudo tee /etc/systemd/system/qbittorrent.service > /dev/null <<'EOF' [Unit] Description=qBittorrent-nox After=network.target[Service] Type=simple User=qbittorrent Group=media UMask=002 ExecStart=/usr/bin/qbittorrent-nox --webui-port=8080 Restart=on-failure
[Install] WantedBy=multi-user.target EOF
sudo systemctl enable --now qbittorrent
Visit http://localhost:8080 via your SSH tunnel (ssh -L 8080:127.0.0.1:8080 ...). Default login is admin / adminadmin — change it immediately in Tools → Options → Web UI.
Back in Sonarr, go to Settings → Download Clients → + → qBittorrent:
- Host:
127.0.0.1 - Port:
8080 - Username / Password: your qBittorrent credentials
- Category:
tv-sonarr(Sonarr creates this automatically)
Option B: SABnzbd (Usenet)
Install SABnzbd from the official PPA:
sudo add-apt-repository -y ppa:jcfp/sab-stable
sudo apt update
sudo apt install -y sabnzbdplusConfigure it to run on port 8085 as the sonarr user (or a dedicated sabnzbd user). Complete its first-run wizard over SSH tunnel, set a password, and copy the API key from Config → General.
In Sonarr, Settings → Download Clients → + → SABnzbd:
- Host:
127.0.0.1 - Port:
8085 - API Key: paste from SABnzbd
- Category:
tv-sonarr
Download paths and permissions
Both clients must write to a directory Sonarr can read. A clean convention:
/srv/media/
├── downloads/
│ ├── incomplete/
│ └── complete/
│ ├── tv-sonarr/
│ └── movies-radarr/
└── library/
├── tv/
└── movies/Create it and fix ownership:
sudo mkdir -p /srv/media/{downloads/incomplete,downloads/complete/tv-sonarr,library/tv}
sudo chown -R sonarr:media /srv/media
sudo chmod -R 2775 /srv/mediaThe 2775 mode (setgid + group-write) ensures every new file inherits the media group, so Sonarr, qBittorrent, and Jellyfin can all read and write the same tree without fighting over ownership.
Step 7: Add Indexers (Prowlarr or Jackett)
Sonarr supports direct indexer integrations, but in 2026 almost nobody configures them by hand. Prowlarr is the recommended indexer manager — you add each indexer once in Prowlarr, then Prowlarr pushes them to Sonarr, Radarr, Lidarr, and Readarr via their APIs. Jackett is the older alternative and still works, but Prowlarr is actively developed and has a purpose-built Sonarr integration.
Using Prowlarr (recommended)
http://127.0.0.1:9696
- Sonarr Server: http://127.0.0.1:8989
- API Key: from Sonarr's Settings → General → API Key
Using Jackett (legacy)
If you already run Jackett, add each tracker as a Torznab indexer in Settings → Indexers → + → Torznab Custom, using the URL and API key from Jackett's dashboard.
RSS sync cadence
In Settings → Indexers set a global RSS Sync Interval of 15 minutes. Shorter intervals rarely help — most indexers' RSS feeds update every 15–30 minutes anyway.
Step 8: Root Folders, Quality Profiles, and Naming
Root Folder
A root folder is the top-level directory where Sonarr will store TV series. In Settings → Media Management, scroll to Root Folders and add /srv/media/library/tv. Sonarr will create a subdirectory per series under that path.
Quality Profiles
Quality profiles define which release qualities Sonarr will accept and upgrade to. In Settings → Profiles, edit the default HD-1080p profile or create a new one:
- Qualities allowed: HDTV-1080p, WEBDL-1080p, WEBRip-1080p, Bluray-1080p
- Upgrades allowed: yes
- Upgrade Until: Bluray-1080p
Common profiles worth creating:
| Profile | Use case | Upgrade target |
|---|---|---|
| Any | Bandwidth-constrained, phone-only viewing | WEBDL-720p |
| HD-1080p | Default for most TVs | Bluray-1080p |
| Ultra-HD | 4K HDR on supported displays | Bluray-2160p Remux |
| Anime | JP anime with subs | WEBDL-1080p |
Language Profiles
Under Settings → Profiles → Language Profiles, create at least one profile (English is the default) and attach it to each series on import.
Naming
Sonarr's episode naming determines how well Plex/Jellyfin match your library. In Settings → Media Management, enable Rename Episodes and use the Servarr-recommended standard:
Standard Episode Format:
{Series Title} - S{season:00}E{episode:00} - {Episode Title} [{Quality Full}]Daily Episode Format:
{Series Title} - {Air-Date} - {Episode Title} [{Quality Full}]Anime Episode Format:
{Series Title} - S{season:00}E{episode:00} - {absolute:000} - {Episode Title} [{Quality Full}]Series Folder Format:
{Series Title} ({Series Year})Season Folder Format:
Season {season:00}These produce paths like:
/srv/media/library/tv/The Expanse (2015)/Season 01/The Expanse - S01E01 - Dulcinea [WEBDL-1080p].mkvPlex and Jellyfin match this layout deterministically.
Import Settings
Still in Media Management, set:
- Use Hardlinks instead of Copy: Yes — critical if your downloads and library share the same filesystem. Hardlinks mean Sonarr's "copy to library" costs zero additional disk space, and the file continues seeding from the download path.
- Unmonitor Deleted Episodes: Yes — if you delete a file manually, Sonarr will not re-grab it.
- Delete empty folders: Yes.
Step 9: Nginx Reverse Proxy with TLS
By default Sonarr listens on port 8989 with its own authentication. For any setup that is accessed outside your local network, put it behind Nginx with a Let's Encrypt certificate.
Restrict Sonarr to localhost
In Settings → General → Security, set Bind Address to 127.0.0.1, click Save, and restart:
sudo systemctl restart sonarrVerify:
sudo ss -lntp | grep 8989You should now see 127.0.0.1:8989 instead of *:8989.
Install Nginx and Certbot
sudo apt install -y nginx certbot python3-certbot-nginxCreate the Sonarr server block
sudo tee /etc/nginx/sites-available/sonarr > /dev/null <<'EOF' server { listen 80; server_name sonarr.yourdomain.com; return 301 https://$host$request_uri; }server { listen 443 ssl http2; server_name sonarr.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/sonarr.yourdomain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/sonarr.yourdomain.com/privkey.pem;
# Security headers add_header X-Content-Type-Options nosniff always; add_header X-Frame-Options DENY always; add_header Referrer-Policy "strict-origin-when-cross-origin" always;
client_max_body_size 20m;
location / { proxy_pass http://127.0.0.1:8989; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
proxy_redirect off; proxy_buffering off; proxy_read_timeout 600s; }
# SignalR push endpoint used by Sonarr's UI for live updates location /signalr { proxy_pass http://127.0.0.1:8989; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } EOF
Enable the site:
sudo ln -s /etc/nginx/sites-available/sonarr /etc/nginx/sites-enabled/
sudo nginx -tIssue a certificate:
sudo certbot --nginx -d sonarr.yourdomain.com --non-interactive --agree-tos \
-m [email protected] --redirect
sudo systemctl reload nginxCertbot installs a systemd timer that renews the certificate automatically.
Lock down the firewall
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw deny 8989
sudo ufw enableNow Sonarr is reachable only via https://sonarr.yourdomain.com, protected by Sonarr's Forms authentication behind a TLS-terminated reverse proxy.
Post-Install: Connect Media Servers
Sonarr can notify your media server the instant a new episode lands. In Settings → Connect, add one of:
- Plex Media Server — update library on import. See our Plex install guide.
- Jellyfin / Emby — update library and notify users. See our Jellyfin install guide.
- Discord / Telegram / Pushover — get push notifications when a grab or import occurs.
32400, and an authentication token. For Jellyfin, use an API key from the Jellyfin dashboard. Test the connection before saving.Pair with Radarr for movies
Sonarr handles TV only. For movies, install Radarr on the same box — it reuses Prowlarr, qBittorrent, and the same media filesystem layout, so setup is quick once Sonarr is in place.
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
sonarr.service: Failed with result 'exit-code' | Port 8989 already in use, or config directory permissions wrong | Check sudo journalctl -u sonarr -n 50. Fix ownership: sudo chown -R sonarr:media /var/lib/sonarr. |
| Blank UI, infinite spinner | Reverse proxy missing the /signalr location | Add the /signalr block from Step 9 and reload Nginx. |
| "No files were found" after download completes | Sonarr cannot read the download path | Verify /srv/media is sonarr:media and the download client writes to that path with group-write (2775). |
| Series imports but Plex shows "Unknown Show" | Naming scheme missing (Year) or using non-standard format | Set Series Folder Format to {Series Title} ({Series Year}) and run a manual library scan in Plex. |
| qBittorrent labelled downloads remain "Queued" | Default qBittorrent speed limits or disk full | Check df -h and qBittorrent's Tools → Options → Speed. |
| API key rejected by Prowlarr | Sonarr API key changed or wrong base URL | Copy the current key from Sonarr Settings → General → API Key into Prowlarr Settings → Apps → Sonarr. |
| "Permission denied" during import | Download client writes as a user that is not in the media group | sudo usermod -aG media qbittorrent and restart qBittorrent. |
Let's Encrypt issues DNS problem: NXDOMAIN | A record for sonarr.yourdomain.com not propagated | Verify with dig sonarr.yourdomain.com +short. Wait for DNS and re-run certbot. |
Useful logs
# systemd journal (startup, crashes)
sudo journalctl -u sonarr -fSonarr's own detailed log
sudo tail -f /var/lib/sonarr/logs/sonarr.txtNginx access + error
sudo tail -f /var/log/nginx/access.log /var/log/nginx/error.logFAQ
Do I need Mono on Ubuntu 24.04?
No. Sonarr v4 runs on .NET 6, which the sonarr package installs as a dependency. Earlier guides recommending apt install mono-runtime target Sonarr v3 and are outdated. A clean 24.04 box should never have Mono installed for Sonarr — installing it will not break Sonarr, but it adds unnecessary packages and occasionally conflicts with other .NET tooling.
Can Sonarr run alongside Radarr, Prowlarr, and a download client on a 6 GB VPS?
Yes, comfortably. Sonarr, Radarr, and Prowlarr each idle at roughly 150–250 MB RAM. qBittorrent-nox uses about 100–200 MB depending on the number of active torrents. On a 6 GB CloudCore Starter VPS you can run the full Servarr stack plus Jellyfin for streaming and still keep 2+ GB free for OS cache. The limiting factor is almost always disk space, not CPU or RAM — plan for block storage growth early.
How do I back up Sonarr's database and settings?
Sonarr stores everything in /var/lib/sonarr. The critical files are sonarr.db (SQLite), sonarr.db-shm, sonarr.db-wal, and config.xml. Sonarr's System → Backup feature creates a zipped bundle you can download. Automate nightly backups with a cron job that runs sqlite3 /var/lib/sonarr/sonarr.db ".backup '/backups/sonarr-$(date +%F).db'" followed by a rclone upload to object storage. Restoring is as simple as stopping Sonarr, replacing sonarr.db, and starting the service.
Should I use Usenet or torrents with Sonarr?
Both work well. Usenet (via SABnzbd or NZBGet) gives consistently high download speeds, strong retention, and no seeding obligation, but requires paid provider + indexer subscriptions. Torrents (via qBittorrent or Deluge) are free to use and often have better availability for niche content, but speeds depend on seeders and most private trackers require you to maintain seed ratio. Many users run both — Sonarr happily picks from whichever returns a release first, based on the indexer priority you set in Prowlarr.
What is the difference between Sonarr and Radarr?
Sonarr is purpose-built for TV series — it understands seasons, episodes, air dates, absolute episode numbering for anime, and season packs. Radarr is a fork for movies that handles release groups, collections (MCU, James Bond), and alternate titles. They share the Servarr codebase and API design, which is why they feel like the same app. Use Sonarr for TV, Radarr for movies — do not try to force one to manage the other.
Can I migrate from Sonarr v3 to v4 on the same server?
Yes, and the apt repository handles it. If you have Sonarr v3 running via Mono, stop the service, back up /var/lib/sonarr, add the apt repository from Step 2, and run sudo apt install sonarr. The package will detect the existing database, migrate it to the v4 schema, and start under .NET 6. After confirming the UI loads, remove Mono with sudo apt purge mono-runtime mono-devel. The Servarr wiki has a detailed migration checklist at wiki.servarr.com/sonarr/installation.
How do I integrate Sonarr with a request system like Overseerr or Jellyseerr?
Overseerr (Plex-centric) and Jellyseerr (Jellyfin fork) both have built-in Sonarr integrations. In Overseerr, go to Settings → Services → Add Sonarr Server and enter https://sonarr.yourdomain.com, the API key, default root folder, default quality profile, and default language profile. Requests from users will then appear in Sonarr's Activity queue automatically. This pattern — Overseerr for users, Prowlarr for indexers, Sonarr/Radarr for acquisition, qBittorrent for transport, Jellyfin/Plex for playback — is the canonical self-hosted media stack in 2026.
Next Steps
Sonarr is now managing your TV library. Here are recommended follow-ups:
- Install Radarr to automate movies using the same indexers, download client, and media tree.
- Install Prowlarr if you skipped it in Step 7 — indexer management becomes a single-pane-of-glass operation for the whole Servarr suite.
- Install Jellyfin or Plex as the front-end your users actually watch from. Point it at
/srv/media/library. - Deploy Overseerr or Jellyseerr for a polished request UI so household members can add shows without touching Sonarr directly.
- Harden the VPS with Fail2ban, unattended-upgrades, and a restrictive UFW policy.
- Automate Sonarr backups to object storage using the built-in System → Backup feature and a nightly cron job.
- Read the official wiki at wiki.servarr.com/sonarr for advanced topics: custom formats, release profiles, download-client category routing, and API scripting.
Build your full media stack on a single affordable VPS>
The CloudCore Starter plan is designed for exactly this workload — Sonarr + Radarr + Prowlarr + qBittorrent + Jellyfin, with room to grow.>
- 4 vCPU, 6 GB RAM, 100 GB NVMe
- Unmetered bandwidth
- Block storage add-ons for your library
- EU and North American datacentres
- EUR 7.99/month>
Deploy a CloudCore Starter VPS now and have your TV automation running within the hour.