Skip to content

Docker 和 Compose 安装 Qbittorrent ​

官方镜像:https://hub.docker.com/r/linuxserver/qbittorrent

Github: https://github.com/linuxserver/docker-qbittorrent

Docker 安装 ​

shell
docker run -d \
  --name=qbittorrent \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Asia/Shanghai \
  -e WEBUI_PORT=8080 \
  -e TORRENTING_PORT=6881 \
  -p 8080:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /opt/qbittorrent/config:/config \
  -v /opt/qbittorrent/downloads:/downloads \
  --restart=unless-stopped \
  linuxserver/qbittorrent:5.2.3

# 查看默认密码
docker logs qbittorrent | grep 'temporary password'

Docker Compose 安装 ​

shell
services:
  qbittorrent:
    image: linuxserver/qbittorrent:5.2.3
    container_name: qbittorrent
    restart: unless-stopped
    ports:
      - "8080:8080"
      - "6881:6881"
      - "6881:6881/udp"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Shanghai
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    volumes:
      - /opt/qbittorrent/config:/config
      - /opt/qbittorrent/downloads:/downloads

登录地址:http://localhost:8080

默认用户名:admin

密码默认启动容器时随机生成一个,并打印在启动日志中。在日志中找到密码,然后登录。登录成功后,通过页面修改密码,否则每次启动容器,就会生成一个新密码打印在启动日志中。

如果要修改 WEB UI 端口,需要做以下修改:

shell
# 原来的端口为:
-e WEBUI_PORT=8080 -p 8080:8080

# 要修改为 8090 的话,上面的参数需要修改为:
-e WEBUI_PORT=8080 -p 8090:8080
# 或者直接一把全改
-e WEBUI_PORT=8090 -p 8090:8090