Readarr is a self-hosted application designed for managing and tracking your eBook and audiobook libraries. By offering automation and integration with indexers and download clients, it simplifies acquiring and organizing your media collections. As an open-source app, Readarr is an excellent choice for those who value customization, data control, and seamless media management. In this guide, weβll cover everything from installing Readarr to configuring it for secure and efficient use. Letβs dive into the details.
Installing Readarr
π¦ Docker/Docker Compose Setup
Using Docker ensures a clean and portable setup for Readarr. Below is a docker-compose.yml
configuration tailored for Readarr:
version: '3.8'
services:
readarr:
image: lscr.io/linuxserver/readarr:latest
container_name: readarr
environment:
- PUID=1000 # Set this to your user ID
- PGID=1000 # Set this to your group ID
- TZ=America/New_York # Replace with your timezone
volumes:
- /path/to/config:/config # Path to store Readarr configuration
- /path/to/media:/books # Path to your eBook/audiobook library
ports:
- 7878:7878 # Expose Readarr's web UI
restart: unless-stopped
Save this configuration as docker-compose.yml
, then deploy and manage your Readarr container using the following commands:
docker-compose up -d
## Check the container logs to confirm it is running
docker logs -f readarr
π Manual Installation
For users preferring a manual installation on Linux, follow these steps:
- Install Required Dependencies (replace
apt
with your distro's package manager if needed):
sudo apt update
sudo apt install -y curl tar unzip
- Download and Extract Readarr:
curl -L -o readarr.tar.gz https://github.com/Readarr/Readarr/releases/latest/download/Readarr.master.linux.tar.gz
tar -xvf readarr.tar.gz -C /opt
- Create a Service File for Readarr:
sudo tee /etc/systemd/system/readarr.service > /dev/null <<EOF
[Unit]
Description=Readarr Service
After=network.target
[Service]
ExecStart=/opt/Readarr/Readarr
Restart=on-failure
User=$(whoami)
Group=$(whoami)
WorkingDirectory=/opt/Readarr
[Install]
WantedBy=multi-user.target
EOF
- Enable and Start the Service:
sudo systemctl enable readarr
sudo systemctl start readarr
Access Readarrβs web interface by visiting http://<your-server-ip>:7878
.
Configuring Nginx as a Reverse Proxy
π Nginx Configuration
A reverse proxy helps secure and manage access to Readarr. Below is an example Nginx configuration:
server {
listen 80;
server_name readarr.example.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;
}
}
Save this file as /etc/nginx/sites-available/readarr
and enable it:
sudo ln -s /etc/nginx/sites-available/readarr /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
π SSL/TLS Setup
Secure your server with Letβs Encrypt SSL:
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d readarr.example.com
This command automatically configures SSL and sets up periodic renewals.
Logging and Debugging Readarr
ποΈ Enabling Debug Logs
To enable debug logging in Readarr, navigate to Settings > General > Logging, and select Debug.
π Viewing Logs
For Docker installations:
docker logs -f readarr
For manual installations, logs are stored in /opt/Readarr/logs/
. Use tail
or less
to view:
tail -f /opt/Readarr/logs/log.txt
π οΈ Troubleshooting Common Issues
If your logs show errors such as "cannot reach indexer," ensure your indexer credentials are correctly configured under Settings > Indexers.
π€ Exporting Logs
Send logs to an ELK Stack by configuring Filebeat:
filebeat.inputs:
- type: log
paths:
- /opt/Readarr/logs/*.txt
output.elasticsearch:
hosts: ["localhost:9200"]
Deploy Filebeat:
sudo systemctl start filebeat
sudo systemctl enable filebeat
Backup and Restore
ποΈ File-Based Backups
Backup your configuration directory:
tar -czvf readarr-backup.tar.gz /path/to/config
Restore it with:
tar -xzvf readarr-backup.tar.gz -C /path/to/config
π Database Backups
If using a database, export it with:
sqlite3 /path/to/config/readarr.db .dump > readarr-db-backup.sql
Restore it:
sqlite3 /path/to/config/readarr.db < readarr-db-backup.sql
π Automated Backup Scripts
Set up a cron job to automate backups:
echo "0 2 * * * tar -czvf /backups/readarr-$(date +\%F).tar.gz /path/to/config" | crontab -
Updating and Upgrading Readarr
β¬οΈ Updating Docker Images
Pull the latest image and restart the container:
docker-compose pull
docker-compose up -d
π οΈ Manual Updates
Download the latest release and replace the binaries:
curl -L -o readarr.tar.gz https://github.com/Readarr/Readarr/releases/latest/download/Readarr.master.linux.tar.gz
tar -xvf readarr.tar.gz -C /opt
sudo systemctl restart readarr
π Checking for Updates
Navigate to System > Updates in the Readarr web UI to check for new versions.
Leveraging Readarrβs Unique Features
π§ Enabling APIs
To use Readarrβs API, generate an API key under Settings > General > Security. Use this key for API calls, e.g., to fetch all books:
curl -X GET "http://<your-server-ip>:7878/api/v1/book" -H "X-Api-Key: YOUR_API_KEY"
π Advanced Configurations
Integrate with third-party tools like Radarr or Sonarr by enabling Custom Scripts under Settings > Connect, and add webhook endpoints to trigger actions upon book downloads.
Wrapping Up
By following this guide, youβve installed, configured, and optimized Readarr to manage your media library efficiently. With its robust API, automation features, and seamless integration options, Readarr empowers you to take full control of your eBook and audiobook collections. Start implementing these steps today to unlock the full potential of Readarr!