Skip to content

linyuan0213/qbot

Repository files navigation

QBot build Codacy Badge

logo_transparent

使用 QBot 可以通过 Telegram Bot 轻松下载和管理 Qbittorrent,通过发送文件或者链接即可下载对应资源

安装

为了使用 Qbot 需要安装相关依赖,并且启用 QBittorrent web UI,只支持python3

git clone git@github.com:linyuan0213/qbot.git
cd qbot
pip install -r requirements.txt

配置

编辑 config.yaml,配置 QBittorrent 的用户名、密码和Telegram Bot token,最后需要通过设置环境变量来获取配置文件路径:

export QB_CONF=/path/to/config.yaml

启动

python app.py

通过 docker 安装

docker run -d \
  -e "QB_CONF=/etc/qbot/config.yaml" \
  -v /path/to/config.yaml:/etc/qbot/config.yaml \
  --restart unless-stopped \
  --name qbot \
  linyuan0213/qbot:latest

通过 docker-compose 安装

新建docker-compose.yaml,添加下面命令

version: '3'

services:
  qbot:
    image: ghcr.io/linyuan0213/qbot:latest
    container_name: qbot
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Asia/Shanghai
      - QB_CONF=/etc/qbot/config.yaml
    volumes:
      - /path/to/qbot:/etc/qbot
    restart: unless-stopped

执行 docker-compose up -d