Quick Start Guide¶
Get VPN Exit Controller up and running in under 10 minutes!
Prerequisites Checklist¶
Before starting, ensure you have:
- Ubuntu 22.04+ server with root access
- Docker and Docker Compose installed
- Python 3.10+ with pip
- Domain with Cloudflare DNS
- NordVPN service credentials
- Tailscale auth key
1. Clone the Repository¶
2. Configure Environment¶
Copy the example environment file:
Edit .env with your credentials:
# Essential configuration
NORDVPN_USER=your_nordvpn_service_username
NORDVPN_PASS=your_nordvpn_service_password
TAILSCALE_AUTH_KEY=your_tailscale_auth_key
CF_API_TOKEN=your_cloudflare_api_token
API_PASSWORD=your_secure_password_here
Security Note
Never commit .env to version control. The file is already in .gitignore.
3. Install Dependencies¶
Create Python virtual environment:
4. Start Services¶
Redis (Required for metrics)¶
VPN Controller API¶
# Development mode
uvicorn api.main:app --reload --host 0.0.0.0 --port 8080
# Or use the systemd service (production)
sudo systemctl enable vpn-controller
sudo systemctl start vpn-controller
5. Create Your First VPN Node¶
Start a US exit node:
curl -X POST http://localhost:8080/api/nodes/start \
-u admin:your_api_password \
-H "Content-Type: application/json" \
-d '{"country": "us", "city": "New York"}'
Check node status:
6. Set Up Proxy Access (Optional)¶
Deploy HAProxy¶
Deploy Traefik for SSL¶
Configure DNS¶
# Set your Cloudflare API token
export CF_API_TOKEN=your_cloudflare_api_token
# Run DNS setup
./scripts/setup-proxy-dns.sh
7. Test Your Setup¶
Test VPN connectivity:¶
Test proxy URL (if configured):¶
🎉 Success!¶
You now have a working VPN Exit Controller! Here's what you can do next:
Essential Commands¶
# List all nodes
curl http://localhost:8080/api/nodes -u admin:$API_PASSWORD
# Start a node
curl -X POST http://localhost:8080/api/nodes/start \
-u admin:$API_PASSWORD \
-H "Content-Type: application/json" \
-d '{"country": "uk"}'
# Start a specific UK node
curl -X POST http://localhost:8080/api/nodes/uk/start \
-u admin:$API_PASSWORD
# Stop a node
curl -X DELETE http://localhost:8080/api/nodes/vpn-uk \
-u admin:$API_PASSWORD
# Get best node for country
curl http://localhost:8080/api/load-balancer/best-node/us \
-u admin:$API_PASSWORD
# Get best UK node
curl http://localhost:8080/api/load-balancer/best-node/uk \
-u admin:$API_PASSWORD
# Change strategy
curl -X POST http://localhost:8080/api/load-balancer/strategy \
-u admin:$API_PASSWORD \
-H "Content-Type: application/json" \
-d '{"strategy": "health_score"}'
Common Issues & Solutions¶
Node won't start?
- Check Docker is running:
docker ps - Verify NordVPN credentials in
.env - Check logs:
docker logs vpn-us
Can't access proxy URLs?
- Ensure DNS records are created
- Check Traefik is running:
docker ps | grep traefik - Verify SSL certificates: Check Traefik logs
API returns 401 Unauthorized?
- Check username is
admin - Verify password matches
.envsetting - Use
-u admin:passwordwith curl
Next Steps¶
-
Read the User Guide
Learn about all features and configuration options
-
Explore the API
Full API reference with examples
-
Deploy to Production
Production deployment best practices
-
Security Hardening
Secure your deployment
Congratulations!
You've successfully deployed VPN Exit Controller. Join our community to stay updated with new features and best practices.