Building the ultimate media server with Plex, Sonarr, Radar, and SABnzbd in Docker

By | June 21, 2024

It’s time to take control of your digital entertainment hub. In this guide, I’ll walk you through setting up a robust media server combining Plex for media hosting, Sonarr and Radar for content management, SABnzbd for downloading, and Tdarr for optimizing your media files, all using Docker. Today, we’re diving into the world of media servers, and I’m going to share the starting point to how I built my home media server.

Step 1: Docker Installation & configuration

Docker is the backbone of our media center, allowing us to compartmentalize and deploy each application in a neat container. Before we jump into the juicy stuff, make sure you have Docker installed on your system. If you haven’t done that yet, head over to Docker’s official website for a quick and painless setup. Let’s start by creating a docker-compose.yml file to define our containerized setup. Here’s a snippet to get you started:

version: '3'

services:
  plex:
    image: plexinc/pms-docker
    container_name: plex
    restart: always
    ports:
      - "32400:32400"
    environment:
      - PLEX_CLAIM="claim-YourPlexClaimToken"
      - ADVERTISE_IP=http://your-server-ip:32400/
    volumes:
      - /path/to/plex/library:/config
      - /path/to/media:/data
      - /path/to/transcode:/transcode

  sonarr:
    image: linuxserver/sonarr
    container_name: sonarr
    restart: always
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - /path/to/sonarr/config:/config
      - /path/to/media:/tv

  radar:
    image: linuxserver/radarr
    container_name: radar
    restart: always
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - /path/to/radar/config:/config
      - /path/to/media:/movies

  sabnzbd:
    image: linuxserver/sabnzbd
    container_name: sabnzbd
    restart: always
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - /path/to/sabnzbd/config:/config
      - /path/to/downloads:/downloads
      - /path/to/watch:/watch

  tdarr:
    image: juggledad/tdarr
    container_name: tdarr
    restart: always
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - /path/to/tdarr/config:/config
      - /path/to/media:/media

Make sure to replace the placeholder paths with your actual file system locations.

Step 2: Advantage of using volumes with Hard Links

Using volumes in Docker allows you to persist data outside the containers, and employing hard links within these volumes brings significant benefits. Hard links enable multiple file paths to reference the same physical data blocks on disk, saving space and reducing redundancy. In our setup, we’re linking various components (Plex, Sonarr, Radar, SABnzbd, and Tdarr) to the same media files through volumes, ensuring a unified and efficient storage system. This means no more duplicated files, even if used by different applications.

Step 3: Configuring each application

Plex:

Visit http://your-server-ip:32400/web to complete the Plex setup.
Add your media libraries pointing to /data.
Sonarr and Radar:

Access Sonarr at http://your-server-ip:8989 and Radar at http://your-server-ip:7878.
Configure them to point to your /tv and /movies directories, respectively.
SABnzbd:

Visit http://your-server-ip:8080 to configure SABnzbd.
Set your download and watch directories to /downloads and /watch.
Tdarr:

Access Tdarr at http://your-server-ip:8265.
Configure your input and output directories to /media.

Step 4: Tdarr for media optimization

Tdarr is the secret sauce for media optimization. It automates tasks like transcoding, bitrate normalization, and more. Configure Tdarr by adding your libraries and setting up your optimization tasks.

Conclusion

Congratulations, you’ve just built a powerhouse media center using Docker! Your media files are organized, downloads are automated, and everything is optimized for the best streaming experience. If you ever need to scale or update, Docker makes it a breeze. Enjoy your seamless media journey!

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.