Cài đặt Super Admin Panel

Setup Guide

Hướng dẫn chi tiết từng bước để cài đặt Super Admin Panel - trung tâm quản lý tất cả White-Label instances.

Quy trình cài đặt

1

Chuẩn bị hệ thống

Cập nhật system packages và cài đặt dependencies cần thiết

Terminal
# Đăng nhập với quyền root
sudo su -

# Cập nhật hệ thống
apt update && apt upgrade -y

# Cài đặt dependencies cơ bản
apt install -y python3 python3-pip python3-venv wget curl git net-tools
2

Clone Repository

Tải source code OV-Panel từ GitHub về server

Terminal
# Clone repository về /opt
cd /opt
git clone -b Features/white_label https://github.com/TinyActive/OpenVpn-Panel.git ov-panel
cd ov-panel

Cấu trúc thư mục sau khi clone:

/opt/ov-panel/
├── backend/          # Backend source code
├── frontend/         # Frontend source code
├── data/            # Database directory
├── install.sh       # Installation script
├── installer.py     # Python installer
├── main.py          # Application entry point
└── pyproject.toml   # Python dependencies
3

Chạy Installation Script

Khởi chạy script cài đặt tự động

Terminal
# Chạy install.sh
bash install.sh

Script sẽ tự động thực hiện:

  • Cập nhật system packages
  • Tạo Python virtual environment
  • Cài đặt Python dependencies
  • Khởi chạy installer tương tác
4

Chọn chế độ Super Admin

Trong menu installer, chọn option [2] để cài đặt Super Admin Panel

Installer Menu
  ██████╗ ██╗   ██╗██████╗  █████╗ ███╗   ██╗███████╗██╗     
 ██╔═══██╗██║   ██║██╔══██╗██╔══██╗████╗  ██║██╔════╝██║     
 ██║   ██║██║   ██║██████╔╝███████║██╔██╗ ██║█████╗  ██║     
 ██║   ██║╚██╗ ██╔╝██╔═══╝ ██╔══██║██║╚██╗██║██╔══╝  ██║     
 ╚██████╔╝ ╚████╔╝ ██║     ██║  ██║██║ ╚████║███████╗███████╗
  ╚═════╝   ╚═══╝  ╚═╝     ╚═╝  ╚═╝╚═╝  ╚═══╝╚══════╝╚══════╝

Please choose an option:

  [1] Install as Standalone Panel (with OpenVPN)
  [2] Install as Super Admin Panel (White-Label Manager)  ← Chọn option này
  [3] Update
  [4] Restart
  [5] Uninstall
  [6] Exit

Your choice: 2
5

Nhập thông tin cấu hình

Cung cấp thông tin cần thiết cho Super Admin Panel

FieldMô tảVí dụ
UsernameTên đăng nhập Super Admin
superadmin
PasswordMật khẩu Super Admin (min 6 ký tự)
SecurePass123!
PortPort cho panel chạy
9000
URL PathURL prefix cho panel
dashboard
Configuration Input
# Super Admin Username
Enter Super Admin username: superadmin

# Super Admin Password
Enter Super Admin password: ********
Confirm password: ********

# Panel Port
Enter panel port [default: 9000]: 9000

# URL Path
Enter URL path [default: dashboard]: dashboard
6

Hoàn tất cài đặt

Installer sẽ tự động thực hiện các bước sau

Tạo file .env

Với cấu hình IS_SUPER_ADMIN=True

Khởi tạo Database

Tạo database và chạy migrations

Tạo Super Admin Account

Với username và password đã nhập

Build Frontend

Compile React application với Vite

Tạo Systemd Service

Service ov-panel.service và auto-start

7

Xác nhận cài đặt thành công

Kiểm tra service status và truy cập panel

Verification Commands
# Kiểm tra service status
systemctl status ov-panel

# Output mong đợi:
● ov-panel.service - OV-Panel Super Admin Panel
     Loaded: loaded (/etc/systemd/system/ov-panel.service; enabled)
     Active: active (running) since Mon 2025-11-17 10:00:00 UTC
   Main PID: 12345 (python)

# Kiểm tra port đang listen
netstat -tulpn | grep 9000

# Kiểm tra logs
journalctl -u ov-panel -f

Truy cập Super Admin Panel

Mở trình duyệt và truy cập:

http://your-server-ip:9000/dashboard

Username: superadmin (hoặc username bạn đã tạo)

Password: password bạn đã nhập khi cài đặt

Các file và thư mục quan trọng

PathMô tả
/opt/ov-panel/Thư mục cài đặt chính
/opt/ov-panel/.envFile cấu hình Super Admin
/opt/ov-panel/data/ov-panel.dbDatabase Super Admin
/opt/ov-panel/venv/Python virtual environment
/etc/systemd/system/ov-panel.serviceSystemd service file

Bước tiếp theo