SABnzbd is an open-source, self-hosted Usenet download client that automates the process of downloading, verifying, and unpacking files. Popular among tech-savvy users for its flexibility and powerful automation features, itβs a top choice for managing Usenet downloads while maintaining full control over your data. In this guide, weβll explore every aspect of deploying, configuring, and managing SABnzbd, covering installation, reverse proxy setup, logging, backups, updates, and advanced features.
Installing SABnzbd
π¦ Docker/Docker Compose Setup
Using Docker to deploy SABnzbd ensures a clean, repeatable deployment process. Below is an example docker-compose.yml
file to quickly set up SABnzbd.
version: "3.8"
services:
sabnzbd:
image: lscr.io/linuxserver/sabnzbd:latest
container_name: sabnzbd
ports:
- "8080:8080" # Web interface
volumes:
- /path/to/config:/config # Persistent configuration
- /path/to/downloads:/downloads # Download directory
environment:
- PUID=1000 # Adjust for your user ID
- PGID=1000 # Adjust for your group ID
- TZ=Europe/London # Set your timezone
restart: unless-stopped
Run the following commands to deploy SABnzbd with Docker Compose:
mkdir -p /path/to/config /path/to/downloads
chmod -R 755 /path/to/config /path/to/downloads
cd /path/to/docker-compose-dir
docker-compose up -d
Verify the container is running:
docker ps | grep sabnzbd
π Manual Installation
For a manual installation on a Linux server, follow these steps:
- Install dependencies:
sudo apt update
sudo apt install -y python3 python3-pip git
- Download the latest SABnzbd release:
wget https://github.com/sabnzbd/sabnzbd/releases/latest/download/SABnzbd-latest.tar.gz
tar -xvzf SABnzbd-latest.tar.gz
cd SABnzbd-*
- Run SABnzbd:
python3 SABnzbd.py
Access SABnzbd at http://<your-server-ip>:8080
.
Configuring Nginx as a Reverse Proxy
π Nginx Configuration
Using Nginx as a reverse proxy allows you to secure and simplify access to SABnzbd. Create a config file for SABnzbd:
sudo nano /etc/nginx/sites-available/sabnzbd
Add the following server block:
server {
listen 80;
server_name sabnzbd.example.com;
location / {
proxy_pass http://localhost:8080; # SABnzbd's internal port
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 configuration and restart Nginx:
sudo ln -s /etc/nginx/sites-available/sabnzbd /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
π SSL/TLS Setup
Secure your reverse proxy with Let's Encrypt:
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d sabnzbd.example.com
Test SSL auto-renewal:
sudo certbot renew --dry-run
Logging and Debugging SABnzbd
ποΈ Enabling Debug Logs
To enable debug-level logging in SABnzbd, update the configuration file (/path/to/config/sabnzbd.ini
):
[logging]
level = debug
Restart the SABnzbd service to apply changes.
π Viewing Logs
If running SABnzbd in Docker, view logs with:
docker logs sabnzbd
For manual installations, locate logs in the config directory:
cat /path/to/config/logs/sabnzbd.log
π οΈ Troubleshooting Common Issues
Check for common errors such as port conflicts or configuration issues. Use grep
to filter for error messages:
grep "ERROR" /path/to/config/logs/sabnzbd.log
Backup and Restore
ποΈ File-Based Backups
Back up configuration files and logs:
tar -czvf sabnzbd_backup_$(date +%F).tar.gz /path/to/config
π Automated Backup Scripts
Create a cron job for periodic backups:
echo "0 2 * * * tar -czvf /backup/sabnzbd_$(date +\%F).tar.gz /path/to/config" | crontab -
Updating and Upgrading SABnzbd
β¬οΈ Updating Docker Images
To update SABnzbd when using Docker:
docker-compose pull
docker-compose down
docker-compose up -d
π οΈ Manual Updates
For manual installations, download the latest release and repeat the setup steps:
wget https://github.com/sabnzbd/sabnzbd/releases/latest/download/SABnzbd-latest.tar.gz
tar -xvzf SABnzbd-latest.tar.gz
cd SABnzbd-*
python3 SABnzbd.py
Leveraging SABnzbdβs Unique Features
π§ Enabling APIs
Enable the SABnzbd API by setting a unique API key in the configuration:
- Open
sabnzbd.ini
and locate[misc]
:
[misc]
api_key = your_unique_api_key_here
- Test the API with
curl
:
curl "http://<your-server-ip>:8080/api?mode=version&apikey=your_unique_api_key_here"
π Advanced Configurations
Integrate with third-party tools like Sonarr or Radarr by enabling SABnzbd's download client settings in those apps. Set the SABnzbd URL, API key, and download directory in the respective app configurations.
Wrapping Up
With SABnzbd installed, configured, and secured, you now have a powerful and automated Usenet download client tailored to your needs. This guide covered everything from installation to advanced configurations, empowering you to fully leverage SABnzbdβs capabilities. Start exploring its API and integration options to supercharge your media automation workflows.