I am trying to get gluetun setup with sab and deluge and it comes up with this error when trying to connect gluetun to mullvad.

I’ve confirmed that the private key and addresses are as per the .conf that gets downloaded from the mullvad set up page.

This is my compose.yml for the gluetun part

services:
  gluetun:
    image: qmcgaw/gluetun:latest
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_SERVICE_PROVIDER=mullvad
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=[redacted]
      - WIREGUARD_ADDRESSES=[redacted]
      - SERVER_COUNTRIES=Canada
    volumes:
      - ./gluetun/config:/gluetun
    ports:
      - "8112:8112"   # Deluge Web UI (exposed via gluetun)
      - "58846:58846" # Deluge daemon (optional)
      - "8019:8080"   # SABnzbd Web UI (exposed via gluetun)
      - "9090:9090"   # example SABnzbd additional port if needed
    restart: unless-stopped
    networks:
      - vpn-net

Anyone got any ideas? TIA :)

  • nelson@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 months ago

    I think if the source path doesn’t exist, docker will mount a directory ( IIRC, but not 100% sure ).

    Can you triple check if the path to your wg0.conf file on your host actually exists and that the path is definitely correct?

    stat /home/docker/test/Wireguard/wg0.conf
    
        • nelson@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          4 months ago

          I have no clue as I’ve not set this up myself unfortunately. :(

          There are also certain Linux distros have SElinux enabled ( like red hat or fedora ). This could also block docker from accessing the file if it is enabled.

          You’d have to search online how to set a policy in selinux to allow it.

          SElinux does not appear in Ubuntu/Debian based distros.

          Easiest check would be to run getenforce. If it works and it returns 1 it’s enabled and possibly the culprit. You can try running your docker after running setenforce 0. This will temporarily disable it until a restart IIRC. You can enable it again by setting it to 1.

          I wouldn’t recommend disablint it permanently

        • skoell13@feddit.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          4 months ago

          Usually you should be able to download a wg0.conf file from your vpn provider. It basically contains all the data that you provided via env var in a specific format.

          Note: the server address has to be an IP address since gluetun won’t resolve addresses (see here).

                • skoell13@feddit.org
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  4 months ago

                  This is my setup

                  sabnzbd:
                      ...
                      restart: unless-stopped
                      network_mode: "service:gluetun"
                  
                    gluetun:
                      image: qmcgaw/gluetun
                      container_name: gluetun
                      cap_add:
                        - NET_ADMIN
                      environment:
                        - VPN_SERVICE_PROVIDER=custom
                        - VPN_TYPE=wireguard
                      devices:
                        - /dev/net/tun:/dev/net/tun
                      ports:
                        - 9090:8080 # SABnzbd webui port forwarding
                      volumes:
                        - ./Wireguard/wg0.conf:/gluetun/wireguard/wg0.conf:ro
                      restart: unless-stopped
                  

                  Note how i explicitly tell sabnzbd container to use gluetun as a network.

                  Afaik, with your setup you simply run both containers in the same network so that both can reach each other.