CompassVPN: Open-Source, Self-Hosted VPN Solution

A powerful, configurable VPN agent with built-in monitoring, automatic updates, and enhanced security features - all deployed on your own infrastructure.

Overall Dashboard

Overall system performance and key metrics at a glance

User Metrics Dashboard

Detailed user connection statistics and bandwidth usage

Routing Rules Dashboard

Configure and monitor traffic routing rules

Easy Deployment

Deploy your VPN server with minimal setup, leveraging automated configurations and integrations.

  • One-command bootstrap for initial setup
  • Automatic SSL certificate generation (ZeroSSL or Let’s Encrypt)
  • Integrated Cloudflare DNS management with optional CDN proxy support
  • Support for both direct server connections and configurations behind Cloudflare CDN

Enhanced Security

Protect your server and network traffic with multiple layers of security features.

  • Automatic blocking: Torrents, Iranian websites, Ads, Malware, Phishing (using curated blocklists)
  • Configuration self-testing via Xray-Knife
  • Fail2ban integration to prevent brute-force attacks and bad requests
  • Automated UFW firewall configuration
  • NGINX webserver enhances security and resource efficiency

Complete Monitoring

Gain insights into performance and usage through comprehensive metrics collection.

  • Centralized monitoring via Grafana Cloud or self-hosted Prometheus/Pushgateway
  • Real-time connection statistics
  • Host system resource monitoring (CPU, memory, traffic, …)
  • User metrics: Track approximate unique active users and blocked junk traffic requests

Network Optimization

Optimize bandwidth usage and connection routing for better performance.

  • NGINX web server improves connection handling efficiency
  • Monitor blocked traffic requests to understand bandwidth savings
  • Flexible Custom DNS options (Default, Cloudflare, ControlD, or custom DoU/DoT/DoH/DoQ)
  • Choose between Direct or WARP outbound connections

Advanced Connectivity

Utilize modern protocols and flexible connection options.

  • WARP and Direct outbound connection choices
  • WireGuard integration for WARP outbound connections with automatic fallback
  • Supports multiple VLESS inbound protocols (TCP / HTTPUpgrade(WS) / QUIC)
  • Automatic configuration rotation based on a defined interval

Intelligent Management

Benefit from automated maintenance and robust service management.

  • Optional automatic updates to keep the agent current
  • Intelligent process monitoring and management using Monit
  • Configuration self-testing ensures link validity
  • Automated configuration rotation for enhanced security and freshness

Get Started Quickly

Deploy your own VPN server in minutes with our comprehensive setup guides.

  • Supports Ubuntu (20+) and Debian (10+)
  • Works on AMD64 or ARM64 architecture
  • Requires minimal resources (2 vCPUs, 2GB RAM recommended)

Installation Guide →

Open Source Architecture

CompassVPN consists of two main components:

  1. Agent - Deploys on your VPN server
  2. Manager - Handles metrics and monitoring
# Clone the agent repository
git clone https://github.com/compassvpn/agent.git
cd agent

# Configure your settings
cp env_file.example env_file
# Edit env_file with your preferred settings

# Run the bootstrap script
./bootstrap.sh

Agent Repository → | Manager Repository →