WireGuard Client
Install and configure WireGuard VPN client for secure access to rented GPUs.
Overview
Section titled “Overview”GPUFlow uses WireGuard VPN to create secure, peer-to-peer connections between renters and providers. Each rental generates a unique configuration that expires automatically.
Connection process:
- Complete GPU rental payment
- Receive unique WireGuard configuration file
- Import configuration into WireGuard client
- Connect to establish encrypted tunnel
- Access GPU services through tunnel
Installation
Section titled “Installation”Windows
Section titled “Windows”WireGuard Windows App:
- Download from WireGuard.com
- Run installer as administrator
- Complete installation wizard
- Launch WireGuard from Start menu
Alternative - Command line:
# Using Chocolateychoco install wireguard
# Using Scoopscoop install wireguard
Mac App Store:
- Search “WireGuard” in App Store
- Install WireGuard by WireGuard Development Team
- Launch from Applications folder
Alternative - Homebrew:
brew install --cask wireguard-tools
Ubuntu/Debian:
sudo apt updatesudo apt install wireguard
Fedora:
sudo dnf install wireguard-tools
Arch Linux:
sudo pacman -S wireguard-tools
Mobile
Section titled “Mobile”iOS:
- Download “WireGuard” from App Store
- Requires iOS 12.0 or later
Android:
- Install from Google Play Store or F-Droid
- Requires Android 5.0 or later
Configuration import
Section titled “Configuration import”Automatic download
Section titled “Automatic download”After successful payment:
- Click Download Config in rental dashboard
- Configuration file downloads as
rental-[ID].conf
- File is valid for single download only
- Import immediately to avoid expiration
Manual import methods
Section titled “Manual import methods”Desktop GUI:
- Open WireGuard application
- Click Add Tunnel or
+
button - Select Import from File
- Choose downloaded
.conf
file - Configuration appears in tunnel list
Mobile QR code:
- Click Show QR Code in rental dashboard
- Open WireGuard mobile app
- Tap
+
and select Create from QR Code - Scan displayed QR code
- Configuration imports automatically
Command line:
# Linux/macOSsudo wg-quick up /path/to/rental-config.conf
# Check statussudo wg show
Configuration validation
Section titled “Configuration validation”Verify settings before connecting:
- Interface Address: Unique IP in
10.77.x.x/32
range - Peer Endpoint: Provider’s public IP and port
- Allowed IPs:
10.77.0.0/16
for GPUFlow network - PersistentKeepalive:
25
seconds
Connection process
Section titled “Connection process”Establish tunnel
Section titled “Establish tunnel”Desktop:
- Select imported configuration from list
- Click Activate or toggle switch
- Status changes to “Active” when connected
- System tray icon indicates connection state
Mobile:
- Tap tunnel configuration
- Toggle switch to “On” position
- VPN icon appears in status bar
- Connection establishes within 10 seconds
Command line:
# Start tunnelsudo wg-quick up rental-config
# Verify connectionping 10.77.0.1
# Show tunnel statisticssudo wg show rental-config
Connection verification
Section titled “Connection verification”Test connectivity:
# Ping provider gatewayping 10.77.0.1
# Test GPU service accesscurl http://10.77.0.2:8080/health
Check tunnel status:
- Handshake: Recent timestamp indicates active connection
- Transfer: Data sent/received counters
- Peer Endpoint: Provider’s public IP resolution
- Latest Handshake: Should update every 25 seconds
Accessing services
Section titled “Accessing services”Web interfaces
Section titled “Web interfaces”Common service URLs:
- Jupyter Lab:
http://10.77.x.2:8888
- ComfyUI:
http://10.77.x.2:8188
- Stable Diffusion WebUI:
http://10.77.x.2:7860
- SSH Access:
ssh [email protected] -p 22
Service discovery:
# Scan for available servicesnmap -p 1-10000 10.77.x.2
# Common web servicescurl http://10.77.x.2:8888 # Jupytercurl http://10.77.x.2:8188 # ComfyUIcurl http://10.77.x.2:7860 # SD WebUI
Direct SSH access
Section titled “Direct SSH access”# Standard SSH connection
# With specific key
# Port forwarding for local access
File transfers
Section titled “File transfers”Upload files:
# SCP upload
# Rsync upload
Download results:
# SCP download
# Download directory
Troubleshooting
Section titled “Troubleshooting”Connection failures
Section titled “Connection failures”Cannot establish tunnel:
-
Verify configuration:
- Check endpoint IP and port
- Validate private key format
- Confirm allowed IPs setting
-
Network issues:
- Test internet connectivity
- Check firewall rules
- Try different network (mobile hotspot)
-
Provider offline:
- Check rental status in dashboard
- Verify provider uptime
- Contact support if persistent
Tunnel connects but no service access:
-
Service not ready:
- Wait 2-3 minutes for deployment
- Check deployment status in dashboard
- Verify service URLs
-
Port forwarding issues:
- Try alternative service ports
- Use SSH tunnel as fallback
- Check provider configuration
Performance issues
Section titled “Performance issues”Slow connection speeds:
# Test tunnel throughputiperf3 -c 10.77.x.2 -p 5201
# Monitor latencyping -c 10 10.77.x.2
# Check routingtraceroute 10.77.x.2
High latency:
- Geographic distance to provider
- Network routing inefficiencies
- Provider internet connection quality
- Local network congestion
Mobile-specific issues
Section titled “Mobile-specific issues”iOS connection problems:
- Enable VPN permission in Settings
- Disable other VPN apps temporarily
- Restart WireGuard app
- Re-import configuration
Android connectivity:
- Check battery optimization settings
- Allow background app activity
- Verify network permissions
- Clear app cache if needed
Security considerations
Section titled “Security considerations”Configuration security
Section titled “Configuration security”Protect configuration files:
- Delete
.conf
files after import - Never share configuration with others
- Each config is single-use only
- Configurations auto-expire with rental
Network isolation:
- Tunnel traffic is encrypted end-to-end
- Services only accessible through VPN
- No direct internet exposure
- Provider cannot see other traffic
Best practices
Section titled “Best practices”Connection management:
- Disconnect when rental expires
- Don’t leave tunnels active indefinitely
- Monitor data usage if on metered connection
- Use kill switch if available
Data handling:
- Encrypt sensitive files before upload
- Download important results before expiration
- Assume shared provider environment
- Clear local configuration after use
Advanced configuration
Section titled “Advanced configuration”Custom routing
Section titled “Custom routing”Split tunneling (exclude local traffic):
[Interface]Address = 10.77.x.x/32# Only route GPUFlow network through VPNAllowedIPs = 10.77.0.0/16
Full tunneling (route all traffic):
[Interface]Address = 10.77.x.x/32# Route everything through VPNAllowedIPs = 0.0.0.0/0
Command line management
Section titled “Command line management”Scripted connection:
#!/bin/bashCONFIG_FILE="$1"if [ ! -f "$CONFIG_FILE" ]; then echo "Usage: $0 <config-file>" exit 1fi
# Connect and testsudo wg-quick up "$CONFIG_FILE"sleep 5ping -c 3 10.77.0.1 && echo "Connection successful"
Auto-disconnect timer:
#!/bin/bash# Auto-disconnect after rental expiresEXPIRES_AT="2024-01-01 15:30:00"while [ $(date +%s) -lt $(date -d "$EXPIRES_AT" +%s) ]; do sleep 60donesudo wg-quick down rental-config
Integration with system tools
Section titled “Integration with system tools”Network monitoring:
# Monitor tunnel trafficwatch -n 1 'sudo wg show'
# Log connection eventssudo wg show rental-config | logger -t wireguard
Automatic configuration:
# Python script to handle config importimport subprocessimport os
def import_config(config_path): cmd = ['wg-quick', 'up', config_path] result = subprocess.run(cmd, capture_output=True, text=True) return result.returncode == 0
# Usageif import_config('/tmp/rental-123.conf'): print("Connected successfully") os.remove('/tmp/rental-123.conf') # Clean up