🌟My Gluetun Setup
#This Gluetun setup runs in a Docker container using the official qmcgaw/gluetun image. It provides a secure VPN tunnel, supports HTTP proxy, and Shadowsocks for enhanced privacy.
⚙️ Configuration Details
#🌍 Environment Variables
#Variable | Description |
---|
VPN_SERVICE_PROVIDER=private internet access | Specifies the VPN provider |
OPENVPN_USER=Your username | VPN username (replace with actual credentials) |
OPENVPN_PASSWORD=Your Password | VPN password (replace with actual credentials) |
HTTPPROXY=on | Enables HTTP proxy |
SERVER_REGIONS=UK London | Specifies the VPN server region |
📂 Volume Mounts
#Volume | Description |
---|
~/gluetun_vpn/config:/gluetun | Stores Gluetun’s configuration and settings |
🔗 Networking
#Port Mapping | Function |
---|
8888:8888/tcp | HTTP proxy |
8388:8388/tcp | Shadowsocks (TCP) |
8388:8388/udp | Shadowsocks (UDP) |
🔄 Restart Policy
#Policy | Description |
---|
unless-stopped | Ensures the container restarts automatically unless manually stopped |
📜 My Docker Compose Configuration
#services:
gluetun:
container_name: gluetun
image: qmcgaw/gluetun:v3
cap_add:
- NET_ADMIN
ports:
- 8888:8888/tcp # HTTP proxy
- 8388:8388/tcp # Shadowsocks
- 8388:8388/udp # Shadowsocks
volumes:
- ~/gluetun_vpn/config:/gluetun
environment:
- VPN_SERVICE_PROVIDER=private internet access
- OPENVPN_USER=Your username
- OPENVPN_PASSWORD=Your Password
- HTTPPROXY=on
- SERVER_REGIONS=UK London
restart: unless-stopped
🔐 Using Docker Secrets for Environment Variables
#You can set any environment variable from a file by using a special prepend FILE__
.
For example:
FILE__MYVAR=/run/secrets/mysecretvariable