Add torrenting port configuration support

This commit is contained in:
Attila Gonda 2024-02-10 10:57:13 +00:00
parent 6d3d9697e1
commit e0e573c248
3 changed files with 20 additions and 1 deletions

View file

@ -80,6 +80,12 @@ Due to issues with CSRF and port mapping, should you require to alter the port f
For example, to set the port to 8090 you need to set -p 8090:8090 and -e WEBUI_PORT=8090
### TORRENTING_PORT
A bittorrent client can be an active or a passive node. Running your client as an active node has the advantage of being able to connect to both active and passive peers, and can potentially increase the number of incoming connections. This requires an open port on the host machine which might differ from container's internal one.
Similarly to the WEBUI_PORT, to set the port to 6887 you need to pass -p 6887:6887, -p 6887:6887/udp and -e TORRENTING_PORT=6887 arguments to Docker.
## Usage
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
@ -97,6 +103,7 @@ services:
- PGID=1000
- TZ=Etc/UTC
- WEBUI_PORT=8080
- TORRENTING_PORT=6881
volumes:
- /path/to/appdata/config:/config
- /path/to/downloads:/downloads
@ -116,6 +123,7 @@ docker run -d \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e WEBUI_PORT=8080 \
-e TORRENTING_PORT=6881 \
-p 8080:8080 \
-p 6881:6881 \
-p 6881:6881/udp \
@ -138,6 +146,7 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e WEBUI_PORT=8080` | for changing the port of the web UI, see below for explanation |
| `-e TORRENTING_PORT=6881` | for changing the port of tcp/udp connection, see below for explanation |
| `-v /config` | Contains all relevant configuration files. |
| `-v /downloads` | Location of downloads on disk. |
@ -302,6 +311,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **10.02.24:** - Add torrenting port support.
* **31.01.24:** - Remove obsolete compat packages.
* **25.12.23:** - Only pull stable releases of qbittorrent-cli.
* **07.10.23:** - Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar).

View file

@ -33,6 +33,7 @@ param_ports:
param_usage_include_env: true
param_env_vars:
- { env_var: "WEBUI_PORT", env_value: "8080", desc: "for changing the port of the web UI, see below for explanation"}
- { env_var: "TORRENTING_PORT", env_value: "6881", desc: "for changing the port of tcp/udp connection, see below for explanation" }
# application setup block
app_setup_block_enabled: true
@ -49,8 +50,15 @@ app_setup_block: |
For example, to set the port to 8090 you need to set -p 8090:8090 and -e WEBUI_PORT=8090
### TORRENTING_PORT
A bittorrent client can be an active or a passive node. Running your client as an active node has the advantage of being able to connect to both active and passive peers, and can potentially increase the number of incoming connections. This requires an open port on the host machine which might differ from container's internal one.
Similarly to the WEBUI_PORT, to set the port to 6887 you need to pass -p 6887:6887, -p 6887:6887/udp and -e TORRENTING_PORT=6887 arguments to Docker.
# changelog
changelogs:
- { date: "10.02.24:", desc: "Add torrenting port support." }
- { date: "31.01.24:", desc: "Remove obsolete compat packages."}
- { date: "25.12.23:", desc: "Only pull stable releases of qbittorrent-cli."}
- { date: "07.10.23:", desc: "Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar)."}

View file

@ -2,7 +2,8 @@
# shellcheck shell=bash
WEBUI_PORT=${WEBUI_PORT:-8080}
TORRENTING_PORT=${TORRENTING_PORT:-6881}
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${WEBUI_PORT}" \
s6-setuidgid abc /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}"
s6-setuidgid abc /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}" --torrenting-port="${TORRENTING_PORT}"