
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这段话即可:
请先阅读并遵守:https://xuanyuan.cloud/agents.md
未读文档前不要生成 pull 命令或排错方案。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Repository on Docker Hub: https://hub.docker.com/r/qbittorrentofficial/qbittorrent-nox
Repository on GitHub: https://github.com/qbittorrent/docker-qbittorrent-nox
If the problem is related to Docker, please report it to this repository:
https://github.com/qbittorrent/docker-qbittorrent-nox/issues
If the problem is with qBittorrent, please report the issue to its main repository:
https://github.com/qbittorrent/qBittorrent/issues
In order to run this image you will need Docker installed: https://docs.docker.com/get-docker/
If you don't need the GUI, you can just install Docker Engine: https://docs.docker.com/engine/install/
It is also recommended to install Docker Compose as it can simplify the process significantly: https://docs.docker.com/compose/install/
You can either git clone this repository or https://github.com/qbittorrent/docker-qbittorrent-nox/archive/refs/heads/main.zip as a zip archive.
If you are using Docker Stack, refer to https://github.com/qbittorrent/docker-qbittorrent-nox/blob/main/docker-stack.yml file as an example.
It is an almost ready-to-use configuration, though a few variables need to be filled in. Make sure you read the following steps as they largely share the same concept.
If you are not using Docker Compose, you can skip editing the environment file. However, the variables presented below are crucial for later steps, so make sure you understand them.
Find and open the .env file in the repository you cloned (or the .zip archive you downloaded).
There are a few variables that you must set before you can run the image.
You can find the meanings of these variables in the following section. Make sure you understand every one of them.
Environment variables
QBT_LEGAL_NOTICE confirm only if you have read the legal notice.QBT_VERSION latest, a https://hub.docker.com/r/qbittorrentofficial/qbittorrent-nox/tags: 4.4.5-1 or the bleeding-edge weekly build: alpha. lt2 variation which uses libtorrent v2.0.x is also available. However, users have reported https://github.com/arvidn/libtorrent/issues/6667 so use at your own risk!QBT_TORRENTING_PORT 6881 if value is not set.QBT_WEBUI_PORT 8080 if value is not set.Volumes
<your_path>/config <your_path>/downloads If using Docker (not Docker Compose), edit the variables and run:
shellexport \ QBT_LEGAL_NOTICE=<put_confirm_here> \ QBT_VERSION=latest \ QBT_TORRENTING_PORT=6881 \ QBT_WEBUI_PORT=8080 \ QBT_CONFIG_PATH="<your_path>/config" \ QBT_DOWNLOADS_PATH="<your_path>/downloads" docker run \ -t \ --name qbittorrent-nox \ --read-only \ --rm \ --stop-timeout 1800 \ --tmpfs /tmp \ -e QBT_LEGAL_NOTICE \ -e QBT_TORRENTING_PORT \ -e QBT_WEBUI_PORT \ -p "$QBT_TORRENTING_PORT":"$QBT_TORRENTING_PORT"/tcp \ -p "$QBT_TORRENTING_PORT":"$QBT_TORRENTING_PORT"/udp \ -p "$QBT_WEBUI_PORT":"$QBT_WEBUI_PORT"/tcp \ -v "$QBT_CONFIG_PATH":/config \ -v "$QBT_DOWNLOADS_PATH":/downloads \ qbittorrentofficial/qbittorrent-nox:${QBT_VERSION}
If using Docker Compose:
shelldocker compose up
Tweaking the options
The image value can be changed to ghcr.io/qbittorrent/docker-qbittorrent-nox:${QBT_VERSION} to use the GitHub mirror.
To pass additional command-line arguments to qbittorrent-nox, append them to the end of the docker run ... command.
If using Docker Compose, modify the command: array in https://github.com/qbittorrent/docker-qbittorrent-nox/blob/main/docker-compose.yml.
⚠️ To ensure qBittorrent has enough time to shut down properly, you must override the container's stop timeout.
If unspecified, the default value is only 10 seconds, which is too short and can interrupt the shutdown procedure,
leading to corrupted files.
Set --stop-timeout 1800 (or stop_grace_period: 30m when using Docker Compose).
To change the timezone in the container, set the TZ environment variable to your preferred value.
The default is inherited from Alpine Linux, which is most likely UTC.
To change the User ID (UID) and Group ID (GID) of the qbittorrent-nox process, set the
environment variables PUID and PGID respectively.
The default is 1000 for both.
--read-only flag (when using Docker) or set
read_only: false (when using Docker Compose), as these settings are incompatible.To set additional group IDs (AGID) for the qbittorrent-nox process, set the
environment variable PAGID. For example: 10000,10001. This will set the process to be in
two (secondary) groups, 10000 and 10001.
By default, there are no additional groups.
--read-only flag (when using Docker) or set
read_only: false (when using Docker Compose), as these settings are incompatible.To set the umask of the qbittorrent-nox process, set the environment variable UMASK.
The default is inherited from Alpine Linux.
To list the compile-time Software Bill of Materials (SBOM), run:
shelldocker run --entrypoint /bin/cat --rm qbittorrentofficial/qbittorrent-nox:latest /sbom.txt
Log in to qBittorrent-nox at: http://<your_docker_host_address>:8080
For newer qBittorrent versions (≥ 4.6.1), qBittorrent will generate a temporary password and print it to the console (via stdout).
You will need to use this password to log in. See the announcement.
If you don't have a console attached, you can run the following to view the logs:
shelldocker logs qbittorrent-nox
For older qBittorrent versions (< 4.6.1), the default username/password is: admin/adminadmin.
[!IMPORTANT] Don't forget to change your password after logging in!
To change it in WebUI:Toolsmenu ->Options...->WebUItab ->Authentication
When using Docker (not Docker Compose):
shelldocker stop qbittorrent-nox
When using Docker Compose:
shelldocker compose down
Refer to the https://github.com/qbittorrent/docker-qbittorrent-nox/tree/main/manual_build folder.
To attach the GNU Debugger (gdb) to the running qbittorrent-nox process, follow the steps below:
Before you start the container
--read-only because additional packages are needed inside the container. --cap-add=SYS_PTRACE to the docker run argument list. Start the container
Drop into the container
shell# find container ID docker ps # open an interactive shell in the container docker exec -it <container_id> /bin/sh
Install packages
shellapk add \ gdb \ musl-dbg
Attach gdb to the running process
shell# find the PID of qbittorrent-nox ps -a # attach the debugger to the process gdb -p <PID>
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 qbittorrentofficial/qbittorrent-nox 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: