When I was using them as a single compose stack, this is what I was using:
services:
gluetun:
cap_add:
- NET_ADMIN
container_name: gluetun
environment:
- VPN_SERVICE_PROVIDER=
- OPENVPN_USER=
- OPENVPN_PASSWORD=
- SERVER_COUNTRIES=
image: qmcgaw/gluetun:latest
devices:
- /dev/net/tun:/dev/net/tun
ports:
- 8888:8888/tcp
- 8388:8388/tcp
- 8388:8388/udp
- 10095:10095
- 6881:6881
- 6881:6881/udp
pull_policy: always
restart: unless-stopped
volumes:
- /mnt/Array1/configbackups/gluetun:/gluetun
qbittorrent:
container_name: qbittorrent
depends_on:
- gluetun
environment:
- PUID=568
- PGID=568
- TZ=
- WEBUI_PORT=10095
- TORRENTING_PORT=6881
- UMASK=022
image: lscr.io/linuxserver/qbittorrent:latest
network_mode: service:gluetun
restart: unless-stopped
volumes:
- /mnt/Array1/configbackups/qbittorrent:/config
- /mnt/Array1/downloads/torrents:/mnt/Array1/downloads/torrents
You’ll need the webui and tcp/udp ports for transmission in your gluetun part of the compose. In my case I’m using 10095 for qbittorrent webui and 6881 for torrents.