Sonarr is open-source software that manages your TV shows. You choose which shows to follow and in what quality. Sonarr displays new episodes in the calendar, searches the sources you add, sends downloads to your download client, and sorts finished files into your library with consistent names. Sonarr itself doesn't download or play anything; instead, it works with a download client such as qBittorrent and a media server such as Jellyfin or Plex.
This guide covers two options: the simple One-Click App option, which makes Sonarr available over HTTPS in just a few clicks, and a manual installation with Docker Compose, where Sonarr and qBittorrent share a data folder. Afterward, you'll create a root folder, connect a download client, and add indexers through Prowlarr.
You are responsible for managing and downloading only content for which you have the necessary rights, such as your own recordings or freely licensed TV shows. Check the terms of use for your sources and the laws in your country.
Sonarr is designed to run continuously in the background. A VPS is a good fit for Sonarr if:
- You want your TV library to stay up to date without manual work: Sonarr regularly checks for new episodes and handles downloading, renaming, and sorting them.
- You want Sonarr to run around the clock without having to leave your home PC switched on.
- You want a fixed address with HTTPS instead of opening ports on your router.
- Your download client and media server already run on the server, for example, qBittorrent and Jellyfin. That way, all your files are in one place.
A VPS is less suitable for very large libraries: a single HD episode can easily take up one to three gigabytes, and a whole season takes several times more. If your collection is stored at home on a NAS, Sonarr usually works better directly on that device.
For Sonarr to sort finished downloads, Sonarr and the download client must be able to see the same files. This determines which option is right for you:
| One-Click App | Docker Compose (manual) | |
|---|---|---|
| What is stored | Only the /config folder with the database and settings | All folders you specify in the Compose file |
| Root folder for TV shows | You must create it yourself inside /config | A separate folder, for example, /data/media/tv |
| Sorting finished downloads | Not possible; Sonarr can't see files from other apps | Possible using a shared folder with the download client |
| Suitable for | Trying it out, using the calendar, and managing your TV show list | The complete workflow, from searching to a finished library |
If you want to try Sonarr first, start with the One-Click App. If you want Sonarr to download and sort episodes automatically, use the manual installation below.
The quickest way to get Sonarr is through your VPS's One-Click Apps. The app is directly accessible over HTTPS with a domain. You don't need a reverse proxy, certificate, or firewall rules.
- A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set Up One-Click Apps for instructions.
- Sonarr by itself will run on a small VPS with 1 GB of RAM. If other apps such as qBittorrent, Prowlarr, or Jellyfin are running on the same VPS, plan for at least 4 GB of RAM in total.
- Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
- Search for Sonarr in the App catalog and click Install app on its card.
- Use a custom subdomain or zap.cloud is already selected, with a random name. Leave the option enabled or enter a custom name, for example,
sonarr. Sonarr will be available over HTTPS with a domain. - Under App configuration, the only option is
TZ, the time zone. The default isAmerica/Toronto. Enter your time zone, for example,Europe/Berlin, so the calendar and air times are correct. - Click Queue installation.
Installation takes one to two minutes. Once the app card shows Online, you can continue to the next step.
Sonarr is installed without a user account, so you won't find any automatically generated login details under App environment. You'll set your own username and password the first time you open it:
- Open your app using the Access link on the app card.
- Sonarr displays the Authentication Required window. Under Authentication Method, select Forms (Login Page).
- Leave Authentication Required set to Enabled.
- Enter a username under Username and a strong password under Password and Password Confirmation.
- You can leave Allowed Hosts empty. Click Save.
From now on, Sonarr will show a login page when you access it.
Until you save your login details, Sonarr is accessible without a password, and anyone who visits the address could complete the setup for you. Open the Access link as soon as the app is running. If Sonarr shows a login page instead of the setup window on your first visit, someone else has completed the setup: uninstall the app and its data, then reinstall it.
You can find the settings from the first launch later under Settings > General, in the Security section. The API Key, which Prowlarr and other apps use to access Sonarr, is also shown there. Treat it like a password.
Before you can add a TV show, Sonarr needs a root folder. The One-Click App only stores /config permanently. Folders such as /media or /mnt in Sonarr's file browser belong to the container itself and will be empty after an update. You can't create new folders in the file browser.
Instead, create the root folder over SSH inside /config. The first command shows you the container name:
docker ps --filter name=sonarr --format '{{.Names}}'
docker exec -u abc CONTAINER_NAME mkdir -p /config/tv
Replace CONTAINER_NAME with the name from the first command. The -u abc option creates the folder as the user Sonarr runs under. Then, in Sonarr, go to Settings > Media Management, click Add Root Folder, and select the /config/tv path.
Each One-Click App has its own data volumes. Sonarr therefore can't see the download folder of a qBittorrent One-Click App and can't sort its downloads. As a One-Click App, Sonarr is suitable for managing your TV show list, calendar, and notifications. To download and sort files, use the manual installation with a shared data folder.
Update Sonarr in the app settings (gear icon) under App update. Click Check for updates and install a new version with Apply update. If it says the app is up to date, there's no newer version in the app catalog yet. Updating Sonarr from within the container isn't supported; new versions are delivered through App update.
Your TV show list, settings, and the root folder in /config are retained during updates. Sonarr backs up its database every 7 days. Under System > Backup, you can create a backup to download at any time by clicking Backup Now. Also back up the entire VPS regularly using Backups in the dashboard.
The rest of this guide covers the manual installation of Sonarr with Docker Compose. Sonarr and qBittorrent run in the same Compose file and share a data folder, allowing Sonarr to sort finished downloads directly.
- A Linux VPS running Debian or Ubuntu, with SSH access. See First Access via SSH.
- Docker and Docker Compose (Compose v2). See Install Docker. Check the installation with
docker --versionanddocker compose version. - To access Sonarr over HTTPS, a domain or subdomain whose A record points to your VPS's IP address (e.g.
sonarr.example.com).
The figures below are guidelines for Sonarr and qBittorrent together. The storage space needed for your TV shows is the key factor.
| Hardware | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU core | 2 vCPU cores |
| RAM | 2 GB | 4 GB |
| Storage | 20 GB plus your TV shows | 20 GB plus your library and space for ongoing downloads |
Don't expose Sonarr (port 8989) or the qBittorrent web interface (8080) to the internet. Access them through an SSH tunnel and later through a reverse proxy. Open SSH, the reverse proxy ports, and the torrent port 6881:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 6881/tcp
ufw allow 6881/udp
ufw enable
Ports published by Docker using ports: are accessible from the internet, even if ufw blocks them. Docker adds its own rules before ufw's rules. Therefore, bind Sonarr and the qBittorrent web interface to 127.0.0.1 only, as shown below. For more about the firewall, see Managing the Firewall on Linux.
The Sonarr team recommends using one shared data folder for downloads and the library in Docker. Sonarr can then move finished files without copying them or create hard links, instead of using twice the storage space. Create the folders and assign them to the user with ID 1000, which both containers will run as:
mkdir -p /opt/sonarr/data/torrents /opt/sonarr/data/media/tv
chown -R 1000:1000 /opt/sonarr/data
cd /opt/sonarr
nano docker-compose.yml
Add this content:
services:
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
volumes:
- ./sonarr-config:/config
- ./data:/data
ports:
- "127.0.0.1:8989:8989"
restart: unless-stopped
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
- WEBUI_PORT=8080
- TORRENTING_PORT=6881
volumes:
- ./qbittorrent-config:/config
- ./data/torrents:/data/torrents
ports:
- "127.0.0.1:8080:8080"
- "6881:6881"
- "6881:6881/udp"
restart: unless-stopped
The most important lines:
imageuses thelatesttag, which is the latest stable version from LinuxServer.io. For controlled updates, specify a fixed version tag.PUIDandPGIDset the user. Since both use1000, Sonarr can move and rename qBittorrent's files../data:/datagives Sonarr access to the entire data folder. qBittorrent only gets the downloads folder with./data/torrents:/data/torrents, using the same path. This means qBittorrent reports a path such as/data/torrents/tv-sonarr/…, which Sonarr can find at exactly the same path../sonarr-configand./qbittorrent-configcontain the databases and settings.127.0.0.1:…makes the web interfaces accessible only on the server itself, while6881is the torrent port for incoming connections.
Save with Ctrl+O, exit nano with Ctrl+X, and start both containers:
docker compose up -d
docker compose ps
In this Compose file, Sonarr finds qBittorrent using the service name qbittorrent. You don't need any IP addresses.
Until you set up login, Sonarr is accessible without a password. Set it up before configuring the reverse proxy. Create an SSH tunnel for both web interfaces on your own PC:
ssh -L 8989:127.0.0.1:8989 -L 8080:127.0.0.1:8080 root@SERVER_IP
Leave the terminal open and visit http://localhost:8989 in your browser. As described above under “First Launch: Set Up Login,” choose Forms (Login Page) and set a username and password.
Then open qBittorrent at http://localhost:8080. You can find the temporary password for the admin user with docker logs qbittorrent 2>&1 | grep "temporary password". Set your own password under Tools > Options... > WebUI, and set Default Save Path to /data/torrents in the Downloads tab. For more about qBittorrent, see Set Up qBittorrent.
To access Sonarr from the internet, put a reverse proxy with a valid certificate in front of it. For the basics, see Set Up a Reverse Proxy with nginx and Create an SSL Certificate (Let's Encrypt). Here's an nginx server block:
server {
listen 80;
server_name sonarr.example.com;
location / {
proxy_pass http://127.0.0.1:8989;
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_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Then get the certificate with certbot --nginx -d sonarr.example.com. Certbot adds HTTPS and redirects HTTP. The Upgrade and Connection lines are required for live updates in the web interface.
The Disabled for Local Addresses option under Settings > General is intended for home networks. Behind a reverse proxy on the same server, Sonarr might treat requests from the internet as local and allow access without a password. More tips are available in Linux Security Tips.
Sonarr's database, settings, and automatic backups are stored in /opt/sonarr/sonarr-config. To create a full backup, briefly stop the containers and archive the configuration:
cd /opt/sonarr
docker compose stop
tar czf sonarr-backup-$(date +%F).tar.gz sonarr-config qbittorrent-config docker-compose.yml
docker compose start
You can also create a backup while Sonarr is running using System > Backup > Backup Now, and restore one using Restore Backup. Back up the TV shows in data/media/tv separately if needed. The configuration contains the API key: keep the backup confidential and don't store it only on the VPS.
To update Sonarr in the container, use a new image rather than the web interface. Sonarr shows available versions and their changes under System > Updates. Back up your configuration first, then update:
cd /opt/sonarr
docker compose pull
docker compose up -d
When it starts, Sonarr updates its database to work with the new version. You can see the installed version under System > Status.
After installation, Sonarr displays warnings under System > Status because no indexer or download client has been added yet. The following steps address these warnings. Sonarr's interface is in English, and some settings only appear after you click Show Advanced.
The root folder is where Sonarr creates a subfolder for each TV show. Go to Settings > Media Management, click Add Root Folder at the bottom, and select /data/media/tv for the manual installation or /config/tv for the One-Click App.
In the same section, you can set how Sonarr names files. Enable Rename Episodes if you want Sonarr to rename episodes consistently, for example, using a format that includes the show, season, and episode. This helps media servers such as Jellyfin or Plex identify episodes correctly. Set the names of season folders under Season Folder Format.
The Quality Profiles under Settings > Profiles determine which qualities Sonarr accepts, for example, HD-1080p or HD - 720p/1080p. Choose a profile for each show. A profile without Ultra-HD is usually a good choice on a VPS, since 2160p episodes take up several times more space.
- Go to Settings > Download Clients and click the plus sign.
- Select qBittorrent.
- Enter
qbittorrentfor Host and8080for Port. This is the service name from the Compose file. - Enter the login details for your qBittorrent web interface under Username and Password.
- The default Category is
tv-sonarr. qBittorrent saves downloads in this category to the/data/torrents/tv-sonarrsubfolder, so Sonarr only processes its own downloads. - Click Test and, if you see a green check mark, click Save.
You only need Remote Path Mappings in the same section if the two programs see the same files under different paths. With the Compose file above, the paths are the same. A mapping won't help if there's no shared storage; Sonarr needs direct access to the finished files.
Indexers are the sources Sonarr searches for new episodes. You can add them directly in Sonarr under Settings > Indexers. If you use several apps, such as Sonarr and Radarr, Prowlarr is more convenient: you manage indexers there once, and Prowlarr automatically sends them to Sonarr.
Prowlarr needs Sonarr's API Key, which you can find under Settings > General. In Prowlarr, add Sonarr under Settings > Apps. If you add Prowlarr as another service in the Compose file above, enter http://sonarr:8989 for Sonarr Server. If both apps are One-Click Apps, use Sonarr's HTTPS address, for example, https://sonarr.example.com. This connection also works between two One-Click Apps because Prowlarr only transfers settings and doesn't need access to files. After saving, the indexers appear in Sonarr under Settings > Indexers, labeled “(Prowlarr)”.
Under Series > Add New, search for a TV show by name. Choose a root folder and quality profile, then specify which episodes Sonarr should follow under Monitor, for example, only upcoming episodes. If you already have TV shows in the root folder, import them into Sonarr using Library Import.
The Calendar shows all upcoming episodes. Use iCal Link to add it to your personal calendar. Under Settings > Connect, you can set up notifications, for example, through Discord or email, or have Jellyfin or Plex rescan your library.
- Storage space: TV shows take up a lot of space. During a download, the episode also needs space in the download folder unless you're using hard links. If you run out of space, increase it in the Manage plan tab for your VPS.
- Traffic: Downloads count toward your VPS's traffic allowance. For information about what happens when you exceed it, see Traffic Allowance, Throttling, and Traffic Packages.
- One-Click Apps don't share files: Sonarr can't sort downloads from another One-Click App.
- Your sources determine what's available: Sonarr doesn't check what your indexers offer. It's your responsibility to make sure your use is permitted.
You've set up Sonarr on your VPS, secured the login, created a root folder, and learned how to connect qBittorrent and Prowlarr. From now on, Sonarr will keep track of your TV shows and keep your library organized.
Prefer not to deal with Docker manually? Use the simple One-Click App option described above under “Simple Option: Sonarr as a One-Click App” and use it to manage your TV show list, calendar, and notifications.
