Sign inSign up

80x86/qbittorrent

By 80x86

Updated almost 2 years ago

[v4.6.0] amd64/arm64(aarch64) / auto https(ACME) / Log viewer

Image
209

1M+

80x86/qbittorrent repository overview

the latest stable version is 4.6.0-39-minimal-amd64-full

tag name with nova has been renamed to full ( full means has builtin python3 support for qb torrent search engine)

the old version tag name with nova means has python3 support (for qb torrent search engine), now it is full

tagdescription
4.6.0-39-minimal-amd64-fullbased on fedora minimal image, builtin Python
4.6.0-39-minimal-amd64based on fedora minimal image, no Python

80x86/qbittorrent pull stats

https://hub.docker.com/r/80x86/qbittorrent

qBittorrent NoX is the headless with remote web interface version of qBittorrent BitTorrent client.

changelog

*20231028: update to qb 4.6.0

  • 20200325: new version qb 4.2.2, default https, automatic HTTPS support via ACME added

  • 20191219: new version qb 4.2.1

  • 20191209: new version qb 4.2.0 (with new tag: 4.2.0 , not latest)

  • auto category feature added, for old container, you can setup "Run external program on torrent completion" to /usr/local/bin/qb-auto-cat -h %I in qb WEB UI

  • 20191115: rollback to qb 4.1.9 due to version number problem (some PT only allow qb 4.X.X version)

  • 20191113: upgraded to qb 4.1.9.1

  • 20190829: fixup js memory leak in log tab


Feature

  1. Automatic HTTPS support via ACME
  2. Automatic categorization torrent based on tracker hostname (Private Trackers only)
  3. Automatic tagging not working torrent to special tag 0xDEADBEEF
  4. Log viewer added to the WEB UI
  5. Optimized WEB UI based on usage experience

attention

  1. this container is SSL default but you can change to http in the WEB UI.

    you need to remove the cookie named SID in your browser after the protocol changed.

  2. no latest tag !!! use specific tag please

    the examples below uses 4.4.2-amd64 as the tag,

    in the real world, you should always check and use the newest available tag

  3. do not just copy and paste the sample commands below

    you need to modify the commands for your needs!

  4. change tag from xxx-amd64 to xxx-arm64 if you are on a aarch64/arm64 machine


volume must map

containerdescription
/configdir to save qBittorrent configuration files
/datadir to save qBittorrent data (include BT_backup directory which stored torrents)
/downloadsqBittorrent default download location

env var

namedefault valuedescription
PUID1000run as uid
PGID100run as gid
UMASK_SET000umask for app running user
WEB_PORT8080http or https listen port
BT_PORT8999BT listen port (both tcp and udp)
QBT_GEOIP_DB_URLURL for downloading GeoLite2-Country.mmdb.gz
FB_AUTH_SERVER_ADDR127.0.0.1dashboard IP, for auto authenticate with dashboard

config file path

config file/dircontainerdescription
qBittorrent.conf/config/qBittorrent.confconfig file
qBittorrent-data.conf/config/qBittorrent-data.confstats data file
ssl.crt/config/ssl.crtSSL certificate
ssl.key/config/ssl.keySSL private key
rss/feeds.json/config/rss/feeds.jsonRSS feeds
BT_backup/data/BT_backup.torrent and .fastresume files goes here
GeoLite2-Country.mmdb/data/GeoIP/GeoLite2-Country.mmdb
*.py/data/nova3/engines/nova3 search engine plugins
/data/rss/articles/RSS articles data
qbittorrent.log/data/logs/qbittorrent.loglog file

How to use this image

This image is:

  • Small: :latest is based on official Alpine Docker image.
  • Simple: Exposes correct ports, configured for remote access...
Usage

start it using this command:

    $ WEB_PORT=8082
    $ BT_PORT=8999
    $ mkdir -p config data downloads
 $ podman run -d --name qbittorrent \
  -e PUID=$UID \
  -e PGID=$GID \
  -e WEB_PORT=8082 \
  -e BT_PORT=8999 \
  --restart=always \
  -p $WEB_PORT:$WEB_PORT -p $BT_PORT:$BT_PORT/tcp -p $BT_PORT:$BT_PORT/udp \
  -v $PWD/config:/config \
  -v $PWD/data:/data \
  -v $PWD/downloads:/downloads \
  80x86/qbittorrent:4.2.2-amd64

... to run as yourself and have WebUI running on https://localhost:8082 (username: admin, password: adminadmin) with config in the following locations mounted:

  • /config: qBittorrent configuration files
  • /data: qBittorrent data directory(include BT_backup directory which stored torrents)
  • /downloads: Download location

Note: By default it runs as UID 2048 and GID 2048, but can run as any user/group.

It is probably a good idea to add --restart=always so the container restarts if it goes down.

You can change 8999 to some random port number (also change in the settings).

Note: For the container to run, the legal notice had to be automatically accepted. By running the container, you are accepting its terms. Toggle the flag in qBittorrent.conf to display the notice again.

Note: 2048 was chosen randomly to prevent running as root or as another known user on your system; at least until issue #11253 is fixed.


How to Enable Automatic HTTPS via ACME (let's encrypt by default)

take cloudflare for example, your need add following env vars:

-e AUTOCERT_EMAIL=your-email-for-acme \
-e AUTOCERT_DOMAIN=you-domain.com \
-e AUTOCERT_DNS_PROVIDER=cloudflare \
-e CF_DNS_API_TOKEN="your-cf-token-here" \

an full example:

$ WEB_PORT=8082
$ BT_PORT=8999
$ mkdir -p config data downloads
$ podman run -d --name qbittorrent \
 -e PUID=$UID \
 -e PGID=$GID \
 -e WEB_PORT=8082 \
 -e BT_PORT=8999 \
 -e [email protected] \
 -e AUTOCERT_DOMAIN=you-domain.com \
 -e AUTOCERT_DNS_PROVIDER=cloudflare \
 -e CF_DNS_API_TOKEN="your-cf-token-here" \
 --restart=always \
 -p $WEB_PORT:$WEB_PORT -p $BT_PORT:$BT_PORT/tcp -p $BT_PORT:$BT_PORT/udp \
 -v $PWD/config:/config \
 -v $PWD/data:/data \
 -v $PWD/downloads:/downloads \
 80x86/qbittorrent:4.2.2-amd64

attenion: change $PWD/config ... to your own path, DO NOT copy and paste!

# ACME related env vars
# acme check interval in hours, default to 24 hours
GO_ACME_INTERVAL=24

# change CA server to `https://acme-staging-v02.api.letsencrypt.org/directory` if you want to test
GO_ACME_CA_SERVER=""

# set to http://IP:PORT if you want to use http proxy for ACME
HTTP_PROXY=""
AUTOCERT_EMAIL=""

# ACME domain like `foo.com`, can be multi like `foo.com,b.bar.com`, can be wildcard like `*.foo.com`
AUTOCERT_DOMAIN=""

# must be one of `RSA2048`, `RSA4096`, `RSA8192`, `EC256`, `EC384`  
AUTOCERT_KEYTYPE=EC256

# ACME DNS provider, default is cloudflare
AUTOCERT_DNS_PROVIDER=cloudflare

# this env var is only used by `cloudflare` DNS provider
CF_DNS_API_TOKEN=""

ACME additional env var for DNS provider

availabel DNS providers
alidns,azure,cloudflare,cloudxns,digitalocean,dnspod,gcloud,linodev4,namecheap,qcloud,rfc2136,vultr

cloudflare:

get token from "My Profile -> API Tokens" API token must include the following permissions: Zone.Zone: Read Zone.DNS: Edit Zone Resources: All zones

Environment Variable Namedescription
CF_DNS_API_TOKENAPI Token

dnspod:

Environment Variable Namedescription
DNSPOD_API_KEYformat is: id,token

qcloud:

Environment Variable Namedescription
QCLOUD_SECRET_IDThe SecretId
QCLOUD_SECRET_KEYThe SecretKey

alidns:

Environment Variable Namedescription
ALICLOUD_ACCESS_KEYAccess key ID
ALICLOUD_SECRET_KEYAccess Key secret

for other provider please ref to: https://go-acme.github.io/lego/dns/#dns-providers

ACME Testing

To test or experiment with your configuration,

make sure you change the ACME endpoint to a staging or development URL,

otherwise you are likely to hit rate limits which can block your access to HTTPS for up to a week,

depending on which rate limit you hit.

the default CA is Let's Encrypt, which has a staging endpoint that is not subject to the same rate limits:

https://acme-staging-v02.api.letsencrypt.org/directory

you can set it for your container by using env var

GO_ACME_CA_SERVER="https://acme-staging-v02.api.letsencrypt.org/directory"


more detailed example
use bridged network
# begin config
WEB_PORT=http listen port
DOWNLOAD_PATH="download dir"
BT_PORT=bt incoming port
CFG_PATH="config dir"
DATA_PATH="data dir"
RUN_USER="qbittorrent"
# end config

IMAGE_NAME=80x86/qbittorrent:4.2.2-amd64
QBT_AUTH_SERVER_ADDR=$(ip -4 addr show docker0 | grep inet | awk '{print $2}' | cut -d'/' -f1)
podman run -d --name qbittorrent \
        -e PUID=$(id -u $RUN_USER) \
  -e PGID=$(id -g $RUN_USER) \
        -e WEB_PORT=$WEB_PORT \
        -e BT_PORT=$BT_PORT \
        -e QBT_AUTH_SERVER_ADDR=$QBT_AUTH_SERVER_ADDR \
        --restart unless-stopped \
        -p $WEB_PORT:$WEB_PORT -p $BT_PORT:$BT_PORT/tcp -p $BT_PORT:$BT_PORT/udp \
        -v "$CFG_PATH":/config \
        -v "$DATA_PATH":/data \
        -v "$DOWNLOAD_PATH":/downloads \
        --mount type=tmpfs,destination=/tmp \
        ${IMAGE_NAME}

use hosted network

# begin config
WEB_PORT=http listen port
DOWNLOAD_PATH="download dir"
BT_PORT=bt incoming port
CFG_PATH="config dir"
DATA_PATH="data dir"
RUN_USER="qbittorrent"
# end config

IMAGE_NAME=80x86/qbittorrent:4.2.2-amd64
QBT_AUTH_SERVER_ADDR="127.0.0.1"
podman run -d --name qbittorrent \
        -e PUID=$(id -u $RUN_USER) \
  -e PGID=$(id -g $RUN_USER) \
        -e WEB_PORT=$WEB_PORT \
        -e BT_PORT=$BT_PORT \
        -e QBT_AUTH_SERVER_ADDR=$QBT_AUTH_SERVER_ADDR \
        --restart unless-stopped \
        --network host \
        -v "$CFG_PATH":/config \
        -v "$DATA_PATH":/data \
        -v "$DOWNLOAD_PATH":/downloads \
        --mount type=tmpfs,destination=/tmp \
        ${IMAGE_NAME}

for NanoDM users
NanoDM migration: use bridged network
IMAGE_NAME=80x86/qbittorrent:4.2.2-arm64
WEB_PORT=$(nvram get app.qb.listen_port)
DOWNLOAD_PATH=$(cat /var/lib/qbittorrent/.config/qBittorrent/qBittorrent.conf | grep -i 'Downloads\\SavePath' | cut -d'=' -f2)
BT_PORT=$(cat /var/lib/qbittorrent/.config/qBittorrent/qBittorrent.conf | grep -i 'Connection\\PortRangeMin' | cut -d'=' -f2)
QBT_AUTH_SERVER_ADDR=$(ip -4 addr show docker0 | grep inet | awk '{print $2}' | cut -d'/' -f1)
if [ "$DOWNLOAD_PATH" = "/downloads" ] || [ "$DOWNLOAD_PATH" = "/downloads/" ]; then
 echo "please set correct DOWNLOAD_PATH"
 exit -1
fi
podman run -d --name qbittorrent \
  -e PUID=$(id -u qbittorrent) \
  -e PGID=$(cat /etc/group | grep -e '^users' | cut -d':' -f3) \
  -e WEB_PORT=$WEB_PORT \
  -e BT_PORT=$BT_PORT \
  -e QBT_AUTH_SERVER_ADDR=$QBT_AUTH_SERVER_ADDR \
  --restart unless-stopped \
  -p $WEB_PORT:$WEB_PORT -p $BT_PORT:$BT_PORT/tcp -p $BT_PORT:$BT_PORT/udp \
  -v /var/lib/qbittorrent/.config/qBittorrent:/config \
  -v /var/lib/qbittorrent/.local/share/data/qBittorrent:/data \
  -v "$DOWNLOAD_PATH":/downloads \
  --mount type=tmpfs,destination=/tmp \
  ${IMAGE_NAME}
NanoDM migration: use hosted network
IMAGE_NAME=80x86/qbittorrent:4.2.2-arm64
WEB_PORT=$(nvram get app.qb.listen_port)
DOWNLOAD_PATH=$(cat /var/lib/qbittorrent/.config/qBittorrent/qBittorrent.conf | grep -i 'Downloads\\SavePath' | cut -d'=' -f2)
BT_PORT=$(cat /var/lib/qbittorrent/.config/qBittorrent/qBittorrent.conf | grep -i 'Connection\\PortRangeMin' | cut -d'=' -f2)
QBT_AUTH_SERVER_ADDR="127.0.0.1"
if [ "$DOWNLOAD_PATH" = "/downloads" ] || [ "$DOWNLOAD_PATH" = "/downloads/" ]; then
 echo "please set correct DOWNLOAD_PATH"
 exit -1
fi
podman run -d --name qbittorrent \
  -e PUID=$(id -u qbittorrent) \
  -e PGID=$(cat /etc/group | grep -e '^users' | cut -d':' -f3) \
  -e WEB_PORT=$WEB_PORT \
  -e BT_PORT=$BT_PORT \
  -e QBT_AUTH_SERVER_ADDR=$QBT_AUTH_SERVER_ADDR \
  --restart unless-stopped \
  --network host \
  -v /var/lib/qbittorrent/.config/qBittorrent:/config \
  -v /var/lib/qbittorrent/.local/share/data/qBittorrent:/data \
  -v "$DOWNLOAD_PATH":/downloads \
  --mount type=tmpfs,destination=/tmp \
  ${IMAGE_NAME}

Image Variants

80x86/qbittorrent:<version>

Those are tagged versions built from source code.

based on Alpine Linux

User Feedbacks

Having more issues? Report a bug on GitHub.

Tag summary

Content type

Image

Digest

sha256:5a859c779

Size

119.3 MB

Last updated

almost 3 years ago

docker pull 80x86/qbittorrent