Set qBittorrent's forwarded port reading the port number from a file.
100K+
A shell script and Docker container for automatically setting qBittorrent's listening port from a text file.
| Variable | Example | Default | Description |
|---|---|---|---|
| QBT_USERNAME | username | admin | qBittorrent username |
| QBT_PASSWORD | password | adminadmin | qBittorrent password |
| QBT_ADDR | http://192.168.1.100:8080 | http://localhost:8080 | HTTP URL for the qBittorrent web UI, with port |
| PORT_FILE | /config/my_file.txt | /config/forwarded_port.txt | Container path to the file containing the forwarded port number |
| Host location | Container location | Mode | Description |
|---|---|---|---|
/my/host/dir/ | /config | ro | The directory in which the forwared ports file is located |
services:
qbittorrent-port-forwarder:
container_name: qbittorrent-port-forwarder
image: ghcr.io/claabs/qbittorrent-port-forward-file:latest
environment:
- QBT_USERNAME=admin
- QBT_PASSWORD=adminadmin
- QBT_ADDR=http://192.168.1.100:8080
- PORT_FILE=/config/forwarded_port.txt
volumes:
- ./config:/config:ro
restart: unless-stopped
Made for use with docker-wireguard-pia (although you should use PORT_SCRIPT):
PORT_FORWARDING=1PORT_PERSIST=1PORT_FILE=/pia/forwarded_port.txt/my/host/dir:/pia:rwOr for use with gluetun:
PRIVATE_INTERNET_ACCESS_VPN_PORT_FORWARDING=onPRIVATE_INTERNET_ACCESS_VPN_PORT_FORWARDING_STATUS_FILE=/gluetun/forwarded_port.txt/my/host/dir:/gluetun:rwdocker build . -t qbittorrent-port-forwarder
docker run --rm -it -e QBT_ADDR=http://192.168.1.100:8080 -v $(pwd)/config:/config qbittorrent-port-forwarder:latest
Content type
Image
Digest
sha256:ed94233bc…
Size
6.4 MB
Last updated
10 months ago
docker pull charlocharlie/qbittorrent-port-forward-file