Slow Upload Speeds with qBittorrent & Gluetun (AirVPN) Docker Setup – Help Needed!

I’m running a media server using Docker with qBittorrent and Gluetun. I’ve set up qBittorrent to use the VPN connection (via Gluetun), but I’m still experiencing slow upload speeds (100-200 KiB/s), even with 313 active torrents.

When I disable the VPN, the speeds improve dramatically (9GB uploaded in 10 minutes). So, the issue seems to be related to the VPN (AirVPN in this case). I’ve selected a server in my city using the configuration generated by the AirVPN config generator.

Below is my docker-compose.yml configuration for reference:

​´

services:

gluetun:

image: qmcgaw/gluetun

container_name: gluetun

cap_add:

- NET_ADMIN # Allows VPN container to manage network interfaces

environment:

- TZ=Europe/Stockholm # Set the timezone

- VPN_SERVICE_PROVIDER=airvpn # AirVPN as the provider

- VPN_TYPE=wireguard # Using WireGuard VPN protocol

- WIREGUARD_PRIVATE_KEY=########### # Replace with your private key

- WIREGUARD_PRESHARED_KEY=######### # Replace with your preshared key

- WIREGUARD_ADDRESSES=#######/32 # VPN address

- WIREGUARD_ENDPOINT_IP=########## # VPN server IP

- WIREGUARD_ENDPOINT_PORT=1637 # VPN endpoint port

- SERVER_COUNTRIES=Sweden # Choose a country (Sweden here)

- FIREWALL_VPN_INPUT_PORTS=38746 # Ensure your torrent port is open

- DNS=10.128.0.1 # DNS server for VPN traffic

volumes:

- /home/user/docker/gluetun:/gluetun # Mount config folder

ports:

- 8080:8080 # qBittorrent Web UI port

- 38746:38746 # Torrenting port (TCP)

- 38746:38746/udp # Torrenting port (UDP)

- 1637:1637/udp # WireGuard port for VPN

restart: unless-stopped

qbittorrent:

image: lscr.io/linuxserver/qbittorrent:latest

container_name: qbittorrent

network_mode: "service:gluetun" # Use Gluetun VPN network

environment:

- PUID=${PUID} # User ID for correct file permissions

- PGID=${GUID} # Group ID for correct file permissions

- TZ=${TZ} # Timezone

- WEBUI_PORT=8080 # Web UI port

- TORRENTING_PORT=38746 # Set your torrent port

volumes:

- ${BASE_PATH}/qbittorrent/config:/config # qBittorrent config folder

- ${MEDIA_SHARE}:/share # Mount your media share

- /home/user:/temp:/temp # Temporary folder for torrents

restart: unless-stopped

Any suggestions or similar experiences? I’m thinking AirVPN might just not be ideal for torrenting, but I’d love some input from others.

Kinda fixed it, picked a server in another country and changed MTU to 1280 in gluetun, made it go from like 200KiB/s to 3MiB/s. But i refunded AirVPN and got ProtonVPN instead, which was a lot better in terms of speed.