Automating your Media Server with Radarr and Sonarr

Automating Your Media Server with Radarr and Sonarr: A System Administrator's Guide

Welcome, fellow media enthusiasts! In this comprehensive guide, we will delve into the art of automating your media server using two powerful tools: Radarr and Sonarr. These applications, working in harmony, will allow you to effortlessly find, download, and organize your favorite movies and TV shows, freeing you from the tedious manual processes. This is a deep dive, so let's get started.

Introduction

Radarr and Sonarr are intelligent PVRs (Personal Video Recorders) specifically designed for movies and TV shows, respectively. Think of them as automated librarians for your digital entertainment. They monitor RSS feeds and torrent trackers, automatically downloading and managing media based on your preferences. They're particularly useful for users who enjoy a large library of content and appreciate the ease of automated acquisition.

Prerequisites

Before embarking on this journey, ensure you have the following:

  1. A Functional Operating System: A stable operating system is essential. Linux distributions like Ubuntu or Debian are highly recommended due to their stability and flexibility. Windows Server is also an option, but requires a different installation approach and might introduce complexities. For this tutorial, we will assume a Linux environment.
  2. Docker and Docker Compose (Recommended): Docker simplifies the installation and management of Radarr and Sonarr, isolating them from your host system and preventing conflicts. It also makes upgrades and backups a breeze. Docker Compose will further streamline the process by managing multiple Docker containers (Radarr, Sonarr, and potentially a download client like qBittorrent) within a single configuration file.
  3. A Download Client: You need a download client to actually fetch the media that Radarr and Sonarr discover. Popular choices include qBittorrent, Deluge, and Transmission. This tutorial will assume you're using qBittorrent.
  4. Sufficient Storage: Media files take up a significant amount of space. Ensure you have enough storage for your desired movie and TV show collection. This is where a larger capacity hard drive becomes critical.
  5. Usenet Access (Optional but Highly Recommended): While Radarr and Sonarr can work with torrents, using a Usenet provider offers several advantages, including faster downloads, greater privacy, and reduced risk of copyright notices. This tutorial will cover the basics for both torrents and Usenet.
  6. Basic Command-Line Knowledge: You should be comfortable navigating your operating system's command line and executing basic commands.
  7. Patience: Setting up and configuring Radarr and Sonarr takes time and effort. Be prepared to troubleshoot and learn along the way.

Step-by-Step Instructions

We will proceed with a Docker-based installation, as it offers the cleanest and most maintainable solution.

Step 1: Install Docker and Docker Compose

If you haven't already, install Docker and Docker Compose on your system. The exact commands will vary depending on your operating system. Here's an example for Ubuntu:

sudo apt update
sudo apt install docker.io
sudo apt install docker-compose
sudo systemctl start docker
sudo systemctl enable docker

Verify the installation by running:

docker --version
docker-compose --version

Step 2: Create a Docker Compose File

Create a directory to store your Docker Compose file and other configuration files:

mkdir ~/radarr_sonarr
cd ~/radarr_sonarr

Now, create a file named docker-compose.yml using your favorite text editor (e.g., nano, vim).

nano docker-compose.yml

Paste the following content into the file, modifying the paths and ports as needed:

version: "3.8"
services:
  radarr:
    image: linuxserver/radarr:latest
    container_name: radarr
    environment:
      - PUID=1000  # Replace with your user ID (run `id -u`)
      - PGID=1000  # Replace with your group ID (run `id -g`)
      - TZ=America/Los_Angeles # Replace with your timezone
    volumes:
      - ./config_radarr:/config
      - /path/to/your/movies:/movies  # Replace with your movie directory
      - /path/to/your/downloads:/downloads # Replace with your download directory
    ports:
      - 7878:7878
    restart: unless-stopped

  sonarr:
    image: linuxserver/sonarr:latest
    container_name: sonarr
    environment:
      - PUID=1000  # Replace with your user ID (run `id -u`)
      - PGID=1000  # Replace with your group ID (run `id -g`)
      - TZ=America/Los_Angeles  # Replace with your timezone
    volumes:
      - ./config_sonarr:/config
      - /path/to/your/tvshows:/tv # Replace with your TV show directory
      - /path/to/your/downloads:/downloads # Replace with your download directory
    ports:
      - 8989:8989
    restart: unless-stopped

  qbittorrent:
    image: linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1000  # Replace with your user ID (run `id -u`)
      - PGID=1000  # Replace with your group ID (run `id -g`)
      - TZ=America/Los_Angeles  # Replace with your timezone
      - WEBUI_PORT=8080
    volumes:
      - ./config_qbittorrent:/config
      - /path/to/your/downloads:/downloads  # Replace with your download directory
    ports:
      - 6881:6881
      - 6881:6881/udp
      - 8080:8080
    restart: unless-stopped

Important Considerations for docker-compose.yml:

  • PUID and PGID: These are crucial for file permissions. Replace 1000 with your actual user and group IDs. Run id -u and id -g in the terminal to find these.
  • Volumes: Carefully map the correct host directories to the container directories. The /downloads directory is essential for communication between Radarr/Sonarr and qBittorrent.
  • Timezone: Set the correct timezone to ensure accurate scheduling. A full list can be found here.
  • Ports: The default ports are generally fine, but adjust them if they conflict with other services on your system.
  • Storage Location: Ensure the directories mapped to /movies and /tv in your docker-compose.yml are accessible and have enough storage space.

Step 3: Launch the Containers

Navigate to the directory containing your docker-compose.yml file and run:

docker-compose up -d

This command will download the necessary images and start the containers in detached mode (running in the background).

Step 4: Access the Web Interfaces

  • Radarr: Open your web browser and navigate to http://<your_server_ip>:7878.
  • Sonarr: Open your web browser and navigate to http://<your_server_ip>:8989.
  • qBittorrent: Open your web browser and navigate to http://<your_server_ip>:8080. The default username is admin and the password is adminadmin. Change this immediately!

Step 5: Configure Radarr and Sonarr

Now comes the fun part: configuring Radarr and Sonarr!

5.1 Configure Radarr:

  • Settings -> Media Management:
    • Enable "Rename Movies".
    • Set your preferred movie naming format (e.g., {Movie Title} ({Release Year}) {Quality Title}).
    • Disable "Import Extra Files" unless you need subtitles/other files.
  • Settings -> Profiles:
    • Create or modify existing profiles to define your preferred quality settings (e.g., BluRay-1080p, Web-DL-720p).
  • Settings -> Quality:
    • Configure the quality settings for your profiles, including minimum and maximum sizes.
  • Settings -> Indexers:
    • Add your preferred indexers (torrent trackers or Usenet providers). For torrents, you'll need to configure them manually. For Usenet, you'll need to enter your provider's details (server, port, username, password).
    • Test each indexer to ensure it's working correctly.
  • Settings -> Download Clients:
    • Add qBittorrent as a download client. Enter the IP address, port (8080), username, and password you configured for qBittorrent.
    • Set a category for Radarr downloads (e.g., radarr). This is important for qBittorrent management.
  • Movies -> Add New:
    • Search for movies you want to add to your library.
    • Select the desired quality profile.
    • Choose the directory where you want the movie to be stored (from your /movies volume).
    • Click "Add Movie".

5.2 Configure Sonarr:

The configuration process for Sonarr is very similar to Radarr:

  • Settings -> Media Management:
    • Enable "Rename Episodes".
    • Set your preferred episode naming format (e.g., S{season:00}E{episode:00} - {Episode Title} {Quality Title}).
  • Settings -> Profiles:
    • Create or modify existing profiles to define your preferred quality settings (e.g., BluRay-1080p, Web-DL-720p).
  • Settings -> Quality:
    • Configure the quality settings for your profiles, including minimum and maximum sizes.
  • Settings -> Indexers:
    • Add your preferred indexers (torrent trackers or Usenet providers). For torrents, you'll need to configure them manually. For Usenet, you'll need to enter your provider's details (server, port, username, password).
    • Test each indexer to ensure it's working correctly.
  • Settings -> Download Clients:
    • Add qBittorrent as a download client. Enter the IP address, port (8080), username, and password you configured for qBittorrent.
    • Set a category for Sonarr downloads (e.g., sonarr). This is crucial for qBittorrent management.
  • Series -> Add New:
    • Search for TV shows you want to add to your library.
    • Select the desired quality profile.
    • Choose the directory where you want the TV show to be stored (from your /tv volume).
    • Click "Add Series".
    • Choose whether to monitor all episodes, future episodes, or only missing episodes.

Step 6: Configure qBittorrent

  • Tools -> Options -> Downloads:
    • Set the "Default Save Path" to the /downloads directory you mapped in your docker-compose.yml file.
    • Enable "Append the label of torrent to the save path". This is crucial for Radarr and Sonarr to correctly identify completed downloads.
  • Tools -> Options -> Web UI:
    • Change the default username and password to something secure.
    • (Optional) Enable HTTPS for secure access.

Step 7: Testing and Monitoring

After configuring Radarr, Sonarr, and qBittorrent, add a few test movies and TV shows to your library. Monitor the activity logs in Radarr and Sonarr to ensure that they are successfully searching for, downloading, and importing media. Check qBittorrent to confirm that downloads are being initiated and completed.

Troubleshooting

  • Permissions Issues: Ensure that the user running the Docker containers has the necessary permissions to read and write to the configured directories. Use the chown and chmod commands to adjust file permissions if needed.
  • Communication Issues: Verify that Radarr and Sonarr can communicate with qBittorrent. Check the logs for any errors related to connection failures. Ensure that the IP address, port, username, and password are correct. Also, ensure the downloads directory is correctly mapped.
  • Indexer Problems: If Radarr or Sonarr are not finding any results, check your indexer configuration. Make sure that the indexers are online and properly configured. Test the connection to the indexers within the Radarr/Sonarr settings.
  • Quality Profile Issues: Ensure that your quality profiles are properly configured and that they match the available quality settings on your indexers.
  • Docker Container Issues: Use the docker logs <container_name> command to view the logs for each container and identify any errors or warnings. The docker ps command will show the status of each container. docker-compose down and docker-compose up -d can often resolve minor issues.
  • Resource Constraints: Radarr and Sonarr can be resource-intensive, especially when searching for and processing large amounts of data. Monitor your system's CPU and memory usage and consider upgrading your hardware if necessary.

Conclusion

Congratulations! You have successfully set up and configured Radarr and Sonarr to automate your media server. With these powerful tools, you can now effortlessly manage your movie and TV show collection and enjoy a seamless entertainment experience. Remember to regularly update your software and monitor your system to ensure optimal performance. This is a continuous process, and you will likely need to tweak your configuration as your needs evolve.

Now that you have this powerful system set up, you need to ensure you have enough space to store all your downloaded media. This is where a large capacity hard drive becomes essential. We recommend the Western Digital 16TB Elements Desktop Hard Drive.

Call to Action:

Don't let your burgeoning media library overwhelm your existing storage! Upgrade to the Western Digital 16TB Elements Desktop Hard Drive and enjoy peace of mind knowing you have ample space for all your movies and TV shows. Click the link below to purchase now and unlock the full potential of your automated media server!

[Link to purchase the Western Digital 16TB Elements Desktop Hard Drive (Replace with actual link)]


<br>
<hr>

### Recommended Gear for this Build
<div class="kg-card kg-button-card kg-align-center">
    <a href="https://www.amazon.com/s?k=%60%60%60markdown%0A+Western+Digital+16TB+Elements+Desktop+Hard+Drive&tag=thetechmonkio-20" class="kg-btn kg-btn-accent">Check Price: ```markdown
 Western Digital 16TB Elements Desktop Hard Drive</a>
</div>