A lightweight, self-hosted torrent manager with a modern web UI. Built with FastAPI, libtorrent, and React.
- Web UI — Clean, responsive dark interface with real-time updates via WebSocket
- User management — Multi-user with admin/user roles and granular permissions
- Categories — Organize torrents with color-coded categories
- RSS feeds — Auto-download torrents from RSS feeds with pattern matching
- Scheduler — Interactive 24x7 speed schedule grid
- Storage options — Local, NFS/SMB mount, or FTP upload on completion
- Mount helper — Mount/unmount SMB and NFS shares directly from the UI
- IP filtering — Block peers by IP range
- *arr integration — qBittorrent API v2 compatible, works with Sonarr, Radarr, Lidarr, etc.
- Webhooks — Notify external services on torrent completion
- Resume data — Torrents persist across restarts
- Resource limits — Built-in memory and CPU limits via systemd
| Component | Technology |
|---|---|
| Backend | Python 3, FastAPI, libtorrent |
| Frontend | React 18, Vite |
| Database | SQLite (SQLAlchemy) |
| Auth | JWT via HttpOnly cookies |
| Service | systemd |
On a fresh Ubuntu 22.04+ or Debian 12+ server:
git clone https://github.com/HajDEO/Bittora.git /opt/bittora
cd /opt/bittora
sudo bash install.shThe installer handles everything: dependencies, Node.js, system user, directories, frontend build, systemd service, and sudoers rules for mount operations.
cd /opt/bittora
sudo bash install.shThe installer detects an existing installation and runs in update mode: pulls latest code, ensures all system dependencies are present, rebuilds frontend, updates sudoers and systemd service, and restarts. Your config.json is never overwritten.
Step-by-step instructions
# 1. System deps
sudo apt update
sudo apt install python3 python3-pip python3-libtorrent git curl ca-certificates gnupg smbclient nfs-common cifs-utils
# 2. Node.js 22.x
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash -
sudo apt install nodejs
# 3. Clone
sudo git clone https://github.com/HajDEO/Bittora.git /opt/bittora
# 4. Python deps
PIP_BREAK_SYSTEM_PACKAGES=1 sudo python3 -m pip install --ignore-installed -r /opt/bittora/requirements.txt
# 5. Frontend
cd /opt/bittora/frontend
sudo npm install
sudo npm run build
# 6. System user + dirs
sudo useradd -r -s /usr/sbin/nologin -d /opt/bittora bittora
sudo mkdir -p /srv/bittora/downloads /var/lib/bittora /var/log/bittora /mnt/bittora
# 7. Config
sudo cp /opt/bittora/config.example.json /opt/bittora/config.json
# Edit config.json and set a random secret:
# python3 -c "import secrets; print(secrets.token_hex(32))"
# 8. Permissions
sudo chown -R bittora:bittora /opt/bittora /srv/bittora /var/lib/bittora /var/log/bittora
sudo chmod +x /opt/bittora/start.sh
# 9. Systemd
sudo cp /opt/bittora/bittora.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now bittoraconfig.json in the project root:
| Field | Default | Description |
|---|---|---|
port |
8080 |
Web UI and API port |
lang |
en |
Language (en, sk) |
download_dir |
/srv/bittora/downloads |
Default download directory |
data_dir |
/var/lib/bittora |
Database and resume data |
log_dir |
/var/log/bittora |
Log files |
secret |
(generated) | JWT signing secret (keep private!) |
Bittora exposes a qBittorrent-compatible API v2, so Sonarr, Radarr, Lidarr, and other *arr apps can use it as a download client.
Setup in Sonarr/Radarr:
- Go to Settings > Download Clients > Add > qBittorrent
- Set:
- Host: your server IP
- Port:
8080(or your configured port) - Username: your Bittora username
- Password: your Bittora password
- Click Test then Save
The following qBittorrent API v2 endpoints are implemented:
POST /api/v2/auth/login— authenticate (returns SID cookie)GET /api/v2/app/version— app versionGET /api/v2/app/webapiVersion— API versionGET /api/v2/app/preferences— app preferencesGET /api/v2/torrents/info— list torrentsGET /api/v2/torrents/properties— torrent detailsPOST /api/v2/torrents/add— add torrent (magnet or .torrent file)POST /api/v2/torrents/pause— pause torrentsPOST /api/v2/torrents/resume— resume torrentsPOST /api/v2/torrents/delete— delete torrentsGET /api/v2/torrents/categories— list categoriesGET /api/v2/transfer/info— transfer stats
| Username | Password |
|---|---|
admin |
admin |
You will be prompted to change the password on first login.
sudo systemctl status bittora # Check status
sudo systemctl restart bittora # Restart
sudo systemctl stop bittora # Stop
journalctl -u bittora -f # Follow logs