Cài đặt Super Admin Panel
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
Chuẩn bị hệ thống
Cập nhật system packages và cài đặt dependencies cần thiết
# Đă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-toolsClone Repository
Tải source code OV-Panel từ GitHub về server
# Clone repository về /opt
cd /opt
git clone -b Features/white_label https://github.com/TinyActive/OpenVpn-Panel.git ov-panel
cd ov-panelCấ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 dependenciesChạy Installation Script
Khởi chạy script cài đặt tự động
# Chạy install.sh
bash install.shScript 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
Chọn chế độ Super Admin
Trong menu installer, chọn option [2] để cài đặt Super Admin Panel
██████╗ ██╗ ██╗██████╗ █████╗ ███╗ ██╗███████╗██╗
██╔═══██╗██║ ██║██╔══██╗██╔══██╗████╗ ██║██╔════╝██║
██║ ██║██║ ██║██████╔╝███████║██╔██╗ ██║█████╗ ██║
██║ ██║╚██╗ ██╔╝██╔═══╝ ██╔══██║██║╚██╗██║██╔══╝ ██║
╚██████╔╝ ╚████╔╝ ██║ ██║ ██║██║ ╚████║███████╗███████╗
╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚══════╝
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: 2Nhập thông tin cấu hình
Cung cấp thông tin cần thiết cho Super Admin Panel
| Field | Mô tả | Ví dụ |
|---|---|---|
Username | Tên đăng nhập Super Admin | superadmin |
Password | Mật khẩu Super Admin (min 6 ký tự) | SecurePass123! |
Port | Port cho panel chạy | 9000 |
URL Path | URL prefix cho panel | dashboard |
# 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]: dashboardHoà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
Xác nhận cài đặt thành công
Kiểm tra service status và truy cập panel
# 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 -fTruy cập Super Admin Panel
Mở trình duyệt và truy cập:
http://your-server-ip:9000/dashboardUsername: 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
| Path | Mô tả |
|---|---|
/opt/ov-panel/ | Thư mục cài đặt chính |
/opt/ov-panel/.env | File cấu hình Super Admin |
/opt/ov-panel/data/ov-panel.db | Database Super Admin |
/opt/ov-panel/venv/ | Python virtual environment |
/etc/systemd/system/ov-panel.service | Systemd service file |
