Dec 4, 2024 β€’ 4 min read

Radarr: Self-Hosting Made Simple

Radarr: Self-Hosting Made Simple

Radarr is a powerful self-hosted application designed to automate the process of tracking, managing, and downloading movies. Built specifically for efficiency and customization, Radarr integrates seamlessly with various download clients and indexes to keep your media library organized. By hosting Radarr yourself, you gain full control over your data, advanced customization, and the ability to tailor configurations to your environment. This guide walks you through installing, configuring, and managing Radarr, including setting up Docker, securing it with Nginx, debugging common issues, automating backups, and leveraging its unique features.

Installing Radarr

πŸ“¦ Docker/Docker Compose Setup

Docker is the recommended way to deploy Radarr due to its simplicity and portability. Below is a docker-compose.yml file specifically configured for Radarr:


version: '3.8'

services:

radarr:

image: lscr.io/linuxserver/radarr:latest

container_name: radarr

environment:

- PUID=1000 # Replace with your user ID

- PGID=1000 # Replace with your group ID

- TZ=Etc/UTC # Replace with your timezone

volumes:

- /path/to/config:/config # Configuration files

- /path/to/movies:/movies # Movie directory

- /path/to/downloads:/downloads # Downloads directory

ports:

- 7878:7878 # Radarr web interface

restart: unless-stopped

Save the above file as docker-compose.yml and run the following commands to deploy Radarr:


cd /path/to/your/docker-compose

## Deploy the container

docker-compose up -d

πŸš€ Manual Installation on Linux

To manually install Radarr on a Linux server, follow these steps:


## Update package lists and install dependencies

sudo apt update && sudo apt install -y curl mediainfo sqlite3 libchromaprint-tools

## Download the latest Radarr release

curl -L -o radarr.tar.gz $(curl -s https://api.github.com/repos/Radarr/Radarr/releases/latest | grep "browser_download_url.*linux.tar.gz" | cut -d '"' -f 4)

## Extract the downloaded archive

tar -xvzf radarr.tar.gz -C /opt/

## Rename the extracted folder

sudo mv /opt/Radarr /opt/radarr

## Create a Radarr systemd service

sudo tee /etc/systemd/system/radarr.service > /dev/null <<EOF

[Unit]

Description=Radarr Daemon

After=network.target

[Service]

User=$(whoami)

Group=$(whoami)

ExecStart=/opt/radarr/Radarr -nobrowser

Restart=on-failure

[Install]

WantedBy=multi-user.target

EOF

## Enable and start the Radarr service

sudo systemctl enable radarr

sudo systemctl start radarr

Access Radarr via http://<your_server_ip>:7878.

Configuring Nginx as a Reverse Proxy

🌐 Nginx Configuration

Create an Nginx server block to route traffic to Radarr:


sudo nano /etc/nginx/sites-available/radarr.conf

Paste the following configuration:


server {

listen 80;

server_name yourdomain.com;

location / {

proxy_pass http://127.0.0.1:7878;

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;

}

}

Enable the configuration and reload Nginx:


sudo ln -s /etc/nginx/sites-available/radarr.conf /etc/nginx/sites-enabled/

sudo nginx -t

sudo systemctl reload nginx

πŸ”’ SSL/TLS Setup

Secure Radarr with a Let's Encrypt SSL certificate:


sudo apt install certbot python3-certbot-nginx

sudo certbot --nginx -d yourdomain.com

Configure automatic renewal for certificates:


sudo systemctl enable certbot.timer

sudo systemctl start certbot.timer

Logging and Debugging Radarr

πŸ—ƒοΈ Enabling Debug Logs

To enable debug logging in Radarr:

  1. Navigate to the Radarr web interface.

  2. Go to Settings > General > Logging.

  3. Set the log level to Debug.

πŸ“„ Viewing Logs

For Docker deployments, view Radarr logs with:


docker logs radarr

For manual installations, logs are located at:


/opt/radarr/logs/

πŸ› οΈ Troubleshooting Common Issues

Use the logs to identify errors like missing dependencies or incorrect file permissions. Check for common errors in the web interface or by inspecting logs:


cat /opt/radarr/logs/*.txt | grep "ERROR"

πŸ“€ Exporting Logs

To forward logs to an ELK Stack, use Filebeat or a similar log shipper. For example:


sudo apt install filebeat

sudo nano /etc/filebeat/filebeat.yml

Configure Filebeat to monitor Radarr logs and send them to Elasticsearch.

Backup and Restore

πŸ—‚οΈ File-Based Backups

Create a backup of Radarr configuration files:


tar -czvf radarr_backup_$(date +%F).tar.gz /path/to/config

πŸ”„ Database Backups

Backup the Radarr database:


cp /path/to/config/radarr.db /path/to/backup/radarr.db.$(date +%F)

πŸ“… Automated Backup Scripts

Automate backups with a cron job:


crontab -e

Add the following line to schedule daily backups:


0 2 * * * tar -czvf /path/to/backup/radarr_backup_$(date +\%F).tar.gz /path/to/config

Updating and Upgrading Radarr

⬆️ Updating Docker Images

Update Radarr to the latest version in Docker:


docker-compose pull radarr

docker-compose up -d

πŸ› οΈ Manual Updates

For manual installations, repeat the download and extraction steps from Manual Installation, overwriting the existing files.

πŸ” Checking for Updates

In the Radarr web interface, go to System > Updates to check for available updates.

Leveraging Radarr’s Unique Features

πŸ”§ Enabling APIs

Enable the Radarr API for custom integrations:

  1. Navigate to Settings > General > Security.

  2. Enable API Key and copy your unique key.

Test the API with curl:


curl -H "X-Api-Key: YOUR_API_KEY" http://<your_server_ip>:7878/api/v3/movie

🌟 Advanced Configurations

Integrate Radarr with external tools like Sonarr or a media server:

  • Use Connect settings to sync Radarr’s status with Plex or Emby.

  • Configure Download Clients to integrate with tools like qBittorrent or NZBGet.

Wrapping Up

Self-hosting Radarr gives you unparalleled control over your movie library, allowing you to automate downloads and maintain a tidy collection. This guide covered everything from installation and security to debugging and leveraging advanced features. By implementing these steps, you’ll unlock the full power of Radarr and ensure a smooth, efficient media management experience that’s tailored to your needs.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Selfhosted Ninja.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.