Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[FEAT]: Gluetun Integration under ServApps #346

Open
genefyx opened this issue Nov 3, 2024 · 2 comments
Open

[FEAT]: Gluetun Integration under ServApps #346

genefyx opened this issue Nov 3, 2024 · 2 comments

Comments

@genefyx
Copy link

genefyx commented Nov 3, 2024

Feature Description

The ability provide a Wireguard/VPN connection, and tie containers to run under Glutun.

@kolossboss
Copy link

Hi,

I’d like to use Gluetun as well.

Currently, I’ve configured all apps in a single Docker Compose file to route traffic through the Gluetun network. This setup works great! However, I’m curious if it’s possible to configure or use a similar setup with Cosmos.

version: "3"
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 37801:8989/tcp # Sonarr
    volumes:
      - /Volumes/PlexData/Docker/gluetun:/gluetun
    environment:
      - VPN_SERVICE_PROVIDER=custom
      - VPN_TYPE=openvpn
      - OPENVPN_CUSTOM_CONFIG=/gluetun/xxxx
      - TZ=DE
      - OPENVPN_USER=xxxxxx
      - OPENVPN_PASSWORD=xxxxxx
      - HTTPPROXY=on

  sonarr:
    image: lscr.io/linuxserver/sonarr:latest
    container_name: sonarr
    network_mode:  "service:gluetun"
    environment:
      - PUID=501
      - PGID=20
      - TZ=DE
    volumes:
      - /Volumes/Docker/Sonarr:/config
    restart: unless-stopped

@neoestremi
Copy link

Yes, you can create a standalone gluetun container, and for each container you want to attach to it, you have to modify the compose file like this :
Add the label "cosmos-force-network-mode:gluetun"
Remove every network or hostname configuration from the rest of the file as it will conflict with the label.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants