Skip to content

qBittorrent

qBittorrent is my chosen client for Bittorrent.

Installation

Use binhex Docker

Migration from other client

  • First install the service
  • Make sure that the default download directory has all the downloaded data to import.
  • Then move all the *.torrent files from the old client to the torrent watch directory.

Python interaction

Use this library, you can see some examples here.

Monitorization

There's this nice prometheus exporter with it's graphana dashboard. With the information shown in the graphana dashboard it looks you can do alerts on whatever you want.

When I have some time I'd like to monitor the next things:

  • No Forbidden client string in the tracker messages. This happens when your client is not whitelisted in one of the trackers.
  • No Unregistered torrent string in the tracker messages. This happens when the tracker has removed the torrent from their site, you can safely remove it then.
  • No torrent is in downloading state without receiving data for more than X hours. This will mean that either the torrent is dead.
  • If all downloading torrents are not receiving data for more than X hours could mean that there is an error with your torrent client so that it can't download.
  • Configure the Hit and Run conditions per tracker to raise an alert if you don't comply
  • If you are not seeding during X hours it would mean that there is an error in your application.
  • Warn you when your buffer for a tracker is lower than X.
  • Warn if a completed torrent is in a category for more than X hours, which will mean that it wasn't automatically imported.

Automatic operation

I've found myself doing some micromanagement of the torrents that can probably be done by a program. For example:

  • Remove the torrents of a category if their ratio is above X (not all torrents).
  • Remove torrents if your disk is getting full in an intelligent way (torrents with most seeds first, allow or disallow the removal of private tracker torrents, ...).
  • For the trackers where you're building some ratio keep the interesting torrents for a while until you build the desired buffer.
  • Remove unregistered torrents
  • Alert or remove the directories that are not being used by any active torrent.

Client recovery

When your download client stops working and you can't recover it soon your heart gets a hiccup. You'll probably start browsing the private trackers webpages to see if you have a Hit and Run and if you can solve it before you get banned. If this happens while you're away from your infrastructure it can be even worse.

Something you can do in these cases is to have another client configured so you can spawn it fast and import the torrents that are under the Hit and Run threat.

Tools

  • qbittools: a feature rich CLI for the management of torrents in qBittorrent.
  • qbit_manage: tool will help manage tedious tasks in qBittorrent and automate them.

Troubleshooting

Trackers stuck on Updating

Sometimes the issue comes from an improvable configuration. In advanced:

References