Complete installation guide for Torrent VPN Stack on Windows 10/11.
-
Docker Desktop for Windows
- Download: https://www.docker.com/products/docker-desktop/
- Minimum version: 4.0+
- Backend: WSL 2 (recommended) or Hyper-V
-
Windows Subsystem for Linux (WSL 2) - Recommended
- Run in PowerShell (Administrator):
wsl --install - Or install manually: https://learn.microsoft.com/en-us/windows/wsl/install
- Default distribution: Ubuntu (recommended)
- Run in PowerShell (Administrator):
-
Git for Windows (if not using WSL)
- Download: https://git-scm.com/download/win
- Includes Git Bash for running shell scripts
-
PowerShell 5.1+ (included in Windows 10/11)
- For backup automation scripts
- OS: Windows 10 version 2004+ or Windows 11
- RAM: 8 GB minimum, 16 GB recommended
- Disk: 20 GB free space minimum
- CPU: 64-bit processor with virtualization support (Intel VT-x or AMD-V)
WSL 2 provides the best Linux compatibility and performance.
# Install WSL with Ubuntu (default distribution)
wsl --install
# Restart your computer when prompted
# After restart, set up Ubuntu username/password
# Then update packages
wsl -e sudo apt update && sudo apt upgrade -y- Download and install Docker Desktop
- During installation, ensure "Use WSL 2 instead of Hyper-V" is checked
- After installation, open Docker Desktop settings:
- General → Enable "Use the WSL 2 based engine"
- Resources → WSL Integration → Enable your Ubuntu distribution
# Open WSL terminal
wsl
# Clone repository
cd ~
git clone https://github.com/ddmoney420/torrent-vpn-stack.git
cd torrent-vpn-stack# Make scripts executable
chmod +x scripts/*.sh
# Run interactive setup
./scripts/setup.shFollow the prompts to configure your VPN provider and preferences.
# Basic stack (VPN + qBittorrent)
docker compose up -d
# With port forwarding (ProtonVPN Plus, PIA)
docker compose --profile port-forwarding up -d
# With monitoring
docker compose --profile monitoring up -d
# All features
docker compose --profile port-forwarding --profile monitoring up -d./scripts/verify-vpn.shIf you prefer not to use WSL, you can run scripts via Git Bash.
- Install Docker Desktop (Hyper-V backend)
- Install Git for Windows
# Open Git Bash
cd ~
git clone https://github.com/ddmoney420/torrent-vpn-stack.git
cd torrent-vpn-stack./scripts/setup.shdocker compose up -dNote: Some scripts may have limited functionality in Git Bash compared to WSL.
The Windows version uses Task Scheduler for automated backups.
Option 1: Using WSL (Recommended)
# Run in PowerShell as Administrator
cd $HOME\torrent-vpn-stack
.\scripts\setup-backup-automation.ps1 -Shell WSLOption 2: Using Git Bash
# Run in PowerShell as Administrator
cd $HOME\torrent-vpn-stack
.\scripts\setup-backup-automation.ps1 -Shell GitBash# Backup at 2 AM instead of 3 AM
.\scripts\setup-backup-automation.ps1 -BackupHour 2
# Keep backups for 14 days
.\scripts\setup-backup-automation.ps1 -RetentionDays 14
# Custom backup location
.\scripts\setup-backup-automation.ps1 -BackupDir "D:\Backups\torrent-vpn-stack"# View task status
Get-ScheduledTask -TaskName "TorrentVPNStackBackup"
# Run backup manually
Start-ScheduledTask -TaskName "TorrentVPNStackBackup"
# Disable backups
.\scripts\remove-backup-automation.ps1# In WSL or Git Bash
./scripts/backup.shAll services are accessible from Windows at localhost:
-
qBittorrent Web UI: http://localhost:8080
- Default credentials:
admin/adminpass(change in.env)
- Default credentials:
-
Grafana (if monitoring enabled): http://localhost:3000
- Default credentials:
admin/admin
- Default credentials:
-
Prometheus (if monitoring enabled): http://localhost:9090
Windows users may need to allow Docker through the Windows Firewall:
- Open Windows Defender Firewall → Advanced Settings
- Inbound Rules → New Rule
- Allow port 8080 (qBittorrent)
- Repeat for other services if needed
- WSL Ubuntu files (from Windows):
\\wsl$\Ubuntu\home\<username>\torrent-vpn-stack - Windows C: drive (from WSL):
/mnt/c/ - Downloads: Configure in
.envusing WSL paths (/home/<username>/Downloads/torrents)
If using Git Bash without WSL:
- Project:
C:\Users\<username>\torrent-vpn-stack - Downloads:
C:\Users\<username>\Downloads\torrents
Error: "Docker Desktop starting..."
Solutions:
-
Enable WSL 2:
wsl --set-default-version 2
-
Enable virtualization in BIOS:
- Restart → Enter BIOS (usually F2, Del, or F12)
- Enable Intel VT-x or AMD-V
-
Enable Hyper-V (if not using WSL 2):
# Run as Administrator Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Error: $'\r': command not found or similar
Solution: Convert line endings to Unix format:
# In WSL
sudo apt install dos2unix
dos2unix scripts/*.shError: Permission denied when running scripts
Solution: Make scripts executable:
chmod +x scripts/*.shError: Gluetun container constantly restarting
Solutions:
- Check VPN credentials in
.env - Verify VPN provider configuration (see Provider Comparison)
- Check Gluetun logs:
docker logs gluetun
Error: localhost:8080 not accessible
Solutions:
-
Verify container is running:
docker ps
-
Check
LOCAL_SUBNETin.envmatches your network:# From WSL ip addr show eth0 | grep inet
-
Restart Docker containers:
docker compose down docker compose up -d
-
"Unauthorized" error instead of login page:
# Stop qBittorrent docker compose stop qbittorrent # Disable host header validation docker run --rm -v torrent-vpn-stack_qbittorrent-config:/config alpine sh -c "echo 'WebUI\HostHeaderValidation=false' >> /config/qBittorrent/qBittorrent.conf" # Restart docker compose start qbittorrent
Error: Volume mount fails or "path not found"
Solution: Use Windows-style paths in .env:
# Use forward slashes, not backslashes:
DOWNLOADS_PATH=C:/Users/yourusername/Downloads/torrents
# NOT this:
DOWNLOADS_PATH=C:\Users\yourusername\Downloads\torrentsAlso ensure the drive is shared in Docker Desktop:
- Settings → Resources → File Sharing
- Add
C:\Users\yourusername\Downloadsif not listed
Error: No forwarded port assigned
Solutions:
-
Verify your VPN provider supports port forwarding:
- ✅ ProtonVPN Plus, PIA
- ❌ Mullvad (discontinued July 2023), NordVPN, Surfshark, ExpressVPN
-
Enable port forwarding profile:
docker compose --profile port-forwarding up -d
-
For ProtonVPN, ensure
VPN_PORT_FORWARDING_PROVIDER=protonvpnin.env
- Open Docker Desktop → Settings → Resources
- Recommended settings:
- CPUs: 4 cores (minimum 2)
- Memory: 4 GB (minimum 2 GB)
- Disk: 20 GB+
Create/edit %USERPROFILE%\.wslconfig:
[wsl2]
memory=4GB
processors=4
swap=2GB
localhostForwarding=trueRestart WSL:
wsl --shutdownSee Performance Tuning Guide for more optimizations.
# Stop and remove containers
docker compose down
# Remove volumes (WARNING: deletes all data)
docker volume rm torrent-vpn-stack_gluetun-config torrent-vpn-stack_qbittorrent-config# Run in PowerShell as Administrator
.\scripts\remove-backup-automation.ps1- Uninstall via Settings → Apps → Docker Desktop
- Optionally remove WSL:
wsl --unregister Ubuntu
- Configure VPN Provider
- Set Up Port Forwarding
- Enable Monitoring
- Performance Tuning
- Backup and Restore