> For AI agents: the complete documentation index is available at https://www.tteam.icu/llms.txt, the full documentation bundle is available at https://www.tteam.icu/llms-full.txt.

# qbittorrent

qBittorrent 是常用的 BT 下载工具，自建 Web UI 后可以在服务器或 NAS 上统一管理下载任务。

[开源地址](https://github.com/qbittorrent/qBittorrent)

## 快速启动

```yml file="./qbittorrent/docker-compose.yml" title="docker-compose.yml"
---
services:
    qbittorrent:
        image: lscr.io/linuxserver/qbittorrent:latest
        container_name: qbittorrent
        network_mode: host
        environment:
            - PUID=0
            - PGID=0
            - TZ=Asia/Shanghai
            - WEBUI_PORT=8080
            - TORRENTING_PORT=6881
        volumes:
            - ./config:/config
            - ./downloads:/downloads
        restart: unless-stopped
```

## 做种

[开源地址](https://github.com/autobrr/mkbrr)

`mkbrr` 可以用来创建和检查 `.torrent` 文件。下面示例会从 tracker 列表中生成 tracker 参数，再为指定文件创建种子。

```shell
docker run -it --rm -v "$(pwd):/data" --entrypoint /bin/sh ghcr.io/autobrr/mkbrr:latest -c "
apk add --no-cache curl && \
TRACKERS=\$(curl -s https://cf.trackerslist.com/all.txt | grep -v '^$' | xargs -I {} echo -n '--tracker {} ') && \
mkbrr create --workers 4 --private=false \"/data/ktv-2.mkv\" --output \"/data/ktv-2.torrent\" \$TRACKERS
"
```

创建完成后，可以查看种子信息，确认文件大小、分片和 tracker 是否符合预期。

```shell
docker run --rm -v "$(pwd):/data" --entrypoint /bin/sh ghcr.io/autobrr/mkbrr:latest -c "mkbrr inspect /data/ktv-2.torrent"
```
