### Start VPN Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Start the VPN connection by sending a PUT request with the status set to 'running'. ```http PUT /v1/vpn/status {"status":"running"} ``` -------------------------------- ### Start DNS Server Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Start the DNS server by sending a PUT request with the status set to 'running'. ```http PUT /v1/dns/status {"status":"running"} ``` -------------------------------- ### Custom Port Forwarding Up Command Example Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/vpn-port-forwarding.md Set a custom command to run when port forwarding is set up using VPN_PORT_FORWARDING_UP_COMMAND. This example demonstrates using template variables for ports and the VPN interface. ```bash VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c "echo My forwarded ports are {{PORTS}}, the first forwarded port is {{PORT}} and the VPN network interface is {{VPN_INTERFACE}}" ``` -------------------------------- ### Example Markdown Server List Output Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md This is an example of the Markdown output generated when listing VPN servers. It shows country, city, hostname, and TCP/UDP availability. ```markdown | Country | City | Hostname | TCP | UDP | | --- | --- | --- | --- | --- | | Albania | | `albania-ca-version-2.expressnetw.com` | ❌ | ✅ | ... | ... | ... | ... | ... | | Vietnam | | `vietnam-ca-version-2.expressnetw.com` | ❌ | ✅ | ``` -------------------------------- ### FastestVPN Wireguard Docker Setup Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/fastestvpn.md Use this command to run Gluetun with FastestVPN using the Wireguard protocol. WIREGUARD_PRIVATE_KEY and WIREGUARD_ADDRESSES must be provided. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=fastestvpn \ -e VPN_TYPE=wireguard \ -e WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= \ -e WIREGUARD_ADDRESSES="10.64.222.21/32" \ -e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Run Gluetun with VPN Unlimited (Docker Compose) Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/vpn-unlimited.md Configure your docker-compose.yml file to use VPN Unlimited with Gluetun. This setup requires OpenVPN client key and certificate setup. ```yaml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=vpn unlimited - OPENVPN_USER=abc - OPENVPN_PASSWORD=abc - SERVER_COUNTRIES=Netherlands volumes: - ./gluetun:/gluetun ``` -------------------------------- ### FastestVPN OpenVPN Docker Setup Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/fastestvpn.md Use this command to run Gluetun with FastestVPN using the OpenVPN protocol. Ensure OPENVPN_USER and OPENVPN_PASSWORD are set. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=fastestvpn \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Start Updater Job Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Starts the updater job. ```APIDOC ## PUT /v1/updater/status ### Description Start the updater job. ### Method PUT ### Endpoint /v1/updater/status ### Request Body - **status** (string) - Required - Set to "running" to start the updater. ### Request Example ```json { "status": "running" } ``` ``` -------------------------------- ### Docker CLI Setup for SlickVPN Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/slickvpn.md Use this command to run Gluetun with SlickVPN via Docker CLI. Ensure NET_ADMIN capability and the NET_TUN device are available. Required environment variables include VPN_SERVICE_PROVIDER, OPENVPN_USER, and OPENVPN_PASSWORD. SERVER_COUNTRIES is used here to specify a preferred server location. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=slickvpn \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Add Custom OpenVPN Option Source: https://github.com/qdm12/gluetun-wiki/blob/main/contributing/add-a-provider.md Example of how to add a custom OpenVPN option like 'tun-mtu' to the generated configuration file if a specific condition is met. ```Go if provider.TunMTU > 0 { lines.add("tun-mtu", fmt.Sprint(provider.TunMTU)) } ``` -------------------------------- ### qBittorrent Port Forwarding Setup Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/vpn-port-forwarding.md Configure qBittorrent to use the forwarded port by setting the listen port via its Web UI API. This command is intended to be used with VPN_PORT_FORWARDING_UP_COMMAND. ```bash VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'wget -O- -nv --retry-connrefused --post-data "json={"listen_port":{{PORT}},"current_network_interface":"{{VPN_INTERFACE}}","random_port":false,"upnp":false}" http://127.0.0.1:8080/api/v2/app/setPreferences' ``` -------------------------------- ### Run PureVPN with Docker Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/purevpn.md Use this command to start a Gluetun container with PureVPN. Ensure NET_ADMIN capability and the TUN device are available. Required environment variables for PureVPN are OPENVPN_USER and OPENVPN_PASSWORD. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=purevpn \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Manually Install libseccomp2 on Debian x86 Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/prerequisites/32bit.md If the Debian package manager does not provide a sufficient version of libseccomp2, download and install a specific Debian package for i386 architecture. Verify the installation. ```bash wget -qO /tmp/libseccomp2.deb https://ftp.debian.org/debian/pool/main/libs/libseccomp/libseccomp-dev_2.5.1-1_i386.deb sudo dpkg -i /tmp/libseccomp2.deb rm /tmp/libseccomp2.deb sudo apt list libseccomp2 ``` -------------------------------- ### Install tun Kernel Module on Synology Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/prerequisites/synology.md On some Synology devices, the `tun` kernel module must be installed at every boot. This command loads the module manually. It also installs the `tun` device after a reboot. ```shell sudo insmod /lib/modules/tun.ko ``` -------------------------------- ### Run Gluetun with Giganews using Docker Compose Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/giganews.md Configure Gluetun with Giganews using a docker-compose.yml file. This setup requires NET_ADMIN capabilities and the /dev/net/tun device. Provide your Giganews username, password, and preferred server region. ```yaml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=giganews - OPENVPN_USER=abc - OPENVPN_PASSWORD=abc - SERVER_REGIONS=Netherlands ``` -------------------------------- ### Run Privado VPN with Docker Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/privado.md Use this command to start a Privado VPN container using Docker. Ensure NET_ADMIN capability and the TUN device are available. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=privado \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Run Gluetun Docker Container Source: https://github.com/qdm12/gluetun-wiki/blob/main/contributing/development.md Run the Gluetun Docker container with necessary capabilities and environment variables. This example configures it for OpenVPN with specific credentials and maps port 8000. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=someprovider \ -e VPN_TYPE=openvpn \ -e OPENVPN_USER=test -e OPENVPN_PASSWORD=test \ -p 8000:8000/tcp \ qmcgaw/gluetun ``` -------------------------------- ### Update VPN Servers List with Docker Compose Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md An example of how to configure the Gluetun service in a `docker-compose.yml` file to update VPN servers. This demonstrates volume mounting and the command to execute for updates. ```yaml version: "3" services: gluetun: image: qmcgaw/gluetun # ... volumes: /yourpath:/gluetun command: update -providers mullvad ``` -------------------------------- ### Docker Compose Setup for SlickVPN Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/slickvpn.md Configure Gluetun to use SlickVPN with Docker Compose. This YAML file defines the service, image, capabilities, devices, and environment variables, including VPN_SERVICE_PROVIDER, OPENVPN_USER, OPENVPN_PASSWORD, and SERVER_COUNTRIES. ```yaml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=slickvpn - OPENVPN_USER=abc - OPENVPN_PASSWORD=abc - SERVER_COUNTRIES=Netherlands ``` -------------------------------- ### Start Updater Job Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Send an HTTP PUT request with a JSON body to this endpoint to initiate the updater job. Ensure the body specifies `"status":"running"` to start the update process. ```HTTP PUT /v1/updater/status {"status":"running"} ``` -------------------------------- ### Kubernetes Deployment with Recreate Strategy and Post-Start Command Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/kubernetes.md To resolve the 'adding IPv6 rule: ...: file exists' error, change the update strategy to 'Recreate' and add a post-start command to delete IP rules. This ensures IP rules are cleaned up before a new pod starts. ```yaml apiVersion: apps/v1 kind: Deployment spec: strategy: type: Recreate spec: containers: - name: vpn image: qmcgaw/gluetun lifecycle: postStart: exec: command: ["/bin/sh", "-c", "(ip rule del table 51820; ip -6 rule del table 51820) || true"] # ... ``` -------------------------------- ### Docker Compose configuration for IVPN WireGuard Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/ivpn.md A docker-compose.yml example for setting up Gluetun with IVPN using WireGuard. This configuration includes necessary capabilities, devices, and environment variables for WireGuard. ```yml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=ivpn - VPN_TYPE=wireguard - WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= - WIREGUARD_ADDRESSES=10.64.222.21/32 - SERVER_CITIES=Amsterdam ``` -------------------------------- ### FastestVPN Wireguard Docker Compose Setup Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/fastestvpn.md This Docker Compose configuration sets up Gluetun with FastestVPN using Wireguard. It requires WIREGUARD_PRIVATE_KEY and WIREGUARD_ADDRESSES. ```yaml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=fastestvpn - VPN_TYPE=wireguard - WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= - WIREGUARD_ADDRESSES=10.64.222.21/32 - SERVER_COUNTRIES=Netherlands ``` -------------------------------- ### ExpressVPN Setup with Docker Compose Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/expressvpn.md Configure Gluetun for ExpressVPN using Docker Compose. This YAML file defines the service, capabilities, devices, and environment variables, including VPN_SERVICE_PROVIDER, OPENVPN_USER, and OPENVPN_PASSWORD. ```yml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=expressvpn - OPENVPN_USER=abc - OPENVPN_PASSWORD=abc - SERVER_COUNTRIES=Netherlands ``` -------------------------------- ### Run Gluetun with PrivateVPN using Docker Compose Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/privatevpn.md Configure Gluetun with PrivateVPN in your Docker Compose file. This setup requires NET_ADMIN capabilities and the TUN device. ```yaml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=privatevpn - OPENVPN_USER=abc - OPENVPN_PASSWORD=abc - SERVER_COUNTRIES=Netherlands ``` -------------------------------- ### Download Go Dependencies Source: https://github.com/qdm12/gluetun-wiki/blob/main/contributing/development.md Download all the necessary Go dependencies for the project. This command should be run from the root of the cloned repository. ```sh go mod download ``` -------------------------------- ### Update and Install containerd.io on Raspberry Pi Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/prerequisites/32bit.md Use this command to update your package list and install or upgrade containerd.io on 32-bit Raspberry Pi OS. Verify the installed version afterward. ```bash sudo apt-get update -y sudo apt-get install -y containerd.io sudo apt list containerd.io ``` -------------------------------- ### Profile CPU Usage for 30s with Go pprof Source: https://github.com/qdm12/gluetun-wiki/blob/main/contributing/profiling.md Use this command to profile Gluetun's CPU usage for a duration of 30 seconds. Ensure Gluetun is running with PPROF_ENABLED=yes and port mapping 6060:6060/tcp. ```sh go tool pprof -http=localhost:8000 http://192.168.2.2:6060/debug/pprof/profile ``` -------------------------------- ### Get Updater Status Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Send an HTTP GET request to this endpoint to check the current status of the updater job. The status indicates if the updater has completed, is running, or has been stopped. ```HTTP GET /v1/updater/status ``` -------------------------------- ### Get Public IP Address Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Retrieve your current VPN public IP address by making an HTTP GET request to this endpoint. The response is a JSON object containing the public IP. ```HTTP GET /v1/publicip/ip ``` ```JSON {"public_ip":"58.98.64.104"} ``` -------------------------------- ### OpenVPN Client Key File Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/openvpn-client-key.md Place your client key content between the BEGIN and END lines into the specified file path. Ensure the file is named 'client.key'. ```pem -----BEGIN PRIVATE KEY----- ... ... -----END PRIVATE KEY----- ``` -------------------------------- ### AirVPN Wireguard Docker Compose Configuration Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/airvpn.md Configure Gluetun with AirVPN using Wireguard in a docker-compose file. This setup requires Wireguard keys and addresses obtained from AirVPN. IPv6 addresses in WIREGUARD_ADDRESSES require container setup support. ```yml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=airvpn - VPN_TYPE=wireguard - WIREGUARD_PRIVATE_KEY=yCbHtKAgJASnJs2S/aZsjag9Fy04csmR4qDUDkJgX2c= - WIREGUARD_PRESHARED_KEY=yCbHtKAgJASnJs2S/aZsjag9Fy04csmR4qDUDkJgX2c= - WIREGUARD_ADDRESSES=10.99.99.99/32,ff:ff:ff...:ff/128 - SERVER_COUNTRIES=Netherlands ``` -------------------------------- ### Get Public IP Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Retrieves the current public IP address of the VPN. ```APIDOC ## GET /v1/publicip/ip ### Description Obtain your current VPN public IP address. ### Method GET ### Endpoint /v1/publicip/ip ### Response #### Success Response (200) - **public_ip** (string) - The current public IP address. ### Response Example ```json { "public_ip": "58.98.64.104" } ``` ``` -------------------------------- ### Run Gluetun with IVPN using WireGuard Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/ivpn.md This command launches Gluetun with IVPN using WireGuard. It requires NET_ADMIN capability and the /dev/net/tun device. Key environment variables are VPN_SERVICE_PROVIDER, VPN_TYPE, WIREGUARD_PRIVATE_KEY, and WIREGUARD_ADDRESSES. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=ivpn \ -e VPN_TYPE=wireguard \ -e WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= \ -e WIREGUARD_ADDRESSES="10.64.222.21/32" \ -e SERVER_CITIES=amsterdam qmcgaw/gluetun ``` -------------------------------- ### Get DNS Server Status Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Retrieve the current status of the DNS server, indicating whether it is running or stopped. ```http GET /v1/dns/status ``` -------------------------------- ### Get VPN Settings Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Retrieve the current VPN settings in JSON format. This can be useful for debugging or verifying configuration. ```http GET /v1/vpn/settings ``` -------------------------------- ### Get VPN Status Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Retrieve the current status of the VPN connection. The response indicates if the VPN is running or stopped. ```http GET /v1/vpn/status ``` -------------------------------- ### Check Docker Version on Debian x86 Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/prerequisites/32bit.md Verify that your Docker version is 19.03.9 or above. If not, you will need to upgrade your Docker installation separately. ```bash docker version --format {{.Server.Version}} ``` -------------------------------- ### Build Gluetun Docker Image Source: https://github.com/qdm12/gluetun-wiki/blob/main/contributing/development.md Build the Docker image for Gluetun. The '-t' flag tags the image with a name and optional tag, here 'qmcgaw/gluetun'. ```sh docker build -t qmcgaw/gluetun . ``` -------------------------------- ### Get Port Forwarding Status Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Retrieve the currently forwarded ports. The response will be a JSON object containing the active port number. ```http GET /v1/portforward ``` -------------------------------- ### Run IPVanish with Docker Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/ipvanish.md This command launches the Gluetun container with IPVanish VPN. Ensure NET_ADMIN capability and the /dev/net/tun device are available. Required environment variables for IPVanish credentials and optional server country are included. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=ipvanish \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Run Gluetun with VPN Unlimited (Docker) Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/vpn-unlimited.md Use this command to run Gluetun with VPN Unlimited using Docker. Ensure you have set up your OpenVPN client key and certificate. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER="vpn unlimited" \ -v /yourpath/gluetun:/gluetun \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Add Provider to README Supported List Source: https://github.com/qdm12/gluetun-wiki/blob/main/contributing/add-a-provider.md List the new provider in the `README.md` file under the supported services. ```markdown - Supports: **Cyberghost**, ..., **NewProviderName**, ..., **Windscribe** servers ``` -------------------------------- ### Docker Compose for Surfshark WireGuard Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/surfshark.md Configure your docker-compose.yml file to run Gluetun with Surfshark using WireGuard. This setup requires the private key and network addresses. ```yaml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=surfshark - VPN_TYPE=wireguard - WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= - WIREGUARD_ADDRESSES=10.64.222.21/16 - SERVER_COUNTRIES=Netherlands ``` -------------------------------- ### Profile Heap Memory with Go pprof Source: https://github.com/qdm12/gluetun-wiki/blob/main/contributing/profiling.md Use this command to profile the heap memory usage of Gluetun. Ensure Gluetun is running with PPROF_ENABLED=yes and port mapping 6060:6060/tcp. ```sh go tool pprof -http=localhost:8000 http://192.168.2.2:6060/debug/pprof/heap ``` -------------------------------- ### Run TorGuard with Docker Compose Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/torguard.md Configure Gluetun to use TorGuard via OpenVPN in a Docker Compose setup. This requires NET_ADMIN capabilities and the TUN device to be mapped. ```yml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=torguard - OPENVPN_USER=abc - OPENVPN_PASSWORD=abc - SERVER_COUNTRIES=Netherlands ``` -------------------------------- ### Run Wireguard Custom Provider with Docker Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/custom.md Execute this Docker command to set up a custom Wireguard VPN. All necessary Wireguard parameters, including keys and endpoint, must be provided as environment variables. ```sh docker run -it --rm --cap-add=NET_ADMIN \ -e VPN_SERVICE_PROVIDER=custom -e VPN_TYPE=wireguard \ -e WIREGUARD_ENDPOINT_IP=1.2.3.4 \ -e WIREGUARD_ENDPOINT_PORT=51820 \ -e WIREGUARD_PUBLIC_KEY=wAUaJMhAq3NFutLHIdF8AN0B5WG8RndfQKLPTEDHal0= \ -e WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= \ -e WIREGUARD_PRESHARED_KEY=xOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= \ -e WIREGUARD_ADDRESSES="10.64.222.21/32" qmcgaw/gluetun ``` -------------------------------- ### Run Gluetun with Private Internet Access (OpenVPN Docker) Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/private-internet-access.md Use this Docker command to run Gluetun with Private Internet Access using OpenVPN. Ensure NET_ADMIN capabilities and the TUN device are available. Mount a volume for persistent configuration. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER="private internet access" \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -v /yourpath/gluetun:/gluetun \ -e SERVER_REGIONS=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Allowing Forwarded Ports via Environment Variable Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/vpn-port-forwarding.md Use `FIREWALL_VPN_INPUT_PORTS` to statically set port forwardings when Gluetun starts. This is useful for non-native integrations with designated forwarded ports. ```shell FIREWALL_VPN_INPUT_PORTS=4567 ``` -------------------------------- ### Run OpenVPN Custom Provider with Docker Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/custom.md Use this command to run Gluetun with a custom OpenVPN provider. Mount your OpenVPN configuration file to /gluetun/custom.conf and set OPENVPN_CUSTOM_CONFIG. ```sh docker run -it --rm --cap-add=NET_ADMIN \ -e VPN_SERVICE_PROVIDER=custom -e VPN_TYPE=openvpn \ -v /yourpath/yourconfig.conf:/gluetun/custom.conf:ro \ -e OPENVPN_CUSTOM_CONFIG=/gluetun/custom.conf \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc qmcgaw/gluetun ``` -------------------------------- ### Run Windscribe with Wireguard Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/windscribe.md This command launches Gluetun with Windscribe using the Wireguard protocol. You must provide your Wireguard private key, addresses, and optionally a preshared key and server region. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=windscribe \ -e VPN_TYPE=wireguard \ -e WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= \ -e WIREGUARD_ADDRESSES="10.64.222.21/32" \ -e WIREGUARD_PRESHARED_KEY= \ -e SERVER_REGIONS=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Run Gluetun with Perfect Privacy (Docker) Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/perfect-privacy.md Use this command to run Gluetun with Perfect Privacy VPN. Ensure NET_ADMIN capability and the TUN device are available. Required environment variables for VPN service, username, and password must be set. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER="perfect privacy" \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -e SERVER_CITIES=Amsterdam qmcgaw/gluetun ``` -------------------------------- ### Basic Authentication Configuration Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Configure HTTP basic authentication for the control server. Requires a username and password. ```toml auth = "basic" username = "myusername" password = "mypassword" ``` -------------------------------- ### List VPN Servers for a Provider Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md Use this command to list available VPN servers for a specific provider in Markdown format. Replace `/yourpath` with your local directory path and `-yourprovider` with the lowercase provider name. ```sh docker run --rm -v /yourpath:/gluetun qmcgaw/gluetun format-servers -yourprovider ``` -------------------------------- ### Docker Compose for VyprVPN Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/vyprvpn.md Configure Gluetun for VyprVPN using Docker Compose. This setup requires NET_ADMIN capability and the TUN device. Set OPENVPN_USER and OPENVPN_PASSWORD environment variables for authentication. ```yml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=vyprvpn - OPENVPN_USER=abc - OPENVPN_PASSWORD=abc - SERVER_REGIONS=Netherlands ``` -------------------------------- ### Run Gluetun with Giganews using Docker CLI Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/giganews.md Use this command to run Gluetun with Giganews. Ensure NET_ADMIN capability and /dev/net/tun device are available. Set your Giganews credentials and desired server region. ```dockercli docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=giganews \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -e SERVER_REGIONS=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Wireguard Port Forwarding Setup for Private Internet Access Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/private-internet-access.md To enable port forwarding with Wireguard on Private Internet Access, set these environment variables. You must also specify the server name. ```sh -e VPN_PORT_FORWARDING=on -e VPN_PORT_FORWARDING_PROVIDER=private internet access -e VPN_PORT_FORWARDING_USERNAME=yourusername -e VPN_PORT_FORWARDING_PASSWORD=yourpassword -e SERVER_NAMES=the-tls-server-name ``` -------------------------------- ### Docker Run Command for Custom OpenVPN Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/openvpn-configuration-file.md This command demonstrates how to run the Gluetun container with a custom OpenVPN configuration file. Ensure to replace '/yourpath/custom.conf' with the actual path to your configuration file. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun -e VPN_SERVICE_PROVIDER=custom -e OPENVPN_CUSTOM_CONFIG=/gluetun/custom.conf -v /yourpath/custom.conf:/gluetun/custom.conf:ro -e OPENVPN_USER="youruser" -e OPENVPN_PASSWORD="yourpassword" qmcgaw/gluetun ``` -------------------------------- ### Run Gluetun with IVPN using OpenVPN Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/ivpn.md Use this command to run Gluetun with IVPN via OpenVPN. Ensure NET_ADMIN capability and the /dev/net/tun device are available. Required environment variables include VPN_SERVICE_PROVIDER, VPN_TYPE, OPENVPN_USER, and OPENVPN_PASSWORD. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=ivpn \ -e VPN_TYPE=openvpn -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -e SERVER_CITIES=amsterdam qmcgaw/gluetun ``` -------------------------------- ### Install libseccomp2 via Debian Package Manager on Debian x86 Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/prerequisites/32bit.md Attempt to upgrade libseccomp2 using the system's package manager. Check the version afterward to see if it meets the requirement of 2.4.2 or above. ```bash sudo apt-get update -y sudo apt-get install libseccomp2 sudo apt list libseccomp2 ``` -------------------------------- ### Run HideMyAss with Docker Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/hidemyass.md Use this command to run Gluetun with the HideMyAss VPN service. Ensure NET_ADMIN capability and the net/tun device are available. Required environment variables for authentication and server selection are included. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=hidemyass \ -e OPENVPN_USER=abc -e OPENVPN_PASSWORD=abc \ -e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun ``` -------------------------------- ### Upgrade libseccomp2 and Check Docker Version on Raspberry Pi Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/prerequisites/32bit.md Check the current libseccomp2 version and Docker version. If libseccomp2 is below 2.4.2 and Docker is below 19.03.9, download and install a newer libseccomp2 Debian package. ```bash sudo apt list libseccomp2 docker version --format {{.Server.Version}} wget -qO /tmp/libseccomp2.deb https://ftp.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb sudo dpkg -i /tmp/libseccomp2.deb rm /tmp/libseccomp2.deb sudo apt list libseccomp2 ``` -------------------------------- ### Configure Provider Settings Source: https://github.com/qdm12/gluetun-wiki/blob/main/contributing/add-a-provider.md Update the provider settings in `openvpnconf.go` to match common settings from OpenVPN configuration files. ```go providerSettings := utils.OpenVPNProviderSettings{ // ... } ``` -------------------------------- ### Mounting Client Certificate File Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/openvpn-client-certificate.md Place your client certificate in a file named `client.crt` within a directory on your host, and then bind mount this directory into the container. This method is for persistent storage of the certificate. ```bash -v /yourpath/gluetun:/gluetun ``` -------------------------------- ### Docker Compose for Windscribe Wireguard Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/windscribe.md Configure Gluetun with Windscribe using Wireguard via Docker Compose. This setup requires your Wireguard private key, addresses, and optionally a preshared key and server region. ```yml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=windscribe - VPN_TYPE=wireguard - WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= - WIREGUARD_ADDRESSES=10.64.222.21/32 - WIREGUARD_PRESHARED_KEY= - SERVER_REGIONS=Netherlands ``` -------------------------------- ### Run speedtest-cli for download speed Source: https://github.com/qdm12/gluetun-wiki/blob/main/faq/bandwidth.md Use this command to test download speeds on Linux/macOS hosts. Ensure you specify the server ID for accurate testing. ```bash speedtest-cli --no-upload --server ``` -------------------------------- ### Set Default Authentication Role via Environment Variable Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Configure the default authentication role for the HTTP control server using an environment variable. This is useful for quick setup without a configuration file. ```shell HTTP_CONTROL_SERVER_AUTH_DEFAULT_ROLE='{"auth":"basic","username":"myusername","password":"mypassword"}' ``` ```shell HTTP_CONTROL_SERVER_AUTH_DEFAULT_ROLE='{"auth":"apikey","apikey":"myapikey"}' ``` ```shell HTTP_CONTROL_SERVER_AUTH_DEFAULT_ROLE='{"auth":"none"}' ``` -------------------------------- ### No Authentication Configuration Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md Configure the control server to not require any authentication. This is highly discouraged for security reasons. ```toml auth = "none" ``` -------------------------------- ### Test IPv6 Connectivity via Container Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/ipv6.md Run this command to test if your Gluetun setup is correctly routing IPv6 traffic through the VPN. It uses `curl` within a temporary Alpine container connected to the Gluetun network. ```sh sudo docker run --rm --network=container:gluetun alpine:3.22 sh -c "apk add curl && curl -6 --silent https://ipv6.ipleak.net/json/" ``` -------------------------------- ### Configure IPVanish with Docker Compose Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/ipvanish.md This Docker Compose configuration sets up the Gluetun service for IPVanish. It includes necessary capabilities, device mappings, and environment variables for VPN credentials and server country selection. ```yml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=ipvanish - OPENVPN_USER=abc - OPENVPN_PASSWORD=abc - SERVER_COUNTRIES=Netherlands ``` -------------------------------- ### AirVPN Wireguard Docker Run Command Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/airvpn.md Use this command to run Gluetun with AirVPN using the Wireguard protocol. Ensure you have the necessary Wireguard keys and addresses from AirVPN. IPv6 addresses in WIREGUARD_ADDRESSES require container setup support. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=airvpn \ -e VPN_TYPE=wireguard \ -e WIREGUARD_PRIVATE_KEY=yCbHtKAgJASnJs2S/aZsjag9Fy04csmR4qDUDkJgX2c= \ -e WIREGUARD_PRESHARED_KEY=yCbHtKAgJASnJs2S/aZsjag9Fy04csmR4qDUDkJgX2c= \ -e WIREGUARD_ADDRESSES=10.99.99.99/32,ff:ff:ff...:ff/128 \ qmcgaw/gluetun ``` -------------------------------- ### Configure Gluetun with Perfect Privacy (Docker Compose) Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/perfect-privacy.md Set up Gluetun using Docker Compose for Perfect Privacy VPN. This configuration requires NET_ADMIN capability and the TUN device. Essential environment variables for VPN service, username, and password are included. ```yaml version: "3" services: gluetun: image: qmcgaw/gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun environment: - VPN_SERVICE_PROVIDER=perfect privacy - OPENVPN_USER=abc - OPENVPN_PASSWORD=abc - SERVER_CITIES=Amsterdam ``` -------------------------------- ### Register New Provider Source: https://github.com/qdm12/gluetun-wiki/blob/main/contributing/add-a-provider.md Register your provider implementation in the NewProviders function. This involves mapping your provider's constant name to its constructor, ensuring alphabetical order in the map. ```go providerNameToProvider := map[string]Provider{ // ... providers.YourProvider: yourprovider.New(storage, randSource, client, unzipper, updaterWarner, parallelResolver), // ... } ``` -------------------------------- ### Run Gluetun with VPN Secure via Docker CLI Source: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/vpn-secure.md Use this command to run Gluetun with VPN Secure. Ensure NET_ADMIN capability and the /dev/net/tun device are available. Mount a volume for Gluetun configuration and set required environment variables. ```sh docker run -it --rm --cap-add=NET_ADMIN --device /dev/net/tun \ -e VPN_SERVICE_PROVIDER=vpnsecure \ -v /yourpath/gluetun:/gluetun \ -e OPENVPN_KEY_PASSPHRASE=abc \ -e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun ```