Gluetun: VPN client for Docker containers
Lightweight Go VPN client for routing containerized traffic.
Learn more about Gluetun
version: "3" services: gluetun: image: qmcgaw/gluetun container_name: gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun ports: - 8888:8888/tcp # HTTP proxy - 9091:9091/tcp # Transmission Web UI - 51413:51413 # Transmission torrent port environment: - VPN_SERVICE_PROVIDER=mullvad - VPN_TYPE=wireguard - WIREGUARD_PRIVATE_KEY=${MULLVAD_PRIVATE_KEY} - WIREGUARD_ADDRESSES=10.64.0.1/32 - SERVER_CITIES=New York restart: unless-stopped transmission: image: linuxserver/transmission container_name: transmission network_mode: "service:gluetun" environment: - PUID=1000 - PGID=1000 - TZ=America/New_York volumes: - ./config:/config - ./downloads:/downloads depends_on: - gluetun restart: unless-stopped
Multi-provider support
Supports 25+ VPN providers including NordVPN, Mullvad, Private Internet Access, Surfshark, and others. Each provider can be configured with either OpenVPN or Wireguard depending on provider support.
Minimal container footprint
Built on Alpine Linux 3.22 with a Docker image size of approximately 41MB, reducing resource consumption and deployment overhead compared to larger VPN client implementations.
Built-in proxy services
Includes HTTP proxy and SOCKS proxy servers within the container, allowing other services to route traffic through the VPN without requiring separate proxy containers or configuration.
import requests
# Query gluetun's control server for VPN status
response = requests.get('http://localhost:8000/v1/openvpn/status')
status = response.json()
if status['status'] == 'running':
print(f"Connected to VPN: {status['country']}")
else:
print("VPN not connected")Major DNS improvements including DNS over HTTPS support and completely reworked health checks.
- –Local network names resolution using private DNS resolvers found at container start
- –DNS over HTTPS support with DNSUPSTREAMRESOLVER_TYPE option (dot, doh, or plain)
- –DNS over TLS re-uses TCP connections to reduce stress on VPN server
- –DNS requests blocked are logged with a reason
Fix restart crashes and update VPN provider configurations.
- –Prevent restart crash if DOT=off and DNSKEEPNAMESERVER=off
- –Retry on next period the blocklists update after a failed update
- –WIREGUARDENDPOINTIP overrides the IP address correctly
- –ExpressVPN hardcoded servers data updated
- –PureVPN OpenVPN configuration updated
Fix ProtonVPN credentials requirement issue.
- –Fixed previous fix on ProtonVPN: credentials are not required to be set
See how people are using Gluetun
Top in Networking
Related Repositories
Discover similar tools and frameworks used by developers
youtubeUnblock
Linux tool that bypasses YouTube access restrictions by manipulating SNI in network traffic.
ByeDPI Android
Android app that bypasses DPI and network censorship using a local VPN with SOCKS5 proxy, no root required.
MyIP
Web app for IP detection, geolocation lookup, DNS leak testing, WebRTC analysis, and network diagnostics.
Zapret
Windows zapret implementation for bypassing Discord and YouTube restrictions via DPI circumvention.
cURL
Command-line tool and C library for URL-based data transfer supporting 25+ protocols.