🇮🇷 فارسی
A lightweight web panel to install, manage, and monitor servers running MasterDnsVPN.
Still in development, be cautious about security.
- JWT-based authentication — stateless, easy and secure
- Version-aware installer — choose between April 5 and April 12 builds
- Automatic domain injection — tuned configs with your domain baked in
- Web dashboard — real-time CPU, RAM, disk, and network stats via WebSocket
- Browser config editor — view and edit
server_config.tomlandencrypt_key.txtdirectly from the dashboard, with automatic service restart on save - Config scheduler — define multiple server configs for different times of day and have a system service auto-swap them on a schedule
- One-command reinstall and version switching — preserves your key and config if you want
- Systemd-managed — panel, VPN, and scheduler all run as services, restart on crash and reboot
- Due to different mighty issues and instablities, it's better to always create a "screen" session and then after that, begin installation to avoid any interuptions or breaks:
screen -S mrvpn- Now, when ever you got disconnected and got connected back, get back where you left off and see what ever was in ther seesion, or continue easily with:
screen -r mrvpn- Installtion Command:
curl -fsSL https://raw.githubusercontent.com/sam-soofy/mrvpn-manager-panel/main/install.sh -o install.sh
sudo bash install.shThe installer will ask you:
- Whether to install/update the Panel
- Whether to install/update MasterDnsVPN
- Which version: April 5 or April 12
- Your domain (e.g.
vpn.example.com) - Whether to keep your existing
server_config.tomlandencrypt_key.txtif found
After installation, your credentials are printed in a clearly visible block:
╔══════════════════════════════════════════════════════╗
║ ★ SAVE YOUR LOGIN CREDENTIALS ★ ║
╠══════════════════════════════════════════════════════╣
║ ║
║ URL : http://YOUR_SERVER_IP:5000 ║
║ User : admin ║
║ Pass : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ║
║ ║
╠══════════════════════════════════════════════════════╣
║ Password file : /opt/mrvpn-manager-panel/admin_pass.txt
║ ║
║ TO RESET PASSWORD: ║
║ nano /opt/mrvpn-manager-panel/admin_pass.txt ║
║ systemctl restart mrvpn-manager-panel ║
╚══════════════════════════════════════════════════════╝
The panel reads the password directly from the file at startup. To reset:
# 1. Edit the password file (replace with your new password)
nano /opt/mrvpn-manager-panel/admin_pass.txt
# 2. Restart the panel to apply it
systemctl restart mrvpn-manager-panelThat's it. No tokens, no scripts, no extra steps.
Click Edit server_config.toml or Edit encrypt_key.txt on the dashboard to open a full-screen editor. Changes are saved to disk and MasterDnsVPN is restarted automatically after you confirm.
The scheduler lets you define multiple server configs that activate at specific times of day. Useful for aggressive ARQ settings at night and lighter settings during peak hours.
- Open the dashboard → Config Scheduler section → Add Schedule
- Set the name, time (24h), and days of the week
- Paste your TOML config — or click Load current config to start from whatever is running, then tweak it
- Save — repeat for other time slots
A separate systemd service (mrvpn-config-scheduler) polls every 30 seconds. When the current HH:MM matches a schedule entry for today, it writes the stored TOML to /opt/masterdnsvpn/server_config.toml and restarts the VPN service. The same schedule won't trigger more than once per minute.
Note: If two schedules share the same time, only the first one in the list fires.
# Add a schedule
curl -X POST http://localhost:5000/api/schedules \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Night Mode",
"time": "22:00",
"days": ["mon","tue","wed","thu","fri","sat","sun"],
"config": "... full TOML content ..."
}'
# List schedules
curl http://localhost:5000/api/schedules \
-H "Authorization: Bearer <token>"
# Delete a schedule
curl -X DELETE http://localhost:5000/api/schedules/<id> \
-H "Authorization: Bearer <token>"install.sh → sets up everything, handles reinstalls and version switching
systemd → keeps panel, VPN, and scheduler alive across reboots and crashes
web UI → monitor server health, edit configs, manage schedules
scheduler → auto-applies timed configs even when the dashboard isn't open
| File | Role |
|---|---|
install.sh |
Installer, version manager, upgrade tool |
mrvpn_manager_panel.py |
Main Flask + SocketIO web app |
scheduler.py |
Systemd daemon that auto-applies timed configs |
auth.py |
JWT token creation and verification |
config_editor.py |
Read/write MasterDnsVPN config and key files |
service_manager.py |
Restart MasterDnsVPN via systemd |
april5_server_config.toml |
Tuned config for the April 5 build |
april12_server_config.toml |
Tuned config for the April 12 build |
- Detects existing installs in both
/opt/masterdnsvpnand the current working directory - Backs up your files before wiping anything — asks per file whether to keep or regenerate
- Frees port 53 automatically by disabling the
systemd-resolvedstub listener if needed - Versioned systemd service —
systemctl status masterdnsvpnshows which build is running - Reinstall / version swap — re-run
install.shat any time
systemctl status mrvpn-manager-panel
systemctl restart mrvpn-manager-panel
journalctl -u mrvpn-manager-panel -fsystemctl status mrvpn-config-scheduler
systemctl restart mrvpn-config-scheduler
journalctl -u mrvpn-config-scheduler -fsystemctl status masterdnsvpn
systemctl restart masterdnsvpn
journalctl -u masterdnsvpn -fPOST /api/auth/login
Body: { "username": "admin", "password": "..." }
Returns: { "ok": true, "access_token": "...", "refresh_token": "..." }
POST /api/auth/refresh
Body: { "refresh_token": "..." }
Returns: { "ok": true, "access_token": "...", "refresh_token": "..." }
All other endpoints require Authorization: Bearer <access_token>.
POST /api/restart — restart MasterDnsVPN service
GET /api/status — current health snapshot (CPU, RAM, disk, network)
GET /api/config/server — read server_config.toml
POST /api/config/server — write server_config.toml and restart VPN
GET /api/config/key — read encrypt_key.txt
POST /api/config/key — write encrypt_key.txt and restart VPN
All config writes require "confirmed": true in the body. A first call without it returns a confirmation prompt.
GET /api/schedules — list all schedules (config content excluded)
POST /api/schedules — create a schedule
GET /api/schedules/<id> — fetch one schedule including full config
PUT /api/schedules/<id> — update a schedule
DELETE /api/schedules/<id> — delete a schedule
| Route | Description |
|---|---|
/ |
Dashboard — real-time stats, config editor, scheduler |
/login |
Login page |
/api/status |
Raw health JSON |
Panel not starting
journalctl -u mrvpn-manager-panel -n 50 --no-pagerScheduler not applying configs
journalctl -u mrvpn-config-scheduler -fPort 53 already in use
ss -ulnp | grep :53The installer handles this automatically. If it persists, check for other DNS daemons (named, dnsmasq).
VPN not starting after reboot
systemctl is-enabled masterdnsvpn
systemctl enable masterdnsvpn # if not enabledMissing Python packages
cd /opt/mrvpn-manager-panel
.venv/bin/pip install -r requirements.txt- Ubuntu / Debian-based Linux
- Root access
- Python 3.8+
- Port 5000 open (panel)
- Port 53 UDP open (MasterDnsVPN)
flask
flask-socketio
psutil
werkzeug
PyJWT