Skip to content

Gluetun

VPN container that routes other containers' traffic through a VPN tunnel with automatic kill-switch protection.

Docker Compose Example

gluetun:
  image: qmcgaw/gluetun
  container_name: media-gluetun
  cap_add:
    - NET_ADMIN  # Required for VPN functionality
  ports:
    - 8080:8080  # Expose ports for services routing through this container
    - 6881:6881
  volumes:
    - gluetun_data:/gluetun
  environment:
    - VPN_SERVICE_PROVIDER=protonvpn  # 70+ providers supported
    - OPENVPN_USER=${VPN_USER}
    - OPENVPN_PASSWORD=${VPN_PASSWORD}
    - SERVER_COUNTRIES=Netherlands  # Optional: specify server location
  restart: unless-stopped

Other containers connect using network_mode: "service:gluetun"