Dec 9, 2024 3 min read

Prowlarr: A Beginner-Friendly Guide to Self-Hosting

Prowlarr: A Beginner-Friendly Guide to Self-Hosting
Table of Contents

Prowlarr is a powerful indexer management tool designed for use with Usenet and BitTorrent applications. It acts as a centralized indexer hub, making it easy to manage and integrate indexers across applications like Radarr, Sonarr, and Lidarr. Self-hosting Prowlarr empowers users with complete data control, enhanced security, and extensive customization options. In this guide, we’ll cover how to install, configure, and manage Prowlarr, along with practical examples for deploying and leveraging its features.

Installing Prowlarr

πŸ“¦ Docker/Docker Compose Setup

To quickly deploy Prowlarr, you can use Docker with the following docker-compose.yml configuration. This setup maps ports, persists data with volumes, and sets up networking.


version: "3.8"

services:

prowlarr:

image: lscr.io/linuxserver/prowlarr:latest

container_name: prowlarr

environment:

- PUID=1000 # Replace with your user ID

- PGID=1000 # Replace with your group ID

- TZ=Etc/UTC # Replace with your timezone

volumes:

- ./prowlarr/config:/config # Persistent storage for configuration

ports:

- 9696:9696 # Map the Prowlarr web UI port

restart: unless-stopped

To deploy this configuration, run the following commands:


mkdir -p ~/prowlarr

cd ~/prowlarr

nano docker-compose.yml # Add the above YAML here

docker-compose up -d

πŸš€ Manual Installation

For a manual Linux installation, download the latest Prowlarr release and configure it as a service:


sudo apt update && sudo apt upgrade -y

sudo apt install wget unzip -y

## Download and extract Prowlarr

wget https://prowlarr.servarr.com/v1/update/develop/changes?os=linux --content-disposition

unzip Prowlarr.develop.*.zip

sudo mv Prowlarr /opt/prowlarr

## Create a systemd service for Prowlarr

sudo nano /etc/systemd/system/prowlarr.service

Add the following to the service file:


[Unit]

Description=Prowlarr Service

After=network.target

[Service]

User=your_user # Replace with your Linux user

Group=your_group # Replace with your Linux group

ExecStart=/opt/prowlarr/Prowlarr -nobrowser

Restart=on-failure

[Install]

WantedBy=multi-user.target

Finally, start and enable the service:


sudo systemctl daemon-reload

sudo systemctl enable --now prowlarr

Configuring Nginx as a Reverse Proxy

🌐 Nginx Configuration

To make Prowlarr accessible via a domain or subdomain, create an Nginx server block:


sudo nano /etc/nginx/sites-available/prowlarr

Add the following configuration:


server {

listen 80;

server_name prowlarr.yourdomain.com;

location / {

proxy_pass http://127.0.0.1:9696;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}

}

Enable the site and reload Nginx:


sudo ln -s /etc/nginx/sites-available/prowlarr /etc/nginx/sites-enabled/

sudo nginx -t

sudo systemctl reload nginx

πŸ”’ SSL/TLS Setup

Secure your Prowlarr instance with Let’s Encrypt SSL:


sudo apt install certbot python3-certbot-nginx -y

sudo certbot --nginx -d prowlarr.yourdomain.com

To automate certificate renewal:


sudo crontab -e

Add this line to schedule daily renewals:


0 0 * * * certbot renew --quiet

Logging and Debugging Prowlarr

πŸ—ƒοΈ Enabling Debug Logs

To enable debug logs for troubleshooting, modify the Prowlarr UI settings:

  1. Navigate to Settings > General > Logging in the Prowlarr web UI.

  2. Set the logging level to Debug.

πŸ“„ Viewing Logs

If running via Docker, view logs with:


docker logs -f prowlarr

For manual installations, tail the logs with:


tail -f /opt/prowlarr/logs/prowlarr.txt

πŸ› οΈ Troubleshooting Common Issues

Use logs to identify configuration errors or network issues. If you encounter repeated connection errors to indexers, ensure:

  • The indexer API key is correct.

  • The required ports are open on your firewall.

πŸ“€ Exporting Logs

To export logs for external analysis:


cp /opt/prowlarr/logs/prowlarr.txt ~/prowlarr_logs.txt

Backup and Restore

πŸ—‚οΈ File-Based Backups

Backup the configuration directory to retain settings:


tar -czvf prowlarr_backup.tar.gz /opt/prowlarr/config

πŸ”„ Database Backups

If Prowlarr uses a database, back it up with:


sqlite3 /opt/prowlarr/config/prowlarr.db ".backup '~/prowlarr_db_backup.db'"

πŸ“… Automated Backup Scripts

Automate backups with a cron job:


crontab -e

Add this line to create daily backups:


0 2 * * * tar -czvf ~/prowlarr_backup_$(date +\%F).tar.gz /opt/prowlarr/config

Updating and Upgrading Prowlarr

⬆️ Updating Docker Images

Pull the latest Docker image and restart the container:


docker-compose pull

docker-compose up -d

πŸ› οΈ Manual Updates

For manual installations, download and replace the existing binary:


wget https://prowlarr.servarr.com/v1/update/develop/changes?os=linux --content-disposition

unzip -o Prowlarr.develop.*.zip -d /opt/prowlarr

sudo systemctl restart prowlarr

πŸ” Checking for Updates

You can also check for updates in the Prowlarr UI under System > Updates.

Leveraging Prowlarr’s Unique Features

πŸ”§ Enabling APIs

To enable and use Prowlarr’s API:

  1. Go to Settings > General > Security in the Prowlarr UI.

  2. Copy the API key for use in scripts.

Use the API with a curl example:


curl -X GET "http://127.0.0.1:9696/api/v1/indexer" -H "X-Api-Key: YOUR_API_KEY"

🌟 Advanced Configurations

Integrate with Sonarr or Radarr:

  1. In Prowlarr, navigate to Settings > Applications.

  2. Add a new application and provide the target application’s API key and URL.

  3. Test the connection and save.

Wrapping Up

Prowlarr is a robust and flexible tool for managing indexers in self-hosted environments. By following this guide, you’ve learned how to install, configure, secure, and maintain Prowlarr while leveraging its powerful API and integration capabilities. With these steps, you’re now equipped to make the most of Prowlarr and streamline your media automation workflows.

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.