Port forwarding helps you get better download speeds by allowing incoming connections to your torrent client. YAMS enables port forwarding by default, but setup varies by VPN provider.
ProtonVPN makes port forwarding easy! Just follow these steps:
/your/install/location
:mkdir -p /your/install/location/scripts
nano /your/install/location/scripts/update-port.sh
QBITTORRENT_USER=admin # qbittorrent username
QBITTORRENT_PASS=adminadmin # qbittorrent password
chmod +x /your/install/location/scripts/update-port.sh
./your/install/location/scripts/update-port.sh
You should see an output similar to this:
2024-12-30 08:21:58 | VPN container gluetun in healthy state!
2024-12-30 08:21:58 | qBittorrent Cookie invalid, getting new SessionID
2024-12-30 08:21:58 | Public IP: 111.111.111.111
2024-12-30 08:21:58 | Configured Port: 61009
2024-12-30 08:21:58 | Active Port: 61009
2024-12-30 08:21:58 | Port OK (Act: 61009 Cfg: 61009)
(crontab -l 2>/dev/null; echo "*/5 * * * * /your/install/location/scripts/update-port.sh") | crontab -
For other VPN providers, port forwarding configuration varies.
For detailed provider-specific instructions, check the Gluetun Port Forwarding Documentation.
To check if port forwarding is working:
curl http://localhost:8003/v1/openvpn/portforwarded
to see your current portNo port shown:
docker logs gluetun | grep "\[port forwarding\]"
Look for any error messages
Port not updating:
crontab -l
tail -f /var/log/syslog | grep update-port
Need help? Visit our Common Issues page or join our Discord or Matrix chat!