Seedbox — Reference
Links
- Website (qBittorrent): https://www.qbittorrent.org
- WebUI API docs: https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)
- GitHub (qBittorrent): https://github.com/qbittorrent/qBittorrent
- Docker image: https://github.com/linuxserver/docker-qbittorrent
Authentication
qBittorrent's built-in auth is disabled — WebUI access is controlled entirely by oauth2-proxy (PocketID SSO). For API access, bypass oauth2-proxy by hitting the internal IP directly.
# Internal API access (no auth needed — AuthSubnetWhitelist covers LAN)
curl -s http://192.168.1.110:8080/api/v2/... # seedbox instance
curl -s http://192.168.1.110:8081/api/v2/... # normal instance
If AuthSubnetWhitelist is not set, use cookie-based auth:
# Login and get SID cookie
curl -s -c cookies.txt http://192.168.1.110:8080/api/v2/auth/login \
-d "username=admin&password=adminadmin"
# Use cookie for subsequent requests
curl -s -b cookies.txt http://192.168.1.110:8080/api/v2/...
API — Application
Get application version
curl -s http://192.168.1.110:8080/api/v2/app/version
Get application preferences
curl -s http://192.168.1.110:8080/api/v2/app/preferences | python3 -c \
"import json,sys; d=json.load(sys.stdin); print(f'DL={d[\"save_path\"]} listen={d.get(\"listen_port\",\"?\")} dht={d.get(\"dht\",\"?\")}')"
Set application preferences
curl -s -X POST http://192.168.1.110:8080/api/v2/app/setPreferences \
-d 'json={"save_path":"/data/seedbox","listen_port":12345}'
API — Torrents
List all torrents
curl -s http://192.168.1.110:8080/api/v2/torrents/info | python3 -c \
"import json,sys; [print(f'{t[\"hash\"][:8]} {t[\"name\"]} {t[\"state\"]} {t[\"progress\"]*100:.0f}%') for t in json.load(sys.stdin)[:10]]"
Get torrent details
curl -s "http://192.168.1.110:8080/api/v2/torrents/properties?hash=<hash>"
Add a torrent (magnet or .torrent URL)
curl -s -X POST http://192.168.1.110:8080/api/v2/torrents/add \
-d "urls=magnet:?xt=urn:btih:..."
Add a torrent file
curl -s -X POST http://192.168.1.110:8080/api/v2/torrents/add \
-F "[email protected]"
Pause / Resume torrents
# Pause
curl -s -X POST http://192.168.1.110:8080/api/v2/torrents/pause \
-d "hashes=<hash>"
# Resume
curl -s -X POST http://192.168.1.110:8080/api/v2/torrents/resume \
-d "hashes=<hash>"
# Pause/resume all
curl -s -X POST http://192.168.1.110:8080/api/v2/torrents/pause -d "hashes=all"
curl -s -X POST http://192.168.1.110:8080/api/v2/torrents/resume -d "hashes=all"
Delete torrents
# Delete torrent only (keep files)
curl -s -X POST http://192.168.1.110:8080/api/v2/torrents/delete \
-d "hashes=<hash>&deleteFiles=false"
# Delete torrent and files
curl -s -X POST http://192.168.1.110:8080/api/v2/torrents/delete \
-d "hashes=<hash>&deleteFiles=true"
Get torrent trackers
curl -s "http://192.168.1.110:8080/api/v2/torrents/trackers?hash=<hash>"
API — Transfer
Get transfer info (speeds)
curl -s http://192.168.1.110:8080/api/v2/transfer/info | python3 -c \
"import json,sys; d=json.load(sys.stdin); print(f'DL={d[\"dl_info_speed\"]/1024:.0f}KB/s UL={d[\"up_info_speed\"]/1024:.0f}KB/s')"
Get / set speed limits
# Get current limits
curl -s http://192.168.1.110:8080/api/v2/transfer/downloadLimit
curl -s http://192.168.1.110:8080/api/v2/transfer/uploadLimit
# Set limits (bytes/sec, 0 = unlimited)
curl -s -X POST http://192.168.1.110:8080/api/v2/transfer/setDownloadLimit -d "limit=0"
curl -s -X POST http://192.168.1.110:8080/api/v2/transfer/setUploadLimit -d "limit=0"
API — Search
Start a search
curl -s -X POST http://192.168.1.110:8080/api/v2/search/start \
-d "pattern=ubuntu&plugins=all&category=all"
Get search results
curl -s "http://192.168.1.110:8080/api/v2/search/results?id=<search-id>"
What the API/CLI Cannot Do
| Gap | Workaround |
|---|---|
| Cannot configure VPN tunnel (Gluetun handles this) | Modify services/gluetun/docker-compose.yml environment vars |
| Cannot check VPN status from qBittorrent API | Check Gluetun control server: GET http://192.168.1.110:8000/v1/openvpn/status |
| Cannot install search plugins via API | Manually place .py plugin files in the search plugins directory |
| No CLI tool for qBittorrent | API-only; use curl for automation |
| Cannot configure RSS feeds via v2 API easily | Use the web UI for RSS auto-download rules |
| Cannot manage categories via API in all versions | Use web UI or check version-specific API docs |
| Port forwarding is managed by Gluetun, not qBittorrent | Gluetun updates qBittorrent's port via VPN_PORT_FORWARDING_UP_COMMAND |