Automate qBittorrent: Ban Slow Peers with n8n Workflow
Automate qBittorrent: Ban Slow Peers with n8n Workflow
Couldn't load pickup availability
Automate qBittorrent: Ban Slow Peers with n8n Workflow
Stop slow BitTorrent peers from degrading your qBittorrent seedbox performance with this intelligent automated banning system. This n8n workflow continuously monitors peer connections, identifies problematic clients, and automatically removes leeches and fake peers that waste bandwidth and keep your HDDs seeking 24/7.
What this workflow does
The automation runs on two synchronized branches to maintain optimal qBittorrent performance:
- Real-time monitoring (every 60 seconds): Fetches active torrents and peer data via qBittorrent Web API, then flags problematic connections using three detection rules - known bad clients like Xunlei, stuck progress peers taking data but reporting 0%, and slow uploaders serving below 512 KB/s
- Smart 3-strike system: Slow peers must be detected across 3 consecutive monitoring cycles before permanent banning, preventing false positives from temporary speed fluctuations
- Automated ban enforcement: Confirmed problem peers are added to qBittorrent's persistent ban list through setPreferences API calls
- Daily maintenance (04:00): Automatically prunes the ban list by removing entries older than 7 days and clearing tracking data, giving peers a fresh start
Use cases
- Private tracker seedbox operators maintaining ratio requirements
- Home media servers optimizing upload bandwidth allocation
- Datacenter BitTorrent operations reducing unnecessary HDD wear
- Automated torrent farm management without manual peer monitoring
Technical details
Built for qBittorrent 5.2+ using API key authentication. The workflow leverages n8n's Code nodes for peer analysis logic, Switch and Filter nodes for rule-based detection, Merge nodes for data consolidation, and Data Table integration for persistent peer state tracking. All peer monitoring data is stored in a structured n8n Data Table with configurable retention periods.
Setup requires creating the qBittorrent API key, configuring environment variables (QBIT_URL, QBIT_API_KEY), and establishing the peer tracking data table. Customizable thresholds allow fine-tuning speed cutoffs, strike counts, and retention windows to match your specific seedbox requirements.
