Multi-architecture AdGuard VPN CLI in Docker containers
Universal compatibility โข Automated builds โข Production ready
Report Bug
ยท
Request Feature
This project provides AdGuard VPN CLI in Docker containers with universal multi-architecture support. Built with automated CI/CD pipelines, it offers seamless VPN connectivity across all major platforms in a containerized environment.
- ๐๏ธ Multi-Architecture Support: Native builds for
amd64
,arm64
, andarmv7
- ๐ค Automated Builds: Daily builds tracking latest AdGuard VPN CLI releases
- ๐ณ Dual Registry: Available on both Docker Hub and GitHub Container Registry
- ๐ Kill Switch: Built-in network protection when VPN disconnects
- ๐ SOCKS5 Proxy: Optional proxy server functionality
- โก Production Ready: Optimized for performance and reliability
- Base: Ubuntu 24.04 LTS for maximum compatibility
- Build System: Docker Buildx with GitHub Actions
- Architecture: Multi-stage builds with optimized caching
- Security: Non-root execution and health checks
One command works on any architecture:
# Pull the latest image (auto-detects your architecture)
docker pull supersunho/adguardvpn-cli:latest
# Run with environment variables
docker run -d \
--name adguard-vpn \
--cap-add NET_ADMIN \
--device /dev/net/tun \
-e ADGUARD_USERNAME="your_username" \
-e ADGUARD_PASSWORD="your_password" \
-e ADGUARD_CONNECTION_LOCATION="US" \
supersunho/adguardvpn-cli:latest
# Universal images (auto-detect architecture)
supersunho/adguardvpn-cli:latest # Latest version
supersunho/adguardvpn-cli:1.2.37 # Specific version
# Architecture-specific images
supersunho/adguardvpn-cli:latest-amd64 # Intel/AMD (x86_64)
supersunho/adguardvpn-cli:latest-arm64 # Apple Silicon/ARM64
supersunho/adguardvpn-cli:latest-armv7 # Raspberry Pi/ARMv7
# Universal images
ghcr.io/supersunho/docker-adguardvpn-cli:latest # Latest version
ghcr.io/supersunho/docker-adguardvpn-cli:1.2.37 # Specific version
# Architecture-specific images
ghcr.io/supersunho/docker-adguardvpn-cli:latest-amd64
ghcr.io/supersunho/docker-adguardvpn-cli:latest-arm64
ghcr.io/supersunho/docker-adguardvpn-cli:latest-armv7
Create a .env
file with your credentials (see Environment Variables):
ADGUARD_USERNAME=your_username
ADGUARD_PASSWORD=your_password
ADGUARD_CONNECTION_LOCATION=US
ADGUARD_CONNECTION_TYPE=TUN
ADGUARD_USE_KILL_SWITCH=true
Then use this docker-compose.yml
:
version: "3.8"
services:
adguard-vpn-cli:
image: supersunho/adguardvpn-cli:latest
container_name: adguard-vpn-cli
restart: unless-stopped
env_file: .env
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
ports:
- "6089:6089" # qBittorrent WebUI
- "6881:6881" # BitTorrent TCP
- "6881:6881/udp" # BitTorrent UDP
healthcheck:
test: ["CMD", "ping", "-c", "1", "www.google.com"]
interval: 60s
timeout: 10s
retries: 3
qbittorrent:
image: linuxserver/qbittorrent:latest
container_name: qbittorrent
depends_on:
- adguard-vpn-cli
network_mode: service:adguard-vpn-cli
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Seoul
volumes:
- ./config:/config
- ./downloads:/downloads
restart: unless-stopped
version: "3.8"
services:
adguard-vpn:
image: supersunho/adguardvpn-cli:latest
container_name: adguard-vpn
restart: unless-stopped
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
ports:
- "1080:1080" # SOCKS5 proxy
environment:
- ADGUARD_USERNAME=your_username
- ADGUARD_PASSWORD=your_password
- ADGUARD_CONNECTION_LOCATION=JP
- ADGUARD_CONNECTION_TYPE=SOCKS5
- ADGUARD_SOCKS5_HOST=0.0.0.0
- ADGUARD_SOCKS5_PORT=1080
- ADGUARD_USE_KILL_SWITCH=true
Variable | Description | Default | Example |
---|---|---|---|
ADGUARD_USERNAME |
Your AdGuard VPN username | "username" |
"john.doe@example.com" |
ADGUARD_PASSWORD |
Your AdGuard VPN password | "password" |
"your_secure_password" |
Variable | Description | Default | Allowed Values |
---|---|---|---|
ADGUARD_CONNECTION_LOCATION |
VPN server location | "JP" |
See Available Locations |
ADGUARD_CONNECTION_TYPE |
VPN operating mode | "TUN" |
TUN / SOCKS5 |
Variable | Description | Default | Notes |
---|---|---|---|
ADGUARD_SOCKS5_USERNAME |
SOCKS5 proxy username | "username" |
Required for non-localhost access |
ADGUARD_SOCKS5_PASSWORD |
SOCKS5 proxy password | "password" |
Required for non-localhost access |
ADGUARD_SOCKS5_HOST |
SOCKS5 listen address | "127.0.0.1" |
Use 0.0.0.0 for external access |
ADGUARD_SOCKS5_PORT |
SOCKS5 listen port | 1080 |
Any available port |
Variable | Description | Default | Allowed Values |
---|---|---|---|
ADGUARD_USE_KILL_SWITCH |
Enable kill switch protection | true |
true / false |
ADGUARD_USE_KILL_SWITCH_CHECK_INTERVAL |
Kill switch check interval (seconds) | 30 |
10 or higher recommended |
ADGUARD_SET_SYSTEM_DNS |
Set system DNS servers | false |
true / false |
ADGUARD_USE_CUSTOM_DNS |
Use custom DNS servers | true |
true / false |
ADGUARD_CUSTOM_DNS |
Custom DNS server | "1.1.1.1" |
Any valid DNS server |
Variable | Description | Default | Allowed Values |
---|---|---|---|
ADGUARD_USE_QUIC |
Enable QUIC protocol | true |
true / false |
ADGUARD_SEND_REPORTS |
Send crash reports | false |
true / false |
Important
SOCKS5 Security: When setting ADGUARD_SOCKS5_HOST
to non-localhost addresses (e.g., 0.0.0.0
), always protect the proxy with username and password authentication.
Tip
Kill Switch Interval: Very short check intervals (< 10 seconds) can cause unnecessary resource usage. 30 seconds is recommended for most use cases.
Choose any City, Country, or ISO Code for ADGUARD_CONNECTION_LOCATION
:
๐บ๏ธ Complete Location List (Click to expand)
ISO | Country | City |
---|---|---|
๐บ๐ธ US | United States | Seattle, Silicon Valley, Phoenix, Las Vegas, Denver, Dallas, Los Angeles, Atlanta, New York, Miami, Boston, Chicago |
๐ฉ๐ช DE | Germany | Berlin, Frankfurt |
๐ฌ๐ง GB | United Kingdom | Manchester, London |
๐ซ๐ท FR | France | Paris, Marseille |
๐ช๐ธ ES | Spain | Barcelona, Madrid |
๐ฎ๐น IT | Italy | Rome, Milan, Palermo |
๐จ๐ฆ CA | Canada | Vancouver, Montreal, Toronto |
๐ฏ๐ต JP | Japan | Tokyo |
๐ฐ๐ท KR | South Korea | Seoul |
๐ฆ๐บ AU | Australia | Sydney |
๐ธ๐ฌ SG | Singapore | Singapore |
๐ญ๐ฐ HK | Hong Kong | Hong Kong |
๐น๐ผ TW | Taiwan | Taipei |
๐ณ๐ฑ NL | Netherlands | Amsterdam |
๐จ๐ญ CH | Switzerland | Zurich |
๐ฆ๐น AT | Austria | Vienna |
๐ง๐ช BE | Belgium | Brussels |
๐ฉ๐ฐ DK | Denmark | Copenhagen |
๐ซ๐ฎ FI | Finland | Helsinki |
๐ณ๐ด NO | Norway | Oslo |
๐ธ๐ช SE | Sweden | Stockholm |
๐ต๐ฑ PL | Poland | Warsaw |
๐จ๐ฟ CZ | Czechia | Prague |
๐ญ๐บ HU | Hungary | Budapest |
๐ท๐ด RO | Romania | Bucharest |
๐ง๐ฌ BG | Bulgaria | Sofia |
๐ฌ๐ท GR | Greece | Athens |
๐ช๐ช EE | Estonia | Tallinn |
๐ฑ๐ป LV | Latvia | Riga |
๐ฑ๐น LT | Lithuania | Vilnius |
๐ฑ๐บ LU | Luxembourg | Luxembourg |
๐ฎ๐ช IE | Ireland | Dublin |
๐ต๐น PT | Portugal | Lisbon |
๐ท๐บ RU | Russia | Moscow |
๐บ๐ฆ UA | Ukraine | Kyiv |
๐ฐ๐ฟ KZ | Kazakhstan | Astana |
๐ฒ๐ฉ MD | Moldova | Chiศinฤu |
๐ท๐ธ RS | Serbia | Belgrade |
๐ญ๐ท HR | Croatia | Zagreb |
๐ธ๐ฐ SK | Slovakia | Bratislava |
๐จ๐พ CY | Cyprus | Nicosia |
๐ฎ๐ธ IS | Iceland | Reykjavik |
๐น๐ท TR | Turkey | Istanbul |
๐ฎ๐ฑ IL | Israel | Tel Aviv |
๐ฆ๐ช AE | UAE | Dubai |
๐ช๐ฌ EG | Egypt | Cairo |
๐ฎ๐ท IR | Iran | Tehran |
๐ฎ๐ณ IN | India | Mumbai |
๐จ๐ณ CN | China | Shanghai |
๐น๐ญ TH | Thailand | Bangkok |
๐ป๐ณ VN | Vietnam | Hanoi |
๐ต๐ญ PH | Philippines | Manila |
๐ฎ๐ฉ ID | Indonesia | Jakarta |
๐ฐ๐ญ KH | Cambodia | Phnom Penh |
๐ณ๐ต NP | Nepal | Kathmandu |
๐ณ๐ฟ NZ | New Zealand | Auckland |
๐ฟ๐ฆ ZA | South Africa | Johannesburg |
๐ณ๐ฌ NG | Nigeria | Lagos |
๐ง๐ท BR | Brazil | Sรฃo Paulo |
๐ฆ๐ท AR | Argentina | Buenos Aires |
๐จ๐ฑ CL | Chile | Santiago |
๐จ๐ด CO | Colombia | Bogotรก |
๐ต๐ช PE | Peru | Lima |
๐ฒ๐ฝ MX | Mexico | Mexico City |
ADGUARD_CONNECTION_LOCATION="US" # Any US server
ADGUARD_CONNECTION_LOCATION="Japan" # Any Japan server
ADGUARD_CONNECTION_LOCATION="London" # London specifically
ADGUARD_CONNECTION_LOCATION="Silicon Valley" # Silicon Valley specifically
This project provides native performance across all major architectures:
Architecture | Platform Examples | Performance |
---|---|---|
amd64 | Intel/AMD desktops, cloud instances | โก Excellent |
arm64 | Apple Silicon (M1/M2/M3), ARM servers | โก Native |
armv7 | Raspberry Pi 3/4, IoT devices | โ Optimized |
Docker automatically selects the optimal image for your platform:
# Same command works everywhere
docker pull supersunho/adguardvpn-cli:latest
# Results:
# Intel/AMD (x86_64) โ pulls amd64 image
# Apple Silicon (M1/M2) โ pulls arm64 image
# Raspberry Pi โ pulls armv7 image
If needed, you can explicitly specify an architecture:
# Intel/AMD optimized
docker pull supersunho/adguardvpn-cli:latest-amd64
# Apple Silicon optimized
docker pull supersunho/adguardvpn-cli:latest-arm64
# Raspberry Pi optimized
docker pull supersunho/adguardvpn-cli:latest-armv7
- Daily Builds: Automatically track latest AdGuard VPN CLI releases
- Manual Triggers: On-demand builds via GitHub Actions
- Multi-Registry: Simultaneous publishing to Docker Hub and GHCR
Every build includes comprehensive testing:
- โ Binary verification across all architectures
- โ Version compatibility checks
- โ Container health validation
- โ Multi-platform manifest creation
Check the latest build status: GitHub Actions
VPN connection fails
- Check credentials: Ensure
ADGUARD_USERNAME
andADGUARD_PASSWORD
are correct - Verify location: Use a valid location from the Available Locations list
- Check permissions: Container needs
NET_ADMIN
capability and/dev/net/tun
access
docker logs adguard-vpn-cli
Kill switch not working
- Enable kill switch: Set
ADGUARD_USE_KILL_SWITCH=true
- Check interval: Ensure
ADGUARD_USE_KILL_SWITCH_CHECK_INTERVAL
is reasonable (โฅ10 seconds) - Network configuration: Verify TUN interface is available
SOCKS5 proxy not accessible
- Host binding: Set
ADGUARD_SOCKS5_HOST=0.0.0.0
for external access - Authentication: Configure
ADGUARD_SOCKS5_USERNAME
andADGUARD_SOCKS5_PASSWORD
- Port mapping: Ensure Docker port mapping matches
ADGUARD_SOCKS5_PORT
# Check container health
docker inspect adguard-vpn-cli --format='{{.State.Health.Status}}'
# View detailed logs
docker logs --follow adguard-vpn-cli
# Test VPN connectivity
docker exec adguard-vpn-cli curl -s ipinfo.io/ip
Contributions make the open source community amazing! Any contributions are greatly appreciated.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Found a bug? Please check existing issues first, then create a new one with:
- Environment details (OS, Docker version, architecture)
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs
- AdGuard Team - Original AdGuard VPN CLI