QBittorrentBot is a Telegram bot that allows you to control your qBittorrent client directly through Telegram. With this bot, you can manage your torrent downloads, add magnet links, and much more—all from within your chat.
You can add multiple magnet links by simply placing one per line:
magnet:?xt=...
magnet:?xt=...
The bot allows you to:
- List active torrents
- Pause/resume torrents
- Delete torrents
- Add, remove, and modify categories
Since version V2, the configuration format has changed. Please ensure your configuration file is updated correctly before starting the bot.
As part of the transition to Aiogram, you no longer need the API_ID and API_HASH. You only need your bot_token to authenticate with the Telegram API.
QBittorrentBot now uses a YAML configuration file, replacing the old JSON format. The new configuration format includes settings for the qBittorrent client, Telegram bot, Redis (optional), and user roles.
Here’s an example configuration (config.yml):
client:
type: qbittorrent
host: http://localhost:8080/
user: admin
password: adminadmin
redis:
url: redis://localhost:6379/0
telegram:
bot_token: PUT_YOUR_TELEGRAM_BOT_TOKEN_HERE
proxy: null
users:
- user_id: 123456789
role: administrator
notify: true
notification_filter: null
locale: en
- user_id: 987654321
role: manager
notify: true
notification_filter:
- Movies
- TV
locale: es
- user_id: 192837465
role: reader
notify: false
notification_filter: null
locale: itclient: Configuration for the qBittorrent client (host, username, password).telegram: Telegram bot settings (bot token, proxy settings if applicable).redis: Optional, for Redis configuration (useful for persistence and session management).users: List of users, each with settings for notifications, locale, and role.
- If
notifyis set totrue, the user will receive notifications when a torrent finishes downloading.
To run QBittorrentBot with Docker, follow these steps:
-
Clone the repository:
git clone https://github.com/ch3p4ll3/QBittorrentBot.git
-
Move into the project directory:
cd QBittorrentBot -
Create your
config.ymlfile. -
In the project folder, navigate to the
docker/directory, where thedocker-compose.ymlexample file is located.docker compose up -d
The docker-compose.yml file should already be pre-configured for you. It will automatically build the image and start the container.
This method will also mount the /app/config/ volume, ensuring that the bot uses your configuration settings.
If you prefer to run the bot natively, follow these steps. This project uses uv for high-performance dependency management.
git clone https://github.com/ch3p4ll3/QBittorrentBot.git
cd QBittorrentBotIf you don't have uv installed yet, follow the official installation guide.
Create your config.yml file based on the provided template.
You don't need to manually install requirements into a global environment. Simply run:
uv run python -m src.mainNote:
uvwill automatically create a virtual environment, install the necessary dependencies from yourpyproject.tomlorrequirements.txt, and execute the bot as a module.
Using python -m src.main instead of python3 main.py ensures that the Python interpreter correctly recognizes the src folder as a package, preventing common ImportError issues with relative paths.
QBittorrentBot is an open-source project that thrives with contributions from the community. If you’re multilingual and want to help make QBittorrentBot accessible to more users, you can contribute translations via Transifex.
Here’s how you can help:
- Visit the QBittorrentBot Transifex Project.
- Sign up or log in to your Transifex account.
- Navigate to the "Languages" tab and select the language you’d like to contribute to.
- Find the string you want to translate and submit your translation.
- If your language isn’t listed, you can request its addition.
- Once your translations are reviewed and approved, they will be included in the project.
Thank you for contributing!
To allow the bot to interact with your qBittorrent client, you need to enable the Web UI. Here’s how to do it:
- Open qBittorrent and go to the menu bar.
- Navigate to Tools > Options.
- In the new window, select the Web UI tab.
- Enable Enable the Web User Interface (Remote control).
- Choose a port (default is 8080).
- Set a username and password (default: admin / adminadmin).
Click OK to save the settings.
Thanks goes to these wonderful people (emoji key):
Bogdan 💻 |
joey00797 🌍 |
Rodolfo Ortega 🌍 |
Andrew Miroshnichenko 💻 🐛 |
This project follows the all-contributors specification. Contributions of any kind welcome!