rootwise

Tutorials

A complete media server: Jellyfin or Plex with Sonarr, Radarr and Prowlarr

This tutorial builds a home media server from start to finish. At the end you type the name of a film or a series into a web page, and a while later it shows up on your TV with the right name, a poster and subtitles.

It is part one of two. Part two adds music, e-books and audiobooks.

A word before we start. All the software here is legal and open, apart from Plex, which is free to use but not open. What you download with it is your responsibility, and the rules differ from country to country. In Switzerland, downloading films and music for private use is allowed, but offering them to others is not, and BitTorrent uploads while it downloads. This is not legal advice. If in doubt, read up on the law where you live.

What you build

The setup is made of small programs that each do one job and talk to each other.

Program Job Address
Jellyfin or Plex plays your films and series on TV, phone and browser :8096 or :32400/web
Sonarr manages series: knows which episodes exist, fetches missing ones :8989
Radarr the same for films :7878
Prowlarr holds your search sources (indexers) and hands them to Sonarr and Radarr :9696
qBittorrent downloads torrents :8080
SABnzbd downloads from Usenet (optional) :8085
Bazarr fetches subtitles :6767
Seerr a friendly page where you and your family request titles :5055

Sonarr, Radarr, Prowlarr and their relatives are called “the arr stack” because of their names.

The path of a film through the system looks like this:

  1. You request the film in Seerr (or add it in Radarr directly).
  2. Radarr asks Prowlarr’s indexers for a release that fits your quality settings.
  3. Radarr hands the release to qBittorrent or SABnzbd.
  4. When the download is finished, Radarr gives the file a clean name and puts it in your film folder.
  5. Jellyfin or Plex notices the new file and shows it.
  6. Bazarr adds subtitles.

Jellyfin or Plex? Jellyfin is free and open, needs no account, and everything works without paying. Plex has more polished apps on more TVs, but it needs a Plex account, and since 2025 watching your own server from outside your home requires a paid Plex Pass or Remote Watch Pass. Watching at home stays free. If you are unsure, start with Jellyfin. The Compose file below contains both, and you delete the one you do not want.

What you need

  • A machine that is always on. A small PC, a NAS that runs Docker, or an old laptop. 4 GB of memory is enough for everything here, 8 GB is comfortable. An Intel processor with built-in graphics from about 2017 onward is a good choice, because it can convert video for devices that cannot play a file directly.
  • Disk space. A film in good 1080p quality takes 5 to 15 GB, in 4K much more.
  • Linux with Docker. The commands here are for Debian or Ubuntu. On a Synology or Unraid box the ideas are the same, but you click instead of typing.
  • Something to search. The arr programs find nothing by themselves. You need at least one indexer, which is a site that lists releases. For torrents there are public ones without an account. For Usenet you need a paid provider and an indexer account.

Step 1: Install Docker

Skip this if docker compose version already prints a version.

curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER

Log out and in again so that your user may use Docker.

Step 2: The folders

This is the step most guides get wrong, and it causes most of the problems people have later.

Use one top folder for downloads and for the finished library, and give the arr programs that whole folder. Then a finished download can be moved into the library in an instant, without copying. With torrents it is even better: the file appears in the library while the torrent client keeps the same file for seeding, and it uses disk space only once. This is called a hard link, and it works only inside one file system and one mounted folder.

/data
├── torrents
│   ├── movies
│   └── tv
├── usenet
│   ├── incomplete
│   └── complete
└── media
    ├── movies
    └── tv

Create it, together with a folder for the stack itself:

sudo mkdir -p /data/torrents/{movies,tv} /data/usenet/{incomplete,complete} /data/media/{movies,tv}
sudo mkdir -p /opt/media-stack/config/{jellyfin,jellyfin-cache,seerr}
sudo chown -R $USER:$USER /data /opt/media-stack

If your large disk is mounted somewhere else, for example /mnt/disk1, build the same tree there and use that path wherever this tutorial says /data. Keep everything on the same disk.

Step 3: The settings file

All programs should run as your own user, so that they can all read and write the same files. Find your numbers:

id

It prints something like uid=1000(anna) gid=1000(anna). Now create /opt/media-stack/.env:

PUID=1000
PGID=1000
TZ=Europe/Zurich
DATA=/data
CONFIG=/opt/media-stack/config
PLEX_CLAIM=

PLEX_CLAIM stays empty for now. It is only needed for Plex, in step 10.

Step 4: The Compose file

Create /opt/media-stack/compose.yaml with the following content. Delete the jellyfin or the plex block if you want only one of them, and the sabnzbd block if you do not use Usenet.

services:

  # --- media server: keep one, or both ---------------------------------
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    user: ${PUID}:${PGID}
    environment:
      - TZ=${TZ}
    volumes:
      - ${CONFIG}/jellyfin:/config
      - ${CONFIG}/jellyfin-cache:/cache
      - ${DATA}/media:/data/media
    ports:
      - 8096:8096
    restart: unless-stopped

  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - VERSION=docker
      - PLEX_CLAIM=${PLEX_CLAIM}
    volumes:
      - ${CONFIG}/plex:/config
      - ${DATA}/media:/data/media
    ports:
      - 32400:32400
    restart: unless-stopped

  # --- find and manage ---------------------------------------------------
  prowlarr:
    image: lscr.io/linuxserver/prowlarr:latest
    container_name: prowlarr
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    volumes:
      - ${CONFIG}/prowlarr:/config
    ports:
      - 9696:9696
    restart: unless-stopped

  sonarr:
    image: lscr.io/linuxserver/sonarr:latest
    container_name: sonarr
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    volumes:
      - ${CONFIG}/sonarr:/config
      - ${DATA}:/data
    ports:
      - 8989:8989
    restart: unless-stopped

  radarr:
    image: lscr.io/linuxserver/radarr:latest
    container_name: radarr
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    volumes:
      - ${CONFIG}/radarr:/config
      - ${DATA}:/data
    ports:
      - 7878:7878
    restart: unless-stopped

  bazarr:
    image: lscr.io/linuxserver/bazarr:latest
    container_name: bazarr
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    volumes:
      - ${CONFIG}/bazarr:/config
      - ${DATA}/media:/data/media
    ports:
      - 6767:6767
    restart: unless-stopped

  # --- download ----------------------------------------------------------
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - WEBUI_PORT=8080
    volumes:
      - ${CONFIG}/qbittorrent:/config
      - ${DATA}/torrents:/data/torrents
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    restart: unless-stopped

  sabnzbd:
    image: lscr.io/linuxserver/sabnzbd:latest
    container_name: sabnzbd
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    volumes:
      - ${CONFIG}/sabnzbd:/config
      - ${DATA}/usenet:/data/usenet
    ports:
      - 8085:8080
    restart: unless-stopped

  # --- requests ----------------------------------------------------------
  seerr:
    image: ghcr.io/seerr-team/seerr:latest
    container_name: seerr
    init: true
    user: ${PUID}:${PGID}
    environment:
      - TZ=${TZ}
    volumes:
      - ${CONFIG}/seerr:/app/config
    ports:
      - 5055:5055
    restart: unless-stopped

Three things in this file matter more than the rest:

  • Sonarr and Radarr get the whole of /data. The download programs get only their own part, and the media server and Bazarr only the library. Inside every container the paths are the same as outside, so /data/media/movies means the same folder everywhere. That is what makes hard links work and saves you from “path mapping” settings.
  • All containers are in one Compose file, so they are on one private network and can reach each other by name. When Sonarr needs qBittorrent, the host name is simply qbittorrent.
  • Seerr is the successor of Overseerr and Jellyseerr, which merged in 2026. If an older guide tells you to install one of those two, use Seerr.

Step 5: Start

cd /opt/media-stack
docker compose up -d
docker compose ps

The first start downloads a few gigabytes. After that every line of docker compose ps should say Up. In the rest of this tutorial SERVER stands for the address of your machine, for example 192.168.1.50.

Now the programs are set up in the order in which they depend on each other: download clients first, then the search, then Sonarr and Radarr, then the media server.

Step 6: qBittorrent

qBittorrent makes up a new password on every start until you set your own. Read it from the log:

docker logs qbittorrent 2>&1 | grep -i "temporary password"

Open http://SERVER:8080, log in as admin with that password, and then:

  1. Tools → Options → WebUI: set your own password.
  2. Options → Downloads → Default Save Path: change /downloads/ to /data/torrents. This is important. The default path does not exist in our setup.
  3. Options → BitTorrent: set a seeding limit that suits you, for example a ratio of 1 or a number of days.
  4. In the left column, right-click Categories → Add category and create tv and movies. Leave the save path of each category empty. qBittorrent then stores them in /data/torrents/tv and /data/torrents/movies, which are exactly the folders created in step 2.

Step 7: SABnzbd (only for Usenet)

Open http://SERVER:8085. The wizard asks for the server address, user name and password of your Usenet provider. Afterwards:

  1. Settings → Folders: temporary download folder /data/usenet/incomplete, completed download folder /data/usenet/complete.
  2. Settings → Categories: make sure tv and movies exist, each with its own name as folder.
  3. Settings → Special → host_whitelist: add sabnzbd. Without this, SABnzbd refuses connections from Sonarr and Radarr that use its container name.
  4. Settings → General: copy the API key. You need it in step 9.

Step 8: Prowlarr

Open http://SERVER:9696. Like all arr programs, it first asks you to set up a login. Choose “Forms” and a user name and password.

Add indexers: Indexers → Add Indexer, search for the site, fill in what it asks for (often nothing for public sites, an API key or login for private ones), then Test and Save.

Some sites sit behind a Cloudflare check that Prowlarr cannot pass by itself. For those there is a helper called FlareSolverr. It is not part of this tutorial. Start without it and add it only if an indexer you want requires it.

Connect Sonarr and Radarr: Settings → Apps → Add → Sonarr.

Field Value
Prowlarr Server http://prowlarr:9696
Sonarr Server http://sonarr:8989
API Key from Sonarr: Settings → General → API Key

Open Sonarr at http://SERVER:8989 in a second tab to copy the key (it asks for a login the first time, same as Prowlarr). Then do the same for Radarr with http://radarr:7878. From now on every indexer you add in Prowlarr appears in Sonarr and Radarr by itself.

Step 9: Sonarr and Radarr

Both work the same way. The steps for Sonarr, at http://SERVER:8989:

  1. Settings → Media Management → Add Root Folder: /data/media/tv. On the same page, switch on “Rename Episodes” and check that “Use Hardlinks instead of Copy” is on.
  2. Settings → Download Clients → Add → qBittorrent:

    Field Value
    Host qbittorrent
    Port 8080
    Username / Password what you set in step 6
    Category tv

    For Usenet add SABnzbd as well: host sabnzbd, port 8080 (the port inside the network, not 8085), the API key from step 7, category tv. 3. Settings → Profiles: the built-in quality profiles are fine to begin with. “HD-1080p” is a sensible default. If you later want finer control over which releases are preferred, the TRaSH Guides are the standard reference.

In Radarr at http://SERVER:7878 use root folder /data/media/movies and category movies.

Step 10: The media server

Jellyfin

Open http://SERVER:8096. The wizard asks for a language and an admin account, then for libraries:

  • content type Movies, folder /data/media/movies
  • content type Shows, folder /data/media/tv

To have new files appear immediately, create an API key in Jellyfin (Dashboard → API Keys), then in Sonarr and Radarr go to Settings → Connect → Add → Emby / Jellyfin, with host jellyfin, port 8096 and that key.

Apps exist for Android TV, Fire TV, Apple TV (via Swiftfin or Infuse), LG and Samsung TVs, phones and the browser.

Plex

Plex has to be linked to your account on first start.

  1. Open plex.tv/claim and copy the code. It is valid for four minutes.
  2. Put it into .env as PLEX_CLAIM=claim-… and run docker compose up -d plex.
  3. Open http://SERVER:32400/web, sign in and add two libraries: Movies with /data/media/movies, TV Shows with /data/media/tv.

In Sonarr and Radarr: Settings → Connect → Add → Plex Media Server, host plex, port 32400, then “Authenticate with Plex.tv”.

Step 11: Bazarr

Open http://SERVER:6767.

  1. Settings → Sonarr: switch on, address sonarr, port 8989, API key from Sonarr. Same under Radarr with radarr and 7878.
  2. Settings → Languages: create a language profile, for example German and English, and set it as default for series and films.
  3. Settings → Providers: add at least one subtitle source. OpenSubtitles.com needs a free account.

No path settings are needed, because Bazarr sees the library under the same path as Sonarr and Radarr.

Step 12: Seerr

Open http://SERVER:5055. The wizard asks which media server you use and how to reach it (jellyfin, port 8096, or sign in with Plex). Then add Radarr (host radarr, port 7878, API key, a quality profile, root folder /data/media/movies) and Sonarr (host sonarr, port 8989, root folder /data/media/tv). Mark each as default server.

From now on Seerr is the only page the rest of the household needs.

Step 13: Test the whole chain

Pick something that is free to share, so the test is clean. The Blender Foundation films are a good choice: in Radarr, Add New, search for “Big Buck Bunny” or “Sintel”, choose the root folder and tick “Start search for missing movie”.

Then watch it travel: Radarr’s Activity → Queue shows the download, qBittorrent shows it in category movies, and a few minutes later the file is in /data/media/movies/… and in your media server.

If no release is found, that only means your indexers do not carry it. Use Radarr’s manual search (the person icon) to see what they offer and why releases are rejected.

Check that the hard link worked:

ls -l /data/media/movies/*/

The number in the second column should be 2 for the film file while the torrent is still seeding.

Access from outside your home

Do not open the ports of Sonarr, Radarr, Prowlarr or the download clients on your router. They are admin tools and are regularly attacked.

  • The simple and safe way: a private network such as Tailscale or WireGuard. Install it on the server and on your phone, and every address in this tutorial works from anywhere, for you only.
  • For family and friends: put only Jellyfin and Seerr behind a reverse proxy with HTTPS (Caddy is the easiest), with strong passwords. Plex has its own remote access under Settings → Remote Access, with the paid pass mentioned above.

A VPN for the torrent client

If you want torrent traffic to leave through a VPN provider, the usual tool is Gluetun. qBittorrent is attached to Gluetun’s network, so it has no connection at all when the VPN is down. The pattern looks like this, here with Mullvad as an example:

  gluetun:
    image: qmcgaw/gluetun:latest
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    environment:
      - VPN_SERVICE_PROVIDER=mullvad
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=your-key
      - WIREGUARD_ADDRESSES=your-address
    ports:
      - 8080:8080        # qBittorrent's web page now lives here
    restart: unless-stopped

  qbittorrent:
    # as above, but remove its "ports:" block and add:
    network_mode: service:gluetun
    depends_on:
      - gluetun

In Sonarr and Radarr the host of the download client then becomes gluetun instead of qbittorrent. The exact variables depend on your provider and are listed in the Gluetun wiki. I checked that this snippet is valid Compose, but I did not run it with a real VPN account.

Video conversion with the graphics chip

When a device cannot play a file as it is, the media server converts it on the fly. On the processor alone that is slow. With an Intel graphics chip, add this to the jellyfin service:

    devices:
      - /dev/dri:/dev/dri
    group_add:
      - "REPLACE"   # number printed by: getent group render | cut -d: -f3

Then switch on Intel QuickSync (QSV) under Dashboard → Playback → Transcoding. For Plex add the same devices lines; hardware conversion there needs a Plex Pass. I did not test this part, because the test server has no graphics chip.

Updates and backups

Update everything:

cd /opt/media-stack
docker compose pull
docker compose up -d

Everything worth backing up is in /opt/media-stack: the Compose file, .env, and the config folder with all settings and databases. Stop the stack before copying it (docker compose stop), so the databases are not caught mid-write. The arr programs also make their own weekly backups under config/<name>/Backups.

When something does not work

What you see Usual cause
Sonarr: “Unable to connect to qBittorrent” Host must be qbittorrent, not localhost or the server address. With SABnzbd, the host_whitelist entry from step 7 is missing.
Download finishes but is never imported The save path in qBittorrent is still /downloads. It must be /data/torrents.
“Permission denied”, “folder not writable” PUID/PGID do not match the owner of /data. Run the chown from step 2 again.
Import works but disk fills twice as fast Hard links are not possible: downloads and library are on different disks, or mounted separately into the container.
Radarr finds nothing No indexer, or the quality profile rejects everything. Open the manual search and read the reason next to each release.
Plex shows no server after setup The claim code had expired. Delete config/plex, get a new code, start again.
A page does not load at all docker compose ps, then docker logs <name>.

What was tested

I ran this exact Compose file on a Debian 13 server on 24 November 2026, with the current image of every program. All web pages answered, Sonarr and Radarr accepted the root folders, a hard link between /data/torrents and /data/media worked, Sonarr connected to qBittorrent by name with the temporary password, and Prowlarr connected to Sonarr by name. The test ran on a server without a screen or a TV, so I did not download real media, play anything, or click through the setup wizards of Plex, Jellyfin, Bazarr and Seerr. Menu names are from the documentation and can shift a little between versions.

Sources

This tutorial was written by Claude, an AI model made by Anthropic, at the request of the owner of this site.