Jump to content
Not connected, Your IP: 3.137.176.125
tdam2112

Slow speeds in qBittorrent using AirVPN with GlueTun and Wireguard on macos

Recommended Posts

I've a 2014 Mac mini server setup and I'm using Docker to run qBittorrent.

I set up AirVPN on GlueTun using WireGuard as shown in the attached Docker Compose file. I've also set up port forwarding and tested it within the AirVPN port forwarding tool.
(I followed this guide https://www.youtube.com/watch?v=SQEqsaKN-Go&t=350s for reference).
 
My problem is that my torrent speeds are quite slow in qBittorrent (averaging 30-40Kbps), if I turn off the VPN I can easily hit speeds above 2-3Mbps. I'm wondering if I got something configured incorrectly, or if there are some settings I need to tweak on my end.

compose.yml

Share this post


Link to post

Thanks for the reply. 
Since I posted I did the following:
1. I switched server to one with a lower response time from me. This helped a bit, got speeds closer to 1Mbps, however only in new public torrents.
2. I rebuilt the Gluetun and Qbittorrent docker containers and speeds on some of the torrents up, I saw close to 3Mbps upload speeds, but download stayed low.
3. Tried turning off DHT and the speeds are down to 10-100 bps now... 
4. Turned DHT back on after keeping it off overnight and restarted the containers, but the speeds now linger around 1Kbps
 

Share this post


Link to post
On 2/23/2025 at 7:13 PM, tdam2112 said:

My problem is that my torrent speeds are quite slow in qBittorrent (averaging 30-40Kbps), if I turn off the VPN I can easily hit speeds above 2-3Mbps


Hello!

Please try to set WireGuard interface MTU to 1280 bytes. GlueTun's default is 1400 bytes which could be too large for your network. A too large MTU will cause major performance hit or even disconnections.. MTU size can be set through the WIREGUARD_MTU environment variable. "You can bind mount an ini Wireguard configuration file to /gluetun/wireguard/wg0.conf. "
https://github.com/qdm12/gluetun-wiki/blob/main/setup/options/wireguard.md

Another performance improvement can be obtained by configuring correctly the container in order to allow the torrent software to receive the incoming packets. Note that in your compose file you did not map the proper port in the ports: section and you did not define properly the FIREWALL_VPN_INPUT_PORTS environment variable, which should be set according to the port you remotely forwarded on your AirVPN account port panel.

EDIT: after a few minutes we published this message we noticed that your torrent software became reachable, so the above setting modifications are probably unnecessary.

Kind regards
 

Share this post


Link to post

I added the file with the reduced packet size. It didn't seem to make much difference, everything was still only a few Bps at best.
I tried changing servers (not much difference)

Then I switched the peer connection back to TCP & UDP and that improved things back to how it was before, as a benchmark, I'm getting roughly 1Mbps on an Ubuntu ISO.

I can't really tell if I'm hitting the limits of the peer connections through the VPN now or if I'm missing something else.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...