RetroFed Forum
Your home away from modern life.
Gluetun qbittorrent port updater?
Post Reply
AuthorMessage
brownmustardminion lemmy.ml brownmustardminion@lemmy.ml
Joined: 2022-01-03
Quote

For a while I've used a docker image that read a file that gluetun updates with the current open port and then updates qbittorrent to use that port.

It seems that utility is no longer maintained.

Does anybody know of a solid replacement?

23   Original
BakedCatboy lemmy.ml BakedCatboy@lemmy.ml
Joined: 2023-12-14
#2 · Quote Reply

Gluetun should be able to do this without any extra tools, check out the qbittorrent example on the gluetun wiki: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/vpn-port-forwarding.md#qbittorrent-example

I do something similar for transmission, though I put it all in a script that I mount into the container so my command is just VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c "set-transmission-port {{PORTS}}"

7
scoot programming.dev scoot@programming.dev
Joined: 2025-06-05
#3 · Quote Reply

I have the qbittorrent web UI running in a separate container that's attached to my gluetun container. I use the VPN_PORT_FORWARDING_UP_COMMAND option in my gluetun container:

    environment:
      - VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":{{PORTS}}}" http://127.0.0.1:8072/api/v2/app/setPreferences 2>&1'

You may have to adjust the http://127.0.0.1:8072/ part based on your setup.

7
dan upvote.au dan@upvote.au
Joined: 2023-06-14
#4 · Quote Reply

Why not use a provider like AirVPN that lets you use the same port number all the time?

3
linuxguy lemmy.gregw.us linuxguy@lemmy.gregw.us
Joined: 2023-07-11
#5 · Quote Reply

Like the other two comments are saying: use a recent version of gluetun and its built in functionality.

2
brownmustardminion lemmy.ml brownmustardminion@lemmy.ml
Joined: 2022-01-03
#6 · Quote Reply

I have the qbittorrent web UI running in a separate container that's attached to my gluetun container. I use the VPN_PORT_FORWARDING_UP_COMMAND option in my gluetun container: environment: - VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":{{PORTS}}}" http://127.0.0.1:8072/api/v2/app/setPreferences 2>&1' You may have to adjust the...

The gluetun wiki's command didn't work for me, so I used yours and it worked flawlessly. Thank you.

The wiki uses {{PORT}} and it seems {{PORTS}} is the correct variable.

4
Post Reply
Back to top