Oct 4, 2024 3 min read

Jackett: Self-Hosting Made Simple

Jackett: Self-Hosting Made Simple
Table of Contents

Jackett is a powerful, self-hosted application designed to act as a bridge between torrent indexers and your favorite download clients, such as qBittorrent or Transmission. By providing a unified interface to manage multiple indexers, Jackett eliminates the hassle of manually configuring each one individually. Its open-source nature, extensive customization options, and control over your data make it an excellent choice for developers and system administrators. This guide will walk you through installing, configuring, securing, and utilizing Jackett to its fullest potential.

Installing Jackett

πŸ“¦ Docker/Docker Compose Setup

Docker is one of the most efficient methods to deploy Jackett. Below is a docker-compose.yml file tailored for Jackett, including port mappings and volume configurations.


version: '3.8'

services:

jackett:

image: lscr.io/linuxserver/jackett:latest

container_name: jackett

ports:

- "9117:9117" # Expose the default Jackett port

volumes:

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

- ./downloads:/downloads # Optional: path to downloads directory

environment:

- PUID=1000 # Your user ID for file permissions

- PGID=1000 # Your group ID for file permissions

- TZ=Etc/UTC # Set your timezone

restart: unless-stopped

Run the following commands to deploy Jackett:


mkdir jackett && cd jackett

nano docker-compose.yml # Paste the above configuration

docker-compose up -d # Start the Jackett container

πŸš€ Manual Installation

For users preferring a manual setup on a Linux server, follow these steps:

  1. Install dependencies:

sudo apt update && sudo apt install -y wget tar

  1. Download and extract the latest Jackett release:

wget https://github.com/Jackett/Jackett/releases/latest/download/Jackett.Binaries.Linux.tar.gz

tar -xvf Jackett.Binaries.Linux.tar.gz

sudo mv Jackett /opt/

sudo chown -R $USER:$USER /opt/Jackett

  1. Create a systemd service file for Jackett:

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

Add the following:


[Unit]

Description=Jackett Service

After=network.target

[Service]

ExecStart=/opt/Jackett/jackett --NoUpdates

WorkingDirectory=/opt/Jackett

Restart=on-failure

User=<your_username>

Group=<your_username>

[Install]

WantedBy=multi-user.target

  1. Enable and start Jackett:

sudo systemctl enable jackett

sudo systemctl start jackett

Access Jackett via http://<server-ip>:9117.

Configuring Nginx as a Reverse Proxy

🌐 Nginx Configuration

Set up Nginx to route traffic to Jackett for better accessibility. Create an Nginx server block:


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

Add the following configuration:


server {

listen 80;

server_name jackett.yourdomain.com;

location / {

proxy_pass http://localhost:9117;

proxy_http_version 1.1;

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection "upgrade";

proxy_set_header Host $host;

proxy_cache_bypass $http_upgrade;

}

}

Enable the server block and reload Nginx:


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

sudo nginx -t # Test configuration

sudo systemctl reload nginx

πŸ”’ SSL/TLS Setup

Secure your reverse proxy with Let's Encrypt:


sudo apt install certbot python3-certbot-nginx

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

Automate certificate renewal:


sudo systemctl enable certbot.timer

sudo systemctl start certbot.timer

πŸ› οΈ Testing and Reloading Nginx

Ensure everything is working by visiting https://jackett.yourdomain.com. Reload Nginx after any configuration changes:


sudo systemctl reload nginx

Logging and Debugging Jackett

πŸ—ƒοΈ Enabling Debug Logs

To enable debug logs, modify Jackett's configuration file. Open config/ServerConfig.json and set "LogLevel" to "Debug".

πŸ“„ Viewing Logs

For Docker-based installations:


docker logs jackett

For manual installations:


tail -f /opt/Jackett/Logs/log.txt

πŸ› οΈ Troubleshooting Common Issues

  • If Jackett doesn’t start, verify port availability using:

sudo netstat -tuln | grep 9117

  • Check permissions on the configuration directory:

ls -la /opt/Jackett

πŸ“€ Exporting Logs

To send logs to an external system like ELK Stack, configure filebeat or similar tools to monitor Logs/log.txt.

Backup and Restore

πŸ—‚οΈ File-Based Backups

Backup configuration and data files:


tar -czvf jackett-backup.tar.gz /path/to/config

Restore with:


tar -xzvf jackett-backup.tar.gz -C /

πŸ“… Automated Backup Scripts

Set up a cron job for regular backups:


crontab -e

Add:


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

Updating and Upgrading Jackett

⬆️ Updating Docker Images

Update to the latest Jackett version:


docker-compose pull

docker-compose up -d

πŸ› οΈ Manual Updates

Replace the old binaries:


wget https://github.com/Jackett/Jackett/releases/latest/download/Jackett.Binaries.Linux.tar.gz

tar -xvf Jackett.Binaries.Linux.tar.gz

sudo mv Jackett /opt/

sudo systemctl restart jackett

πŸ” Checking for Updates

Check Jackett's web interface for update notifications or monitor GitHub for new releases.

Leveraging Jackett’s Unique Features

πŸ”§ Enabling APIs

Activate Jackett’s API by obtaining an API key from the web interface under Settings. Use the API for automated queries. For example, using curl:


curl "http://localhost:9117/api/v2.0/indexers/all/results?apikey=<your_api_key>&Query=ubuntu"

🌟 Advanced Configurations

You can customize Jackett’s indexers in the web UI. For multi-user environments, configure separate profiles using different API keys.

Wrapping Up

This guide has equipped you with the practical knowledge to deploy, configure, and manage Jackett effectively. From Docker-based installation to advanced API usage, Jackett empowers you to centralize and automate your torrent indexer management. Start implementing these steps today and experience the full potential of self-hosting with Jackett!

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.