-
Notifications
You must be signed in to change notification settings - Fork 0
Docker Run Examples
Alexander Zinchenko edited this page Jun 22, 2026
·
1 revision
docker run -d --name vpn \
--cap-add=NET_ADMIN \
--cap-add=SYS_ADMIN \
--device /dev/net/tun \
--sysctl net.ipv4.conf.all.src_valid_mark=1 \
-e TOKEN=your_nordvpn_token_here \
azinchen/nordvpn-wg
# Run application through VPN
docker run -d --name app --net=container:vpn nginxdocker run -d --name vpn \
--cap-add=NET_ADMIN \
--cap-add=SYS_ADMIN \
--device /dev/net/tun \
--sysctl net.ipv4.conf.all.src_valid_mark=1 \
-p 8080:8080 \
-p 9091:9091 \
-e TOKEN=your_nordvpn_token_here \
-e COUNTRY="Germany;NL;202" \
-e CITY="Amsterdam;6076868;uk2567" \
-e GROUP="Standard VPN servers" \
-e RANDOM_TOP=3 \
-e RECREATE_VPN_CRON="0 */6 * * *" \
-e NETWORK=192.168.1.0/24 \
azinchen/nordvpn-wg
# Applications using VPN (access via host ports)
docker run -d --name webapp --net=container:vpn \
nginx:alpine
docker run -d --name api-service --net=container:vpn \
-v ./app:/app -w /app \
node:alpine npm start-
--cap-add=NET_ADMINand--device /dev/net/tunare always required. -
Ports must be published on the VPN container (
-pon thevpncontainer), not on the application containers. - Application containers connect via
--net=container:vpn. - For GitHub Container Registry, replace
azinchen/nordvpn-wgwithghcr.io/azinchen/nordvpn-wg.
Configuration
- Server Selection
- Server Groups
- IPv6 Configuration
- Automatic Reconnection
- Local Network Access
- VPN Gateway Mode
- Custom DNS
- Permissions
Security
Examples
Operations
Reference