qBittorrent

qBittorrent

qbittorrent-nox

CLI 的 QB。适合跑在 seedbox 上。

apt-get install qbittorrent-nox
qbittorrent-nox # 启动 QB(占用当前终端)

QB 配置文件: ~/.config/qBittorrent/qBittorrent.conf

[preferences]
Connection\Interface=* # 设置 Web UI 监听 IP 为所有。默认监听 127.0.0.1

配置为开机自启动服务

vi /etc/systemd/system/qbittorrent.service

[Unit]
Description=qBittorrent-nox service
Documentation=man:qbittorrent-nox(1)
Wants=network-online.target
After=network-online.target nss-lookup.target

[Service]
# if you have systemd < 240 (Ubuntu 18.10 and earlier, for example), you probably want to use Type=simple instead
Type=exec
# change user as needed
User=root
# The -d flag should not be used in this setup
ExecStart=/usr/bin/qbittorrent-nox
# uncomment this for versions of qBittorrent < 4.2.0 to set the maximum number of open files to unlimited
#LimitNOFILE=infinity
# uncomment this to use "Network interface" and/or "Optional IP address to bind to" options
# without this binding will fail and qBittorrent's traffic will go through the default route
# AmbientCapabilities=CAP_NET_RAW

[Install]
WantedBy=multi-user.target

运行

systemctl daemon-reload # 使上面新增的 QB 服务配置生效
systemctl enable --now qbittorrent

Docker 运行

mkdir -p /root/files/appdata/qbittorrent/config /root/files/appdata/qbittorrent/download

docker run -d \
  --name=qbittorrent \
  -e TZ=Etc/UTC \
  -e WEBUI_PORT=9003 \
  -p 9003:9003 \
  -p 9004:9004 \
  -p 9004:9004/udp \
  -v /root/files/appdata/qbittorrent/config:/config \
  -v /root/files/appdata/qbittorrent/downloads:/downloads \
  --restart unless-stopped \
  linuxserver/qbittorrent:4.5.2

Last update: 2023-04-11 07:10:20 UTC