Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How does gluetun really work?

Featured Replies

Hi,

I know this is not specifically about Unraid, but it is related. How does Gluetun actually work?

I have set up a container stack in Unraid that includes Gluetun. For the other container in the same stack, I have specified the network like this: network_mode: service:gluetun.

From what I understand, Gluetun establishes a VPN connection to the VPN provider, gets a different public IP address, and then routes the traffic from all other containers in the stack that are configured to use Gluetun through that connection. Is that correct?

This is one of my stacks:

version: "3"
services:
  gluetun:
    image: qmcgaw/gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    environment:
      - VPN_SERVICE_PROVIDER=[VPN provider]
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=[Password]
      - WIREGUARD_ADDRESSES=[IP]
      - SERVER_COUNTRIES=[Country]
      - SERVER_CITIES=[City]
      - SERVER_CONNECTION_PROTOCOL=ipv4
      - HTTP_CONTROL_SERVER_AUTH=basic
      - HTTP_CONTROL_SERVER_USERNAME=vpn
      - HTTP_CONTROL_SERVER_PASSWORD=[Password]
    ports:
      - 8012:8012
      - 9526:9526
      - 8666:8666
      - 7232:7232
    volumes:
      - /mnt/user/appdata/gluetun:/gluetun
    healthcheck:
      test: ["CMD-SHELL", "wget -qO- https://test.net/ | grep -q 'You are connected'"]
      interval: 10s
      timeout: 5s
      retries: 30
      start_period: 20s
    restart: unless-stopped

  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    network_mode: service:gluetun
    depends_on:
      gluetun:
        condition: service_healthy
    environment:
      - PUID=252
      - PGID=123
      - TZ=[]
      - WEBUI_PORT=8034
    volumes:
      - /mnt/user/appdata/qbittorrent:/config
      - /mnt/user/downloads:/downloads
    restart: unless-stopped
networks: {}

Is this the correct way to set it up, and how can I verify that the container is actually using the VPN?

Will this also work as a secure kill switch if the VPN connection goes down?

Regards

GitHub
No image preview

GitHub - qdm12/gluetun-wiki: Home to the Markdown Wiki pa...

Home to the Markdown Wiki page for Gluetun. Contribute to qdm12/gluetun-wiki development by creating an account on GitHub.
  • Author

Thanks, great recourses and great software!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.