DEV Community

Subham gupta
Subham gupta

Posted on

Build Your Own Media Server with Docker on Any Linux Machine

A step-by-step guide to running Jellyfin, Radarr, Sonarr, Prowlarr, qBittorrent and File Browser with Docker on any Linux system that can run Docker: a mini PC, Raspberry Pi, ARM board, old laptop or home server.

Legal note: Use this setup only for content you legally own, content in the public domain, or content that is free to share. You are responsible for what you download and store.

What You Will Build

By the end of this guide you will have a self-hosted, automated media server running 24/7 on hardware that uses little power (a tiny board, a mini PC or a spare computer).

App Job
Jellyfin Your own streaming service (posters, watch history, apps for TV and phone)
Radarr Finds, grabs and organizes movies
Sonarr Finds, grabs and organizes TV shows
Prowlarr Manages indexers once and shares them with Radarr and Sonarr
qBittorrent The download client
File Browser A web-based file manager for your server

How the pieces connect: You add a movie in Radarr, Radarr asks Prowlarr's indexers for it, sends the result to qBittorrent, then moves and renames the finished file into your library, and Jellyfin picks it up.

What You Need

  • Any computer that can run Docker: x86-64 or ARM64 (mini PC, Raspberry Pi, Radxa, Orange Pi, old laptop, NAS or a VM)
  • Storage for your media: an SSD, NVMe drive, HDD or external USB drive (SSD or NVMe is fastest)
  • A Linux OS (Debian, Ubuntu, Raspberry Pi OS, Fedora and so on) with SSH or terminal access
  • An ethernet connection (recommended over Wi-Fi for stability)
  • A computer on the same network to open the web interfaces

Hardware notes: This guide was written on a Radxa Cubie A7S with an NVMe SSD, but nothing in it is specific to that board. Any x86-64 or ARM64 machine running Linux works. Aim for at least 2 GB of RAM (4 GB or more is more comfortable) and enough storage for your library.

Step 1: Update the System and Find Your Server's IP

Connect to your machine over SSH or open a terminal and run the following (Debian and Ubuntu shown; on Fedora use sudo dnf upgrade -y, on Arch use sudo pacman -Syu):

sudo apt update && sudo apt upgrade -y
hostname -I
Enter fullscreen mode Exit fullscreen mode

Note the IP address (for example 192.168.1.50). Tip: set a static IP or a DHCP reservation in your router so it never changes.

Step 2: Prepare and Mount Your Media Drive

First identify the drive:

lsblk
Enter fullscreen mode Exit fullscreen mode

Find your drive in the list. SATA and USB drives look like sda, NVMe drives look like nvme0n1. If it is brand new and empty, format and mount it. Warning: formatting erases everything on the drive. Double-check the device name.

sudo mkfs.ext4 /dev/nvme0n1
sudo mkdir -p /mnt/nvme
sudo mount /dev/nvme0n1 /mnt/nvme
Enter fullscreen mode Exit fullscreen mode

To mount it automatically on every boot, get the UUID:

sudo blkid /dev/nvme0n1
Enter fullscreen mode Exit fullscreen mode

Then add a line to /etc/fstab (replace the UUID with yours):

echo 'UUID=YOUR-UUID-HERE /mnt/nvme ext4 defaults,noatime 0 2' | sudo tee -a /etc/fstab
sudo mount -a
Enter fullscreen mode Exit fullscreen mode

If your drive already has a partition (such as nvme0n1p1), use that name instead. Replace /dev/nvme0n1 in every command with your own device (for example /dev/sda). This guide uses /mnt/nvme as the mount point; you can use any path (such as /srv or /mnt/media) as long as you change it in later steps. If you have no separate drive and want to use the system disk, skip formatting and just create the folders in Step 4.

Step 3: Install Docker and Docker Compose

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

Log out and back in so the group change applies, then verify:

docker --version
docker compose version
Enter fullscreen mode Exit fullscreen mode

The images used below support both x86-64 (amd64) and ARM64, so the same steps work on a PC, a Raspberry Pi or any ARM board. The get.docker.com script covers most major distributions; if yours is not supported, follow the official install guide at docs.docker.com/engine/install.

Step 4: Create the Folder Structure

A clean layout matters. Putting downloads and media under one parent folder lets Radarr and Sonarr use hardlinks, which means finished downloads are "moved" instantly without copying and without using double the space.

sudo mkdir -p /mnt/nvme/data/{downloads,media/movies,media/tv}
sudo mkdir -p /mnt/nvme/docker/{jellyfin,radarr,sonarr,prowlarr,qbittorrent,filebrowser}
sudo chown -R $USER:$USER /mnt/nvme
Enter fullscreen mode Exit fullscreen mode

Check your user and group IDs, you will need them in the next step:

id
Enter fullscreen mode Exit fullscreen mode

Usually this shows uid=1000 and gid=1000.

Step 5: Create the Docker Compose File

mkdir -p ~/mediastack && cd ~/mediastack
nano docker-compose.yml
Enter fullscreen mode Exit fullscreen mode

Paste the following. Change TZ to your timezone, and PUID/PGID if yours are not 1000.

services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    user: 1000:1000
    ports:
      - 8096:8096
    volumes:
      - /mnt/nvme/docker/jellyfin:/config
      - /mnt/nvme/docker/jellyfin/cache:/cache
      - /mnt/nvme/data/media:/data/media
    restart: unless-stopped

  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata
      - WEBUI_PORT=8080
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    volumes:
      - /mnt/nvme/docker/qbittorrent:/config
      - /mnt/nvme/data:/data
    restart: unless-stopped

  prowlarr:
    image: lscr.io/linuxserver/prowlarr:latest
    container_name: prowlarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata
    ports:
      - 9696:9696
    volumes:
      - /mnt/nvme/docker/prowlarr:/config
    restart: unless-stopped

  radarr:
    image: lscr.io/linuxserver/radarr:latest
    container_name: radarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata
    ports:
      - 7878:7878
    volumes:
      - /mnt/nvme/docker/radarr:/config
      - /mnt/nvme/data:/data
    restart: unless-stopped

  sonarr:
    image: lscr.io/linuxserver/sonarr:latest
    container_name: sonarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata
    ports:
      - 8989:8989
    volumes:
      - /mnt/nvme/docker/sonarr:/config
      - /mnt/nvme/data:/data
    restart: unless-stopped

  filebrowser:
    image: filebrowser/filebrowser:latest
    container_name: filebrowser
    user: 1000:1000
    environment:
      - FB_DATABASE=/database/filebrowser.db
    ports:
      - 8081:80
    volumes:
      - /mnt/nvme/data:/srv
      - /mnt/nvme/docker/filebrowser:/database
    restart: unless-stopped
Enter fullscreen mode Exit fullscreen mode

Save with Ctrl+O, Enter, then exit with Ctrl+X.

Why one shared /data mount? Every app that touches files sees the same paths (/data/downloads, /data/media/movies). This avoids the most common setup problem, where Radarr cannot find a file qBittorrent says it downloaded.

Step 6: Start Everything

docker compose up -d
docker ps
Enter fullscreen mode Exit fullscreen mode

All six containers should show as Up. If one keeps restarting, check its logs:

docker logs -f <container-name>
Enter fullscreen mode Exit fullscreen mode

Step 7: Open the Web Interfaces

Replace SERVER-IP with your server's IP address.

App Address
Jellyfin http://SERVER-IP:8096
qBittorrent http://SERVER-IP:8080
Prowlarr http://SERVER-IP:9696
Radarr http://SERVER-IP:7878
Sonarr http://SERVER-IP:8989
File Browser http://SERVER-IP:8081

Step 8: Configure qBittorrent

  1. Get the temporary admin password from the logs: docker logs qbittorrent (look for the line with the temporary password). The username is admin.
  2. Log in, then go to Tools, Options, Web UI and set your own username and password.
  3. Go to Options, Downloads and set Default Save Path to /data/downloads.
  4. Click Save.

Step 9: Configure Radarr and Sonarr

Do these steps in Radarr first, then repeat in Sonarr.

Set a login: In Settings, General, set Authentication to Forms and create a username and password. Copy the API Key from this page, you will need it for Prowlarr.

Add the root folder: Go to Settings, Media Management, Add Root Folder.

  • Radarr: /data/media/movies
  • Sonarr: /data/media/tv

Turn on hardlinks: In the same Media Management page, make sure Use Hardlinks instead of Copy is enabled (it is by default).

Connect qBittorrent: Go to Settings, Download Clients, Add (+), qBittorrent and enter:

  • Host: qbittorrent
  • Port: 8080
  • Username and password: the ones you set in Step 8
  • Category: radarr (or tv-sonarr in Sonarr)

Click Test, then Save. Containers on the same compose file can reach each other by container name, so you do not need the board's IP here.

Step 10: Configure Prowlarr

  1. Open Prowlarr and set up authentication under Settings, General.
  2. Go to Indexers, Add Indexer and add the indexers you want to use. Choose sources that are legal for the content you search.
  3. Go to Settings, Apps, Add (+) and add Radarr:
    • Prowlarr Server: http://prowlarr:9696
    • Radarr Server: http://radarr:7878
    • API Key: the Radarr API key you copied
  4. Repeat for Sonarr using http://sonarr:8989 and the Sonarr API key.
  5. Click Sync App Indexers.

Your indexers now appear in both Radarr and Sonarr automatically, with no need to add them twice.

Step 11: Configure Jellyfin

  1. Open Jellyfin and follow the setup wizard to create your admin account.
  2. Click Add Media Library:
    • Content type: Movies, folder: /data/media/movies
    • Add another library with content type Shows, folder: /data/media/tv
  3. Finish the wizard and let Jellyfin scan.
  4. Optional but useful: in Radarr and Sonarr, go to Settings, Connect, Add, Jellyfin/Emby so Jellyfin refreshes the moment a new file arrives.

About playback: If your hardware is a low-power board, rely on Direct Play where possible (use apps and devices that support your video format, such as the Jellyfin app on a smart TV or phone). Software transcoding of high-bitrate 4K video will be slow on small ARM boards. On a more powerful PC, Jellyfin can transcode smoothly and can use hardware acceleration (Intel Quick Sync, NVIDIA or AMD) if you pass the GPU into the container; see the Jellyfin hardware acceleration docs.

Step 12: Configure File Browser

  1. Check the logs for the first-run login: docker logs filebrowser. Newer versions generate a random admin password and print it there. Older versions use admin / admin.
  2. Log in and change the password immediately under Settings, Profile.
  3. You will see your /srv folder, which is your whole /mnt/nvme/data directory, where you can upload, rename, move and delete files.

Step 13: Test the Whole Flow

  1. In Radarr, click Add New, search for a movie you are legally able to download, choose the root folder and quality profile, and tick Start search for movie.
  2. Watch qBittorrent: a download should appear within a minute.
  3. When it finishes, Radarr moves and renames it into /data/media/movies.
  4. Open Jellyfin. The movie appears with poster, description and cast, ready to play.

If that works, everything is connected.

Troubleshooting

  • Radarr says "no files found" after download: Check that qBittorrent's save path is under /data/downloads and that both containers mount /mnt/nvme/data:/data.
  • Permission denied errors: Make sure PUID and PGID match your user (id) and run sudo chown -R $USER:$USER /mnt/nvme/data.
  • Prowlarr cannot connect to Radarr: Use the container name (http://radarr:7878), not localhost.
  • A container will not start: Run docker logs <name> and read the last lines.
  • Drive is not mounted after reboot: Re-check your /etc/fstab line and run sudo mount -a.
  • Jellyfin does not see new files: Trigger Scan All Libraries in the dashboard, or enable the Jellyfin connection in Radarr and Sonarr.

Keeping Things Updated

To update all apps to the latest versions:

cd ~/mediastack
docker compose pull
docker compose up -d
docker image prune -f
Enter fullscreen mode Exit fullscreen mode

Back up the /mnt/nvme/docker folder now and then, since it holds all your app settings.

Security Tips

  • Do not expose these ports directly to the internet.
  • Set strong passwords on every app.
  • For remote access, use a VPN such as WireGuard or Tailscale instead of port forwarding.

Wrap-Up

You now have a compact, quiet, low-power media server that organizes your library on its own and streams it to any device in your home. From here you can add apps like Jellyseerr for request management, Bazarr for subtitles, or a VPN container for your download client.

Enjoy your own personal streaming service!

Top comments (0)