supersunho/adguardvpn-cli

By supersunho

Updated about 1 month ago

Multi-arch AdGuard VPN CLI containers with automated builds and cross-platform support

Image
Networking
3

10K+

supersunho/adguardvpn-cli repository overview

Contributors Forks Stargazers Issues


Warning

We're currently experiencing auto login issues. After running the container, please manually authenticate through the link that appears in the output and wait a moment - it should work normally after that. Just a heads up again that the automatic login flow isn't working properly at the moment. (2026-01-13)
Docker-AdguardVPN-CLI

AdGuard VPN CLI within a Docker container
Report Bug · Request Feature

About The Project

This project allows you to use AdguardVPN-CLI within a Docker container. It provides a simple and efficient way to manage AdguardVPN through the command line in a containerized environment.

Important

**Authentication Change Notice**: As of version 1.5.10, AdGuard VPN CLI has transitioned from username/password authentication to web-based authentication. The old `ADGUARD_USERNAME` and `ADGUARD_PASSWORD` environment variables are no longer used for authentication, but are kept for backward compatibility in configuration.

Getting Started

Before proceeding, please review the following content and create your .env file accordingly. You can refer to the .env.sample file provided in this repository for guidance.

Authentication Setup

Important

**New Authentication Process**: AdGuard VPN CLI now uses web-based authentication instead of username/password. You need to perform an initial authentication using the web flow before the VPN can connect.
  1. First-time Setup:

    • Start the main container: docker-compose up -d
    • Check the logs to find the authentication link: docker logs adguard-vpn-cli
    • When running adguardvpn-cli for the first time, check the docker logs for the authentication link. Once you access the link and complete the authentication, you won't need to authenticate again for subsequent runs. The link format looks like https://auth.adguard.io/device_code?user_code=xxxx.
    • Note: If you have authenticated via the web browser, please wait a moment for the process to continue automatically. It is not frozen.
    • Warning: If Two-Factor Authentication (2FA) is enabled on your account, you may experience issues with this login process.
  2. Volume Mount: The container now mounts ./data directory to persist authentication credentials across container restarts.

How to use

AdguardVPN-CLI + qBittorrent

version: "3"
services:
    adguard-vpn-cli:
        image: supersunho/adguardvpn-cli:latest
        restart: unless-stopped
        container_name: adguard-vpn-cli
        env_file: .env
        volumes:
            - ./data:/root/.local/share/adguardvpn-cli
        healthcheck:
            test: ping -c 1 www.google.com || exit 1
            interval: 1m
            timeout: 10s
            retries: 1
        cap_add:
            - NET_ADMIN
        devices:
            - /dev/net/tun
        ports:
            - 6089:6089
            - 6881:6881
            - 6881:6881/udp
    qbittorrent:
        image: linuxserver/qbittorrent:latest
        container_name: qbittorrent
        environment:
            - PUID=0
            - PGID=0
            - TZ=Asia/Seoul
        volumes:
            - ./config:/config
            - ./downloads:/downloads
        devices:
            - /dev/fuse:/dev/fuse:rwm
        cap_add:
            - SYS_ADMIN
        depends_on:
            - adguard-vpn-cli
        network_mode: service:adguard-vpn-cli

(back to top)

Prerequisites

VariableDescriptionDefault valueAllow values
ADGUARD_USERNAMEUsername for login"username"
ADGUARD_PASSWORDPassword for login"password"
ADGUARD_CONNECTION_LOCATIONDefaults to the last used location"JP"
ADGUARD_CONNECTION_TYPESet VPN operating mode"TUN"TUN / SOCKS
ADGUARD_SOCKS5_USERNAMESet the SOCKS username"username"
ADGUARD_SOCKS5_PASSWORDSet the SOCKS password"password"
ADGUARD_SOCKS5_HOSTSet the SOCKS listen host."127.0.0.1"
ADGUARD_SOCKS5_PORTSet the SOCKS port1080
ADGUARD_SEND_REPORTSSend crash reports to developersfalsetrue / false
ADGUARD_SET_SYSTEM_DNSSet the system DNS serversfalsetrue / false
ADGUARD_USE_CUSTOM_DNSUse the custom DNS serverstruetrue / false
ADGUARD_CUSTOM_DNSSet the DNS upstream server"1.1.1.1"
ADGUARD_USE_KILL_SWITCHUse the Kill Switchtruetrue / false
ADGUARD_USE_KILL_SWITCH_CHECK_INTERVALCheck interval for Kill Switch30
ADGUARD_UPDATE_CHANNELSet update channel"release"release / beta / nightly
ADGUARD_SHOW_HINTSShow hints after command execution"on"on / off
ADGUARD_DEBUG_LOGGINGSet debug logging"on"on / off
ADGUARD_SHOW_NOTIFICATIONSGet notified about the status of the VPN connection"on"on / off
ADGUARD_PROTOCOLSet the protocol used by AdGuard VPN"auto"auto / http2 / quic
ADGUARD_POST_QUANTUMSet whether to use advanced cryptographic algorithms resistant to quantum computer attacks to protect your traffic from potential future threats"off"on / off
ADGUARD_TELEMETRYSet whether to send anonymized usage data to developersfalsetrue / false
ADGUARD_TUN_ROUTING_MODESet VPN tunnel routing mode"AUTO"AUTO / SCRIPT / NONE
ADGUARD_BOUND_IF_OVERRIDEOverride network interface to use for outbound VPN traffic (pass "" to disable)""interface name or ""
✨ADGUARD_MAX_LEAK_TOLERANCETermination on first leak (0 = immediate termination on first leak)0
✨ADGUARD_LEAK_WARNING_ONLYWhen a leak, only an warning (true = warning only, false = terminate)falsetrue / false
✨ADGUARD_MAX_IP_DETECTION_RETRIESMaximum number of IP detection attempts3number
✨ADGUARD_IP_DETECTION_RETRY_DELAYIP detection retry delay Seconds10number

Important

- `ADGUARD_SOCKS5_HOST`: For non-localhost addresses, you need to protect the proxy with a username and password. - `ADGUARD_USE_KILL_SWITCH_CHECK_INTERVAL`: A very short check interval is not recommended. - **Authentication Variables**: `ADGUARD_USERNAME` and `ADGUARD_PASSWORD` are no longer used for authentication as of version 1.5.10. Authentication is now done via web-based flow. These variables are kept for backward compatibility in other configuration aspects.

(back to top)

Location

Please check the location and add the city, country or ISO code to ADGUARD_CONNECTION_LOCATION

ISOCountryCity
AEUAEDubai
ARArgentinaBuenos Aires
ATAustriaVienna
AUAustraliaSydney
BEBelgiumBrussels
BGBulgariaSofia
BRBrazilSão Paulo
CACanadaVancouver
CACanadaMontreal
CACanadaToronto
CHSwitzerlandZurich
CLChileSantiago
CNChinaShanghai
COColombiaBogota
CYCyprusNicosia
CZCzechiaPrague
DEGermanyBerlin
DEGermanyFrankfurt
DKDenmarkCopenhagen
EEEstoniaTallinn
EGEgyptCairo
ESSpainBarcelona
ESSpainMadrid
FIFinlandHelsinki
FRFranceParis
FRFranceMarseille
GBUnited KingdomManchester
GBUnited KingdomLondon
GRGreeceAthens
HKHong KongHong Kong
HRCroatiaZagreb
HUHungaryBudapest
IDIndonesiaJakarta
IEIrelandDublin
ILIsraelTel Aviv
INIndiaMumbai
IRIranTehran
ISIcelandReykjavik
ITItalyRome
ITItalyMilan
ITItalyPalermo
JPJapanTokyo
KHCambodiaPhnom Penh
KRSouth KoreaSeoul
KZKazakhstanAstana
LTLithuaniaVilnius
LULuxembourgLuxembourg
LVLatviaRiga
MDMoldovaChișinău
MXMexicoMexico City
NGNigeriaLagos
NLNetherlandsAmsterdam
NONorwayOslo
NPNepalKathmandu
NZNew ZealandAuckland
PEPeruLima
PHPhilippinesManila
PLPolandWarsaw
PTPortugalLisbon
RORomaniaBucharest
RSSerbiaBelgrade
RURussiaMoscow
SESwedenStockholm
SGSingaporeSingapore
SKSlovakiaBratislava
THThailandBangkok
TRTurkeyIstanbul
TWTaiwanTaipei
UAUkraineKyiv
USUnited StatesSeattle
USUnited StatesSilicon Valley
USUnited StatesPhoenix
USUnited StatesLas Vegas
USUnited StatesDenver
USUnited StatesDallas
USUnited StatesLos Angeles
USUnited StatesAtlanta
USUnited StatesNew York
USUnited StatesMiami
USUnited StatesBoston
USUnited StatesChicago
VNVietnamHanoi
ZASouth AfricaJohannesburg

(back to top)

References

(back to top)

Tag summary

Content type

Image

Digest

sha256:e53d35de4

Size

62.1 MB

Last updated

about 1 month ago

docker pull supersunho/adguardvpn-cli