Skip to content

Instantly share code, notes, and snippets.

@craig-m
Last active January 4, 2023 12:17
Show Gist options
  • Save craig-m/9cb1d983a17ef0bf723e41bf3902464a to your computer and use it in GitHub Desktop.
Save craig-m/9cb1d983a17ef0bf723e41bf3902464a to your computer and use it in GitHub Desktop.
run transmission torrent client and VPN service under docker compose

container VPN torrent

Run transmission Torrent client with VPN service from containers.

Setup vpn info in gluetun container, seems very popular and covers all the big VPN providers.

setup

Create .env_vpn_live file. There is lots of good info on the gluetun wiki.

VPN_SERVICE_PROVIDER=nordvpn
OPENVPN_USER=abc
OPENVPN_PASSWORD=abc
SERVER_REGIONS=Netherlands
OPENVPN_PROTOCOL=tcp

Create .gitignore file:

config/
downloads/
watch/
.env_vpn_live
*.log

Create folders:

mkdir -pv {config,downloads,watch}

using

Start containers:

docker-compose up -d

To check the VPN connection status with gluetun api:

curl http://localhost:8000/v1/openvpn/status
curl http://localhost:8000/v1/publicip/ip

You can now open http://localhost:9091/transmission/web/ and Torrent some Linux ISO.

---
# transmission torrent client docker compose
version: "3"
services:
gluetun:
image: qmcgaw/gluetun
cap_add:
- NET_ADMIN
environment:
- HTTP_CONTROL_SERVER_ADDRESS=0.0.0.0:8000
- HTTP_CONTROL_SERVER_LOG=on
- OPENVPN_VERBOSITY=1
env_file:
- .env_vpn_live
ports:
- 8000:8000
- 9091:9091
- 51413:51413
- 51413:51413/udp
restart: always
transmission:
image: lscr.io/linuxserver/transmission:latest
container_name: transmission
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- USER=torrents
- PASS=downloadpass
- PEERPORT=51415
volumes:
- ./config:/config
- ./downloads:/downloads
- ./watch:/watch
network_mode: service:gluetun
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment