How to Self-Host Deluge with Docker Compose
A Lightweight Torrent Client with a Plugin Ecosystem
Deluge is a free, cross-platform BitTorrent client with full encryption, a web UI, and an extensible plugin system. Unlike qBittorrent, which bundles everything into one package, Deluge separates the daemon (libtorrent engine) from its interfaces — you can control one daemon from the web UI, a desktop GTK client, or the command line simultaneously. This architecture makes it particularly useful as a headless download server. deluge-torrent.org
Prerequisites
- A Linux server (Ubuntu 22.04+ recommended)
- Docker and Docker Compose installed (guide)
- 512 MB of free RAM
- Storage for downloads
- A domain name (optional, for remote access)
Docker Compose Configuration
Create a docker-compose.yml file:
services:
deluge:
image: lscr.io/linuxserver/deluge:2.2.0
container_name: deluge
environment:
- PUID=1000 # Host user ID — match with: id -u
- PGID=1000 # Host group ID — match with: id -g
- TZ=America/New_York # Your timezone
- DELUGE_LOGLEVEL=error # Options: none, info, warning, error, debug
- UMASK=022 # File permission mask
volumes:
- ./deluge-config:/config # Deluge settings, auth, torrent state
- ./downloads:/downloads # Completed and in-progress downloads
ports:
- "8112:8112" # Web UI
- "6881:6881" # Inbound torrent traffic (TCP)
- "6881:6881/udp" # Inbound torrent traffic (UDP)
restart: unless-stopped
Optional port: Add - "58846:58846" if you want to connect a remote Deluge GTK desktop client to this daemon. Not needed for web-only usage.
Start the stack:
docker compose up -d
Initial Setup
- Open
http://your-server:8112in your browser - Log in with the default password:
deluge - The Connection Manager appears — click Connect to link the web UI to the local daemon
- Go to Preferences > Interface and change the web UI password immediately
Critical next step: Go to Preferences > Network and set the Incoming Port to 6881. Deluge defaults to a random port, which won’t match your Docker port mapping. Without this, peers can’t connect inbound.
Set the download location to /downloads under Preferences > Downloads — this matches the volume mount in the compose file.
Configuration
| Setting | Location | Default | Notes |
|---|---|---|---|
| Web UI password | Preferences > Interface | deluge | Change immediately |
| Incoming port | Preferences > Network | Random | Must match Docker port mapping (6881) |
| Download location | Preferences > Downloads | /root/Downloads | Change to /downloads |
| Max connections | Preferences > Network | 200 global | Reduce on low-resource systems |
| Encryption | Preferences > Network | Enabled | Full stream encryption; set to “Forced” for maximum privacy |
| Queue settings | Preferences > Queue | 5 active | Adjust based on bandwidth |
PUID and PGID
The LinuxServer.io image uses PUID and PGID to set file ownership. Find your host user’s IDs:
id -u # Your PUID
id -g # Your PGID
Set these in the compose file so downloaded files are owned by your host user, not root.
Advanced Configuration
VPN Integration
Running Deluge through a VPN is common for privacy. The simplest approach: use a VPN container as the network for Deluge:
services:
vpn:
# No semver tags published — only :latest and date+commit hash tags available
image: thrnz/docker-wireguard-pia:latest
container_name: vpn
cap_add:
- NET_ADMIN
environment:
- LOC=swiss
- USER=your-pia-username
- PASS=your-pia-password
ports:
- "8112:8112" # Deluge Web UI exposed through VPN
restart: unless-stopped
deluge:
image: lscr.io/linuxserver/deluge:2.2.0
container_name: deluge
network_mode: "service:vpn" # Route all traffic through VPN
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
volumes:
- ./deluge-config:/config
- ./downloads:/downloads
depends_on:
- vpn
restart: unless-stopped
When using network_mode: "service:vpn", port mappings go on the VPN container, not Deluge.
Thin Client Mode
Deluge’s daemon (deluged) runs inside the container on port 58846. You can connect a Deluge GTK desktop client from your workstation:
- Expose port 58846 in your compose file
- Edit the auth file inside the container:
docker exec -it deluge cat /config/auth - Add a user:
echo "myuser:mypassword:10" >> ./deluge-config/auth - In the GTK client, add a connection to
your-server:58846with those credentials
The permission level 10 grants full admin access. Use 5 for read-only.
Plugins
Deluge supports plugins — install .egg files to /config/plugins/. Popular options:
- AutoRemove Plus — automatically remove old torrents based on ratio/seeding time
- ltConfig — fine-tune libtorrent settings
- YaRSS2 — RSS-based automatic torrent downloading
Reverse Proxy
Deluge’s web UI works behind a reverse proxy. In Nginx Proxy Manager, proxy to deluge:8112. The web UI uses standard HTTP — no special WebSocket or path configuration needed. See Reverse Proxy Setup.
Backup
Back up the /config directory — it contains:
core.conf— daemon settingsweb.conf— web UI settingsstate/— active torrent state (resume data)auth— user credentialsplugins/— installed plugins
tar czf deluge-backup.tar.gz ./deluge-config
Download data in /downloads is not part of the application backup. See Backup Strategy.
Troubleshooting
Web UI shows “Connection Failed”
Symptom: Login works but the Connection Manager can’t connect to the daemon.
Fix: The daemon may not have started yet. Wait 30 seconds and refresh. Check logs: docker compose logs deluge. If persistent, delete /config/deluged.pid and restart.
Torrents stuck at 0% with no peers
Symptom: Torrents are added but never download.
Fix: The incoming port doesn’t match the Docker mapping. Go to Preferences > Network and set the listening port to 6881. Disable “Use Random Port.” Verify with a port checker that 6881 is reachable from the internet.
Permission denied on downloaded files
Symptom: Downloaded files are owned by root or inaccessible.
Fix: Set PUID and PGID to match your host user. Verify the host directories have correct ownership: chown -R 1000:1000 ./downloads ./deluge-config.
High memory usage during large downloads
Symptom: Deluge uses 500 MB+ RAM during active downloads.
Fix: Reduce the cache size in Preferences > Other > Cache Size. The default is auto-detected but can be aggressive. Set to 64 MB on resource-constrained systems. Also reduce max active torrents and connections.
Web UI extremely slow
Symptom: Web interface takes seconds to load each page. Fix: This happens with 100+ torrents. Deluge’s web UI renders all torrents at once. Enable the “Sidebar Filters” to reduce visible torrents, or switch to the GTK thin client for large libraries.
Resource Requirements
| Resource | Value |
|---|---|
| RAM | 50–100 MB idle, 150–300 MB with active torrents |
| CPU | Low — libtorrent is efficient C++ |
| Disk (app) | ~100 MB for config |
| Disk (downloads) | User-dependent |
| Image size | ~51.5 MB (Alpine-based) |
Deluge 2.2.0 uses libtorrent-rasterbar v2 by default. The LinuxServer.io image also offers a libtorrentv1 tag for compatibility edge cases.
Verdict
Deluge is a solid choice if you want a torrent client with a plugin system and thin-client architecture. The ability to connect a native desktop client to a remote daemon is genuinely useful — something qBittorrent and Transmission don’t offer as cleanly.
That said, qBittorrent is the better default for most people. It has a more modern web UI, better search integration, and doesn’t require separate port configuration after install. Choose Deluge if you specifically need the plugin system, thin-client mode, or you’re already invested in the Deluge ecosystem.
FAQ
Deluge vs qBittorrent — which should I self-host?
qBittorrent for most people. It has a better web UI, built-in search, RSS support without plugins, and works correctly out of the box. Deluge wins on extensibility (plugin system) and thin-client support. See our qBittorrent vs Transmission comparison for more torrent client analysis.
Can I use Deluge with the *arr stack (Sonarr, Radarr)?
Yes. Sonarr, Radarr, and other *arr apps support Deluge as a download client. Add it using the Deluge daemon connection (host: deluge, port: 58846) with the credentials from the auth file — not the web UI connection.
Is the web UI password different from the daemon password?
Yes. The web UI has its own password (default: deluge, changed in Preferences > Interface). The daemon uses the auth file for RPC connections. These are separate authentication systems.
Related
- Deluge vs qBittorrent: Which Torrent Client?
- Deluge vs Transmission: Torrent Clients Compared
- qBittorrent vs Deluge: Which to Self-Host?
- Transmission vs Deluge: Lightweight Torrent Clients
- How to Self-Host qBittorrent
- How to Self-Host Transmission
- How to Self-Host Sonarr
- How to Self-Host Radarr
- qBittorrent vs Transmission
- Best Self-Hosted Download Management
- Docker Compose Basics
- Reverse Proxy Setup
- Backup Strategy
Get self-hosting tips in your inbox
Get the Docker Compose configs, hardware picks, and setup shortcuts we don't put in articles. Weekly. No spam.
Comments