-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Symptoms: Container starts but the tunnel never comes up, or it crash-loops.
Check:
-
Token: Verify
TOKENis a valid, unexpired NordVPN access token.CRITICAL: TOKEN is not setorcould not obtain WireGuard private key from NordVPN APImeans the token is missing/invalid. See Getting a Token. -
Logs:
docker logs vpn— look for the[VPN-CONFIG]and[SERVICE-NORDVPN]lines. -
API access: The container needs HTTPS access to NordVPN API IPs during bootstrap. Behind a corporate proxy/firewall, ensure TCP/443 to the
NORDVPNAPI_IPaddresses is allowed. -
TUN device: Ensure
--device /dev/net/tunis set and the device exists on the host. -
Capabilities: WireGuard needs
NET_ADMIN, plusSYS_ADMINandnet.ipv4.conf.all.src_valid_mark=1(orprivileged: true) sowg-quickcan set its routing policy.
Symptoms: wg0 exists but nothing flows.
Check:
-
Handshake:
docker exec vpn wg show wg0. If you see0 B receivedand nolatest handshake, the NordLynx handshake isn't completing — usually a transient/overloaded server or rate-limiting. Wait for the health/scheduled reconnect, or restart to pick a new server. -
Firewall:
docker exec vpn iptables -S OUTPUT— verify the-o wg0 -j ACCEPTrule exists. -
Diagnostics:
docker exec vpn /usr/local/bin/network-diagnostic
Fix: Use health monitoring and scheduled switching:
environment:
- CHECK_CONNECTION_CRON=*/5 * * * *
- CHECK_CONNECTION_URL=https://1.1.1.1
- RECREATE_VPN_CRON=0 */6 * * *See Automatic Reconnection for details.
Symptoms: docker exec app curl https://example.com fails.
Check:
-
VPN is up:
docker exec vpn wg show wg0— confirm a recent handshake. -
DNS:
docker exec vpn cat /etc/resolv.conf— should list the VPN DNS servers the container wrote (default103.86.96.100/103.86.99.100, or yourDNSoverride). See Custom DNS. -
Firewall:
docker exec vpn iptables -S— verify the OUTPUT chain allows traffic via wg0.
Fix: Set NETWORK to include your LAN CIDR:
-e NETWORK=192.168.1.0/24Docker subnets are not auto-allowed. If inter-container communication is needed, include Docker's subnet too.
Check:
- Run diagnostics:
docker exec vpn /usr/local/bin/network-diagnostic - Look at the DNS section — nameservers should be VPN-provided addresses, reached over
wg0 - If using IPv6, it may bypass the VPN. See IPv6 Configuration
Cause: NETWORK CIDRs are always allowed, regardless of VPN state. If you set NETWORK=0.0.0.0/0, all traffic bypasses the VPN.
Fix: Keep NETWORK as narrow as possible — only include your LAN subnet and any Docker networks that need direct access.
Symptoms: Errors like iptables: No chain/target/match by that name or Permission denied.
Check:
-
NET_ADMIN capability: Ensure
--cap-add=NET_ADMINis set. -
Kernel compatibility: The container auto-detects nft vs legacy. Check logs for
[ENTRYPOINT] Using IPv4 backend:to see which was selected. - Host iptables/WireGuard modules: Some minimal hosts (e.g., certain NAS devices) may lack required kernel modules.
Add the SYS_ADMIN capability and net.ipv4.conf.all.src_valid_mark=1 sysctl (or run privileged: true). See the compose snippet in Docker Compose Examples.
Check:
- Syntax: Valid cron format (5 fields). Invalid expressions are silently ignored by crond.
-
Logs: Look for
[INIT-SETUPCRON]lines at startup — they show the parsed schedule in human-readable format. -
Crontab:
docker exec vpn cat /var/spool/cron/crontabs/root
Enable automatic diagnostics on every VPN connection:
-e NETWORK_DIAGNOSTIC_ENABLED=trueOr run manually:
docker exec vpn /usr/local/bin/network-diagnostic # full diagnostics
docker exec vpn /usr/local/bin/network-diagnostic --basic # IP + location onlyThe diagnostic tool checks: public IP and geolocation, WireGuard status, network interfaces, firewall rules, DNS nameservers, IP routing table, and kernel version.
docker logs vpn # full logs
docker logs -f vpn # follow in real-time
docker logs --tail 50 vpn # last 50 linesKey log messages:
| Log message | Meaning |
|---|---|
[ENTRYPOINT] Using IPv4 backend: ... |
Firewall backend selected |
[VPN-CONFIG] Selected server ... |
Selected VPN server |
[SERVICE-NORDVPN] VPN connected successfully |
wg0 came up (verify with a handshake) |
[SERVICE-NORDVPN] VPN connection timeout |
Tunnel didn't establish in time |
[HEALTHCHECK] Connection check failed |
Health check triggered reconnection |
docker exec vpn wg show wg0 # WireGuard peer/handshake/transfer
docker exec vpn ip route # view routing table
docker exec vpn iptables -S # check iptables rules
docker exec vpn cat /etc/resolv.conf # active DNS servers
docker exec vpn env | sort # check environmentConfiguration
- Server Selection
- Server Groups
- IPv6 Configuration
- Automatic Reconnection
- Local Network Access
- VPN Gateway Mode
- Custom DNS
- Permissions
Security
Examples
Operations
Reference