Ok, had my wife send me the file from my network
networks:
main-network:
name: ${COMPOSE_PROJECT_NAME}
attachable: true
ipam:
driver: default
config:
- subnet: configure
ip_range: this
gateway: yoself
services:
# Gluetun - <https://github.com/qdm12/gluetun>
gluetun:
image: qmcgaw/gluetun
container_name: gluetun
networks:
- main-network
cap_add:
- NET_ADMIN
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- VPN_SERVICE_PROVIDER=custom
- VPN_TYPE=wireguard
- VPN_PORT_FORWARDING=true
- VPN_PORT_FORWARDING_PROVIDER=protonvpn
- WIREGUARD_ADDRESSES=use your own
- WIREGUARD_ALLOWED_IPS=0.0.0.0/0
- WIREGUARD_PRIVATE_KEY=nope
- WIREGUARD_PUBLIC_KEY=69420
- WIREGUARD_DNS=
- VPN_ENDPOINT_PORT=
- VPN_ENDPOINT_IP=
volumes:
- ${DOAPPDAT}/gluetun:/gluetun
I left in the wireguard stuff without my details because for me Gluetun refused to work when setting the exact same info to wg0.conf, so I define it in my compose
Then, services that rely on gluetun go below and look like:
# qBittorrent - <https://hub.docker.com/r/linuxserver/qbittorrent>
qbittorrent:
container_name: qbittorrent
network_mode: container:gluetun
image: lscr.io/linuxserver/qbittorrent:latest
depends_on:
gluetun:
condition: service_healthy
restart: unless-stopped
Works perfectly when I run it through portainer
It took me too long to get everything working myself because people love to share shit exclusively in CLI format and look down at anyone who asks for YAML it seems, so I’m always glad to pass it on
(I can understand CLI, but the ADHD brain finds YAML much easier for documentation purposes and it surprises me how many people seem to disagree)