dockerhub地址

https://hub.docker.com/r/linuxserver/qbittorrent

cli命令

1
2
3
4
5
6
7
8
9
10
11
12
13
docker run -d \
--name=qbittorrent \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e WEBUI_PORT=8080 \
-p 8080:8080 \
-p 6881:6881 \
-p 6881:6881/udp \
-v /path/to/appdata/config:/config \
-v /path/to/downloads:/downloads \
--restart unless-stopped \
lscr.io/linuxserver/qbittorrent:latest

我的命令

1
2
3
4
5
6
7
8
9
10
11
12
13
sudo docker run -d \
--name=qbittorrent \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Asia/Shanghai \
-e WEBUI_PORT=8080 \
-p 9091:8080 \
-p 6881:6881 \
-p 6881:6881/udp \
-v /volume2/docker/qbittorrent/config:/config \
-v /volume1/qbittorrent:/downloads \
--restart unless-stopped \
lscr.io/linuxserver/qbittorrent:latest

然后停止docker,在qBittorrent.conf中添加一行,然后再启动。

1
WebUI\HostHeaderValidation=false

然后访问: http://192.168.1.189:9091
默认密码:admin adminadmin
然后进入界面修改即可。

compose文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version: "3"
services:
qbittorrent:
container_name: qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Shanghai
- WEBUI_PORT=8080
ports:
- 9091:8080
- 6881:6881
- 6881:6881/udp
volumes:
- ./config:/config
- /home/Disk/Synology/qbittorrent:/downloads
restart: unless-stopped
image: lscr.io/linuxserver/qbittorrent:latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
network_mode: bridge