6131bcaba929d0ef9a361a04fe8452a82349c168
OpenVPN Monitor & Profiler
A modern, full-stack management solution for OpenVPN servers. It combines real-time traffic monitoring, historical analytics, and comprehensive user profile/PKI management into a unified web interface.
🏗️ Project Architecture
The project is modularized into four core microservices:
| Component | Directory | Service Name | Description |
|---|---|---|---|
| User Interface | APP_UI/ |
ovp-ui |
Vue 3 + Vite SPA served via Nginx. |
| Monitoring API | APP_CORE/ |
ovp-api |
Flask API for real-time stats and sessions. |
| Data Gatherer | APP_CORE/ |
ovp-gatherer |
Background service for traffic log aggregation & TSDB. |
| Profiler | APP_PROFILER/ |
ovp-profiler |
FastAPI module for PKI, Certificates, and VPN control. |
📦 Quick Start (Docker)
The recommended way to deploy is using Docker Compose:
- Clone the repository
- Start all services:
docker-compose up -d --build - Access the Dashboard: Open
http://localhostin your browser.
⚙️ Configuration
The system is highly configurable via environment variables in docker-compose.yml. All variables follow the OVPMON_{SECTION}_{KEY} format.
Key Environment Variables
| Variable | Description | Default Value |
|---|---|---|
OVPMON_API_SECRET_KEY |
JWT Secret Key | ovpmon-secret-change-me |
OVPMON_API_PORT |
Monitoring API Port | 5001 |
OVPMON_OPENVPN_MONITOR_DB_PATH |
Path to SQLite DB | /app/db/openvpn_monitor.db |
OVPMON_OPENVPN_MONITOR_LOG_PATH |
Path to OpenVPN status log | /var/log/openvpn/openvpn-status.log |
OVPMON_LOGGING_LEVEL |
Logging level (INFO/DEBUG) | INFO |
📚 Documentation
Detailed documentation is available in the DOCS/ directory:
- Deployment Guide: Manual setup for Linux.
- Security Architecture: 2FA, JWT, and Security.
- API Reference: Core Monitoring endpoints.
🛠️ Development (Manual)
If you wish to run services manually for development:
1. Core API & Gatherer
cd APP_CORE
pip install -r requirements.txt
python3 openvpn_api_v3.py # APP_CORE API (:5001)
python3 openvpn_gatherer_v3.py # APP_CORE Gatherer
2. Profiler API
cd APP_PROFILER
pip install -r requirements.txt
python3 main.py # APP_PROFILER API (:8000)
3. Frontend
cd APP_UI
npm install && npm run dev # UI (:5173)
⚠️ Important Notes
- Permissions: The Profiler container requires
NET_ADMINcapabilities and access to/dev/net/tun. - Cleanup: Certificate management and legacy visualization settings have been moved or removed from the Core module.
Description
Languages
Python
44.6%
Vue
37.5%
CSS
13.4%
JavaScript
2.5%
Jinja
0.9%
Other
1.1%