• 0 Posts
  • 3 Comments
Joined 1Y ago
cake
Cake day: Jun 06, 2023

help-circle
rss

If you happen to use gluetun (great project btw) you can use the environment property VPN_PORT_FORWARDING=on and a volume mapping to /tmp/gluetun/forwarded_port to obtain the port number from the container. Then with the bittorrent-port-forward-file container (Link) you can automatically set the port from the file to qbittorrent.
I use this with ProtonVPN and it works like a charm.

Here the relevant parts of my docker compose file:

  gluetun:
    image: qmcgaw/gluetun
    <...>
    volumes:
      <...>
      - ./port-forwarding/forwarded_port:/tmp/gluetun/forwarded_port:rw
    environment:
      # See https://github.com/qdm12/gluetun/wiki
      <...>
      - VPN_PORT_FORWARDING=on
      - VPN_PORT_FORWARDING_PROVIDER=protonvpn

  qbittorrent-port-forward-file:
    platform: linux/amd64 #needed for raspi
    image: charlocharlie/qbittorrent-port-forward-file                           
    container_name: port-forward-file                                            
    depends_on:
      - qbittorrent
      - gluetun
    restart: unless-stopped
    volumes:
      - ./port-forwarding:/config:ro
    environment:
      - QBT_USERNAME=
      - QBT_PASSWORD=
      - QBT_ADDR=gluetun:9092
      - PORT_FILE=/config/forwarded_port

The file containing the port number sits at ./port-forwarding/forwarded_port on the host (you may need to create the empty file before first usage).

See gluetun wiki here: Link


My Valve Index is my Beatsaber machine. Half Life Alyx is great, too.


Traefik. Once you set it up (which granted can take a few hours if you’re new) its as easy as adding 4 lines of code to your compose file to add a new service. I started with NPM but I don’t regret switching to Traefik at all.

I heard caddy is cool, too.