Your ISP blocks BitTorrent? This image bypasses it. All torrent traffic is routed through the Tor network — your ISP only sees encrypted Tor traffic, not BitTorrent. Works on any network that blocks or throttles torrents.
A single Docker image with ruTorrent + rtorrent + Tor — all torrent traffic is transparently routed through the Tor network using iptables. Your real IP is never exposed to trackers or peers.
[Browser] → :8080 → [ruTorrent Web UI]
│
[rtorrent] ──iptables──→ [Tor TransPort 9040] ──→ Tor Network ──→ Internet
│
[DNS :5353] ──→ Tor DNS ──→ Tor Network
All services run inside one container. Just docker run.
- rtorrent compiled from source (v0.9.8) with libtorrent (v0.13.8)
- ruTorrent v5.2.10 web interface
- Tor built-in — all torrent traffic routed via
iptablestransparent proxy - IP leak protection — DHT, PEX, and UDP trackers disabled
- Encrypted connections enforced
- DNS leak protection — DNS resolved through Tor
- Startup IP verification — logs confirm Tor is working before downloading
- Nyx — built-in Tor traffic monitor with live bandwidth graphs
- Watch folders — drop
.torrentfiles to auto-load - Persistent storage — downloads survive container restarts
- Docker installed
docker run -d \
--name rutorrent-tor \
--cap-add=NET_ADMIN \
-p 8080:80 \
-p 6881-6889:6881-6889 \
-v ./downloads:/srv/rtorrent/download \
-v ./watch:/srv/rtorrent/watch \
srayuth089/r_ru-torrent-docker:latestDone! Open http://localhost:8080
--cap-add=NET_ADMINis required for iptables to route rtorrent traffic through Tor.
docker logs rutorrent-torYou should see:
Tor is ready!
Tor exit IP: 185.xxx.xxx.xxx
Real IP: 203.xxx.xxx.xxx
OK: Tor is hiding your real IP.
iptables rules applied — all rtorrent traffic routed through Tor.
Create docker-compose.yml:
services:
rutorrent:
image: srayuth089/r_ru-torrent-docker:latest
container_name: rutorrent-tor
restart: unless-stopped
cap_add:
- NET_ADMIN
ports:
- "8080:80"
- "6881-6889:6881-6889"
volumes:
- ./downloads:/srv/rtorrent/download
- ./watch/load:/srv/rtorrent/watch/load
- ./watch/start:/srv/rtorrent/watch/start
environment:
- TZ=Asia/Bangkokdocker compose up -dgit clone https://github.com/srayuth089/r_ru-torrent-docker.git
cd r_ru-torrent-docker
docker compose up -d --buildOpen http://localhost:8080
Option 1: Web UI — Use the ruTorrent web interface at http://localhost:8080
Option 2: Watch folders — Drop .torrent files into:
| Folder | Behavior |
|---|---|
watch/load/ |
Loads torrent but does NOT auto-start |
watch/start/ |
Loads and starts downloading immediately |
All traffic from rtorrent is transparently redirected through Tor using iptables. Only the rtorrent process is affected — other services (Apache, PHP) are not routed through Tor.
| Protection | How |
|---|---|
| All TCP traffic | iptables redirects all rtorrent TCP to Tor's TransPort (9040) |
| DNS | iptables redirects all rtorrent DNS to Tor's DNSPort (5353) |
| DHT disabled | dht.mode.set = disable — DHT leaks your real IP |
| PEX disabled | protocol.pex.set = no — Peer Exchange leaks your real IP |
| UDP disabled | trackers.use_udp.set = no — UDP cannot go through Tor |
| Encryption | protocol.encryption.set = allow_incoming,try_outgoing,enable_retry |
docker exec -it rutorrent-tor nyxShows live bandwidth graphs, active Tor circuits, and connection details. Press q to quit.
# Check Tor exit IP
docker exec rutorrent-tor curl -s --socks5-hostname 127.0.0.1:9050 https://api.ipify.org
# Verify Tor status
docker exec rutorrent-tor curl -s --socks5-hostname 127.0.0.1:9050 https://check.torproject.org/api/ip
# Returns: {"IsTor":true,"IP":"xxx.xxx.xxx.xxx"}
# Check iptables traffic counters
docker exec rutorrent-tor iptables -t nat -L OUTPUT -n -vdocker run -d --cap-add=NET_ADMIN -p 9090:80 ... # Change 8080 to any portMount a custom .rtorrent.rc:
docker run -d --cap-add=NET_ADMIN \
-v ./my-rtorrent.rc:/srv/rtorrent/.rtorrent.rc \
...docker run -d --cap-add=NET_ADMIN \
-v /path/to/your/folder:/srv/rtorrent/download \
...# Start
docker run -d --name rutorrent-tor --cap-add=NET_ADMIN \
-p 8080:80 -p 6881-6889:6881-6889 \
srayuth089/r_ru-torrent-docker:latest
# Stop
docker stop rutorrent-tor
# View logs
docker logs -f rutorrent-tor
# Monitor Tor traffic (live graphs)
docker exec -it rutorrent-tor nyx
# Check Tor IP
docker exec rutorrent-tor curl -s --socks5-hostname 127.0.0.1:9050 https://api.ipify.org
# Verify Tor
docker exec rutorrent-tor curl -s --socks5-hostname 127.0.0.1:9050 https://check.torproject.org/api/ip
# Get new Tor identity (new circuit)
docker exec rutorrent-tor killall -HUP tor
# Remove
docker rm -f rutorrent-torr_ru-torrent-docker/
├── docker-compose.yml # Docker compose (optional)
├── Dockerfile # Single image: Tor + rtorrent + ruTorrent
├── entrypoint.sh # Starts Tor → iptables → Apache → rtorrent
├── config/
│ ├── tor/torrc # Tor config (SOCKS + TransPort + DNS + ControlPort)
│ ├── rtorrent/.rtorrent.rc # rtorrent config
│ ├── apache/rutorrent.conf # Apache virtual host
│ └── rutorrent/config.php # ruTorrent PHP config
└── watch/
├── load/ # Drop .torrent files (load only)
└── start/ # Drop .torrent files (auto-start)
docker logs rutorrent-tor | grep -i tor
docker exec rutorrent-tor curl -s --socks5-hostname 127.0.0.1:9050 https://api.ipify.orgTor is slower than direct connections. To improve:
- Get a new circuit:
docker exec rutorrent-tor killall -HUP tor - Wait — Tor circuits improve over time
Check the Trackers tab in ruTorrent. If trackers show errors, the torrent may need more time to announce through Tor.
Restart the container:
docker restart rutorrent-tor- Speed: Tor adds latency. This is the tradeoff for privacy.
- Incoming connections: Peers cannot connect TO you through Tor. Only outbound works.
- NET_ADMIN: Required for iptables rules. Without it, traffic will NOT route through Tor.
- Legal use only: For privacy when downloading legal content. Respect copyright laws.
If this helped you, consider buying me a coffee!