- Use WireGuard (vs OpenVPN): 50-100% faster
- Enable Port Forwarding (if supported): 2-3x more peers
- Choose nearby servers: Lower latency, better speeds
- Increase Docker resources: 4GB+ RAM, 4+ CPUs recommended
- Speed: 2-3x faster than OpenVPN
- CPU Usage: 50-70% less CPU than OpenVPN
- Latency: 20-40% lower ping
- Modern Crypto: ChaCha20, faster on most hardware
Use WireGuard for: Mullvad, ProtonVPN, PIA, Surfshark
- Speed: Slower but more mature
- Compatibility: Works everywhere
- CPU Usage: Higher overhead
Use OpenVPN when: Provider doesn't support WireGuard, or compatibility needed
Optimize Docker Desktop for better performance:
-
Open Docker Desktop → Settings → Resources
-
Recommended Settings:
- CPUs: 4-6 cores
- Memory: 4-8 GB
- Swap: 2 GB
- Disk: 50 GB+
-
Apply & Restart
- More CPUs = Better encryption performance
- More RAM = More connections, better caching
- More Disk = Prometheus metrics storage
-
Open qBittorrent → Settings → Connection
-
Recommended:
Global maximum connections: 500 Maximum per torrent: 100 Global maximum upload slots: 50 Maximum per torrent upload slots: 4 ✅ Use UPnP/NAT-PMP: DISABLE (conflicts with port forwarding) ✅ Use different port on each startup: DISABLE -
With Port Forwarding:
- Port will be auto-synced by
gluetun-qbittorrent-port-manager - Don't manually change port
- Port will be auto-synced by
-
Without Port Forwarding:
- Increase max connections to compensate
- Lower expectations for seeding
-
Settings → Speed
-
Recommended:
Global Download Limit: 0 (unlimited) Global Upload Limit: 0 or set reasonable limit Alternative Rate Limits: - Use if you need bandwidth for other apps - Set schedule for off-peak hours
-
Settings → BitTorrent
-
Recommended:
✅ Enable DHT ✅ Enable PeX ✅ Enable Local Peer Discovery ✅ Enable encryption: Require encryption (for privacy) ✅ Enable anonymous mode (for extra privacy)
Best Servers: Netherlands, Sweden, Switzerland (low latency, high speed)
Optimal Settings:
VPN_TYPE=wireguard # Much faster than OpenVPN
VPN_PORT_FORWARDING=on # Enable on all servers
SERVER_COUNTRIES=Netherlands,SwedenExpected Performance:
- Download: 250-400 Mbps
- Upload: 150-250 Mbps
- Peers: 100-200+ with port forwarding
Best Servers: Plus servers (pm) in Netherlands, Switzerland, Iceland
Optimal Settings:
VPN_TYPE=wireguard # Faster than OpenVPN
VPN_PORT_FORWARDING=on
VPN_PORT_FORWARDING_PROVIDER=protonvpn # REQUIRED
SERVER_COUNTRIES=Netherlands,SwitzerlandImportant: Use P2P-optimized servers for port forwarding
Expected Performance:
- Download: 150-300 Mbps
- Upload: 80-150 Mbps
- Peers: 80-150+ with port forwarding
Best Servers: P2P-optimized servers in Netherlands, Canada, Spain
Optimal Settings:
VPN_TYPE=openvpn # WireGuard support limited
VPN_PORT_FORWARDING=off # Not supported
SERVER_COUNTRIES=Netherlands,CanadaCompensating for No Port Forwarding:
- Increase max connections in qBittorrent (500-1000)
- Use well-seeded torrents
- Be patient with peer discovery
- Consider switching to Mullvad/PIA if torrenting is priority
Expected Performance:
- Download: 200-350 Mbps (but fewer peers)
- Upload: 100-200 Mbps (but limited connectivity)
- Peers: 30-60 (limited without port forwarding)
# Run benchmark
./scripts/benchmark-vpn.sh
# Check results
cat benchmark-results.json# Verify connected to VPN
docker exec gluetun wget -qO- https://api.ipify.org
# Check Gluetun logs
docker logs gluetun | tail -50# In .env, try different country
SERVER_COUNTRIES=Netherlands # or Sweden, Switzerland, etc.
# Restart
docker compose restart gluetun# In .env
VPN_TYPE=wireguard # Change from openvpn
# Restart
docker compose down && docker compose up -d# Check Docker stats
docker stats
# If high CPU/memory, increase Docker resources (see above)If monitoring (Prometheus/Grafana) is using too much resources:
# Reduce Prometheus retention
# In docker-compose.yml:
prometheus:
command:
- '--storage.tsdb.retention.time=7d' # Reduce from 30d# Run backups during off-peak hours
BACKUP_SCHEDULE_HOUR=3 # 3 AM# WireGuard (faster)
VPN_TYPE=wireguard
# OpenVPN TCP (more stable, slower)
VPN_TYPE=openvpn
OPENVPN_PROTOCOL=tcp
# OpenVPN UDP (faster, less stable)
VPN_TYPE=openvpn
OPENVPN_PROTOCOL=udp- Download: 200-400 Mbps
- Upload: 100-250 Mbps
- Peers: 100-300+
- Seeding: Excellent
- Latency: 10-30ms
- Download: 150-300 Mbps (limited peers)
- Upload: 80-150 Mbps (very limited)
- Peers: 30-80
- Seeding: Poor
- Latency: 15-40ms
- Download: 100-250 Mbps
- Upload: 50-150 Mbps
- Peers: 100-250+
- Seeding: Good
- Latency: 20-50ms
Use Grafana dashboards (if monitoring enabled):
- VPN Dashboard: Connection status, uptime
- qBittorrent Dashboard: Download/upload speeds, peers
- System Dashboard: CPU, memory, network usage
Access: http://localhost:3000
- Use WireGuard (not OpenVPN)
- Enable port forwarding (if provider supports)
- Choose nearby servers
- Allocate 4GB+ RAM to Docker
- Disable UPnP in qBittorrent
- Enable encryption in qBittorrent
- Increase max connections (500+)
- Test with benchmark script
- Monitor performance with Grafana
Need more help? Check Provider Comparison or Troubleshooting Guide