Tracker unreachable when running Deluge with Gluetun in Docker

I've been having an issue with my Deluge instance where random torrents on random trackers would either throw "skipping tracker announce (unreachable)" or "Tracker Error: timed out". It's a super generic error, and most of the time it's a temporary issue or an issue caused by user configuration, so it's really difficult to find solutions online.

90% of threads are like this

 

However, I stumbled upon this form thread where mr.lite.touch provides a solution!

  1. Install the LTConfig plugin in Deluge
  2. Run ip addr show in both your Deluge & Gluetun containers.
  3. Both containers should have a tun0 interface with an IPv4 address that is the same. Note it down.
  4. In Deluge, open Preferences > LTConfig
  5. Find listen_interfaces.
  6. Set it to <IP>:<PORT> where the IP is the IPv4 address of your tun0 interface & the Port is whatever was there before (42676 in my case)
  7. Click "Apply" and "Ok"
  8. Select all errored torrents and right-click > Update Tracker

From what I understand, this forces libTorrent to use a specific interface when listening for tracker connections. By default, libTorrent will listen on all interfaces, which I think is why it wasn't working before & would randomly throw these errors.

flowchart LR
    subgraph Container 
        Deluge -- &nbsp;tun0&nbsp; --> Gluetun
    end
    
    Gluetun -- &nbsp;tun0&nbsp; --> WAN

These changes immediately fix the issue for me. Hoping that it doesn't come back...



This page was originally published 8 Feb 2025

Updated 251 days ago (8 Feb 2025)