Sign inSign up

mjmeli/qbittorrent-port-forward-gluetun-server

By mjmeli

Updated 9 months ago

A shell script and Docker container for automatically setting qBittorrent's listening port from Glue

Image
5

100K+

mjmeli/qbittorrent-port-forward-gluetun-server repository overview

qbittorrent-port-forward-gluetun-server

A shell script and Docker container for automatically setting qBittorrent's listening port from Gluetun's control server.

Config

Environment Variables
VariableExampleDefaultDescription
QBT_USERNAMEusernameadminqBittorrent username
QBT_PASSWORDpasswordadminadminqBittorrent password
QBT_ADDRhttp://192.168.1.100:8080http://localhost:8080HTTP URL for the qBittorrent web UI, with port
GTN_ADDRhttp://192.168.1.100:8000http://localhost:8000HTTP URL for the gluetun control server, with port
GTN_USERNAMEusernameNoneUsername for authentication to gluetun control server (if basic auth enabled)
GTN_PASSWORDpasswordNonePassword for authentication to gluetun control server (if basic auth enabled)
GTN_APIKEYapikeyNoneAPI Key for authentication to gluetun control server (if API key auth enabled)

Gluetun Control Server Authentication

Starting in Gluetun v3.4, it is required to setup authentication on the Gluetun control server routes.

See this link for information on how to set this up: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md#authentication

Once configured in Gluetun, you can configure this container to use the appropriate authentication method:

  • If using none auth, you do not need to provide any of the authentication environment variables
  • If using basic auth, you should set the GTN_USERNAME and GTN_PASSWORD environment variables
  • If using apikey auth, you should set the GTN_APIKEY environment variable

Example

Docker-Compose

The following is an example docker-compose:

  qbittorrent-port-forward-gluetun-server:
    image: mjmeli/qbittorrent-port-forward-gluetun-server
    container_name: qbittorrent-port-forward-gluetun-server
    restart: unless-stopped
    environment:
      - QBT_USERNAME=username
      - QBT_PASSWORD=password
      - QBT_ADDR=http://192.168.1.100:8080
      - GTN_ADDR=http://192.168.1.100:8000
      - GTN_APIKEY=CHANGEME

Development

Build Image
docker build . -t qbittorrent-port-forward-gluetun-server
Run Container
docker run --rm -it -e QBT_USERNAME=admin -e QBT_PASSWORD=adminadmin -e QBT_ADDR=http://192.168.1.100:8080 -e GTN_ADDR=http://192.168.1.100:8000 -e GTN_APIKEY=CHANGEME qbittorrent-port-forward-gluetun-server:latest

Tag summary

Content type

Image

Digest

sha256:e6ab8714e

Size

6.4 MB

Last updated

9 months ago

docker pull mjmeli/qbittorrent-port-forward-gluetun-server