Oneclickvirt
#OneClickVirt Virtualization Management Platform
An extensible universal virtualization management platform that supports LXD, Incus, Docker, Podman, Containerd, Proxmox VE, QEMU/KVM, and KubeVirt.
The web console uses Vue 3, Vite, and Element Plus, with responsive layouts checked for desktop, tablet, Android-sized, and iOS-sized viewports.
#Language
#Detailed Description
#Integration Test Report
The automated integration test report is available at: oneclickvirt.github.io/oneclickvirt
The report supports bilingual display (Chinese/English), light/dark theme switching, Git ref/SHA/run metadata, and server log expansion for failed cases, covering 200+ API endpoint tests including functional, permission, boundary, and security tests. See action_tests/ for details.
#Supported Virtualization Platforms
| Type ID | Platform | Instance Types | Repository |
|---|---|---|---|
lxd |
LXD | container, vm | oneclickvirt/lxd |
incus |
Incus | container, vm | oneclickvirt/incus |
docker |
Docker | container | oneclickvirt/docker |
podman |
Podman | container | oneclickvirt/podman |
containerd |
Containerd (nerdctl) | container | oneclickvirt/containerd |
proxmox |
Proxmox VE | container, vm | oneclickvirt/pve |
qemu |
QEMU | vm | oneclickvirt/qemu |
kubevirt |
KubeVirt | vm | oneclickvirt/kubevirt |
Additional backend adapters are available for local or desktop virtualization experiments, including orbstack, multipass, vagrant, virtualbox, and vmware. See server/provider/README.md for implementation details and support scope.
#Quick Deployment
Avoid compiling from source whenever possible. We recommend deploying using separate binary files or directly pulling the Docker image for deployment.
#Method 0: Using the 1Panel Third-Party App Store
okxlin/appstore now includes OneClickVirt. If you already use 1Panel, follow that repository's instructions to add or synchronize the local app store, then deploy oneclickvirt from the local app list.
#Method 1: Using Pre-built Images
Use pre-built multi-architecture images that automatically downloads the appropriate version for your system architecture.
Image Tags:
| Image Tag | Description | Use Case |
|---|---|---|
oneclickvirt/oneclickvirt:latest |
All-in-one version (built-in database) | Quick deployment |
oneclickvirt/oneclickvirt:20260728 |
All-in-one version with specific date | Fixed version requirement |
oneclickvirt/oneclickvirt:no-db |
Standalone database version | Without database |
oneclickvirt/oneclickvirt:no-db-20260728 |
Standalone database version with date | Without database |
All images support both linux/amd64 and linux/arm64 architectures.
View All-in-One Version (Built-in Database)
Basic Usage (without domain configuration):
docker run -d \ --name oneclickvirt \ -p 80:80 \ -v oneclickvirt-data:/var/lib/mysql \ -v oneclickvirt-storage:/app/storage \ --restart unless-stopped \ oneclickvirt/oneclickvirt:latest
Configure Domain Access:
If you need to configure a domain, set the FRONTEND_URL environment variable:
docker run -d \ --name oneclickvirt \ -p 80:80 \ -e FRONTEND_URL="https://your-domain.com" \ -v oneclickvirt-data:/var/lib/mysql \ -v oneclickvirt-storage:/app/storage \ --restart unless-stopped \ oneclickvirt/oneclickvirt:latest
Or using GitHub Container Registry:
docker run -d \ --name oneclickvirt \ -p 80:80 \ -e FRONTEND_URL="https://your-domain.com" \ -v oneclickvirt-data:/var/lib/mysql \ -v oneclickvirt-storage:/app/storage \ --restart unless-stopped \ ghcr.io/oneclickvirt/oneclickvirt:latest
View Standalone Database Version
Use external database for smaller image size and faster startup:
docker run -d \ --name oneclickvirt \ -p 80:80 \ -e FRONTEND_URL="https://your-domain.com" \ -e DB_HOST="your-mysql-host" \ -e DB_PORT="3306" \ -e DB_NAME="oneclickvirt" \ -e DB_USER="root" \ -e DB_PASSWORD="your-password" \ -v oneclickvirt-storage:/app/storage \ --restart unless-stopped \ oneclickvirt/oneclickvirt:no-db
Environment Variables:
FRONTEND_URL: Frontend access URL (required, supports http/https)DB_HOST: Database host addressDB_PORT: Database port (default 3306)DB_NAME: Database nameDB_USER: Database usernameDB_PASSWORD: Database password
The no-db image stores its runtime configuration at /app/storage/config.yaml in the oneclickvirt-storage volume. Reuse the same storage volume when updating the image or recreating the container; database settings entered on the initialization page and other system-level settings then survive replacement. Non-empty DB_* environment variables take precedence over the file, so recreations may also keep passing the same database environment. Deployments that explicitly mount /app/config.yaml continue to use that file first.
Note:
FRONTEND_URLis used to configure the frontend access address, affecting features like CORS and OAuth2 callbacks. The system will automatically detect HTTP/HTTPS protocol and adjust configurations accordingly. The protocol prefix can be either http or https.
#Method 2: Using Docker Compose
View Docker Compose Deployment
Use Docker Compose to deploy the complete development environment with one command, using multi-container deployment architecture with separate frontend, backend, and database containers:
git clone https://github.com/oneclickvirt/oneclickvirt.git cd oneclickvirt cat > .env << 'EOF' MYSQL_ROOT_PASSWORD=change-this-root-password MYSQL_PASSWORD=change-this-app-password EOF docker-compose up -d --build || docker compose up -d --build
Default Configuration:
- Frontend service:
http://localhost:8888 - Backend API: Accessed via frontend proxy
- MariaDB database: Port 3306, database name
oneclickvirt - Database credentials:
MYSQL_ROOT_PASSWORDandMYSQL_PASSWORDfrom.env - Data persistence:
- Database data: Docker volume
mysql_data - Application storage:
./data/app/
- Database data: Docker volume
Initialization Configuration:
When accessing for the first time, you will enter the initialization interface. Please fill in the database configuration as follows:
- Database Host:
mysql(container name, not 127.0.0.1) - Database Port:
3306 - Database Name:
oneclickvirt - Database User:
oneclickvirt - Database Password: Use the
MYSQL_PASSWORDvalue from.env
Custom Port (Optional):
To modify the frontend access port, edit the ports configuration in docker-compose.yaml:
services: web: ports: - "your-port:80" # e.g., "80:80" or "8080:80"
Stop Services:
docker-compose down
View Logs:
docker-compose logs -f
Clean Data:
docker-compose down
rm -rf ./data
#Method 3: Bare-metal Full Installer
View Full Installer
scripts/install_full.sh installs the database, reverse proxy, TLS configuration, frontend, backend, and system service in one flow. It supports MySQL-compatible local databases (MySQL or MariaDB) and Caddy, Nginx, or OpenResty.
The installer auto-detects common Linux and Unix-like targets, including Debian/Ubuntu, RHEL/CentOS/Rocky/Alma/Fedora/Amazon Linux, openSUSE/SLES, Arch/Manjaro, Alpine, and BSD package managers. It also detects systemd, OpenRC, rc.d/service, and no-init environments. On distributions where native MySQL packages are unavailable or unstable, the installer automatically falls back to MariaDB as the MySQL-compatible backend; use --no-db-fallback to disable this behavior. BSD installs require a matching release asset for the OS/architecture, otherwise use Docker/Linux or build the server from source.
The domain input auto-detects protocol prefixes: enter https://panel.example.com to auto-enable TLS, http://panel.example.com to auto-disable TLS, or a plain domain to be prompted interactively.
curl -fsSL https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/main/scripts/install_full.sh -o install_full.sh bash install_full.sh
For non-interactive deployment:
# HTTPS with auto TLS bash install_full.sh \ --non-interactive \ --domain https://panel.example.com \ --email admin@example.com \ --db-type mariadb \ --proxy caddy # HTTP only, no TLS bash install_full.sh \ --non-interactive \ --domain http://192.168.1.100 \ --proxy caddy
Useful automation flags:
bash install_full.sh --version v1.2.3 --db-wait-timeout 300 bash install_full.sh --db-type mysql --no-db-fallback
The installer requires at least 10 GB of free disk space and 2 GB of combined memory and swap by default. It writes the generated database password to the final installation summary; save it before closing the terminal.
After installation, download the standard installer to manage OneClickVirt deployments that use a systemd service:
curl -fsSL https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/main/scripts/install.sh -o install.sh chmod +x install.sh ./install.sh status ./install.sh logs --lines 200 ./install.sh logs --follow ./install.sh upgrade ./install.sh uninstall
uninstall removes the service, program, and web files while retaining config.yaml and storage; uninstall --purge removes the entire application directory. Neither mode removes the database, reverse proxy, or TLS certificates because other applications may share them. Non-interactive uninstall also requires --yes.
#Controller Version Management
Super administrators can open Manage updates in the controller page footer to view the current version, Release candidates, remote rollback versions, local backups, and copyable manual commands.
- The panel can automatically update, roll back, or restart only a Linux systemd installation running as root whose controller binary and applicable Web directory are inside the controlled installation root and are not symlinks. It creates up to five local backups before switching files and attempts to restore controller/Web assets on failure. Database migrations are not rolled back automatically.
- A Release must provide a
SHA256SUMSasset. The panel downloads that manifest first, verifies the selected Linux controller archive and, when the deployment manages its controlled static directory,web-dist.zip, and only then extracts or changes local files. Older Releases without the manifest are shown as unavailable for automatic application; the existing script remains available for manual recovery. - Docker, Docker Compose, and source deployments are never modified by the panel. It displays commands only. This repository's Compose deployment uses
docker compose up -d --build --force-recreate api webto rebuild API and Web while retaining themysql_datanamed volume. Custom Docker ports, domains, environment variables, andno-dbdeployments must reuse their original container arguments after exporting them. - A reverse proxy is reloaded after a controlled systemd restart only when it is explicitly listed in
ONECLICKVIRT_PROXY_SERVICES. Release metadata and assets try GitHub,ONECLICKVIRT_UPDATE_API_ENDPOINTS, and the configured CDN/API proxy endpoints in order; panel download URLs must use HTTPS.
Common overrides (prefer a controlled service environment file, then restart the service):
| Variable | Purpose |
|---|---|
ONECLICKVIRT_UPDATE_ENABLED=false |
Disables panel update, rollback, and restart actions. |
ONECLICKVIRT_UPDATE_MODE |
Forces systemd, docker, compose, source, embedded, unknown, or disabled. Set compose explicitly when a Compose container cannot expose a reliable marker. |
ONECLICKVIRT_UPDATE_PROXY |
Comma-separated HTTPS Release-asset/CDN proxy prefixes. |
ONECLICKVIRT_UPDATE_API_ENDPOINTS |
Comma-separated HTTPS GitHub API or API-proxy roots. |
ONECLICKVIRT_UPDATE_REPO |
Release repository; defaults to oneclickvirt/oneclickvirt. |
ONECLICKVIRT_UPDATE_FLAVOR |
standalone or allinone; normally inferred from the installer's SERVER_ASSET marker. |
ONECLICKVIRT_UPDATE_WEB |
Explicitly enables or disables replacement of the controlled static Web directory. install_full.sh sets this to true because it serves web-dist.zip through its reverse proxy. |
ONECLICKVIRT_INSTALL_ROOT, ONECLICKVIRT_SERVER_BIN, ONECLICKVIRT_WEB_DIR |
Controlled install root, controller binary, and managed static Web directory. Automatic mode requires each applicable update target to remain below the install root. |
ONECLICKVIRT_SERVICE_NAME, ONECLICKVIRT_SERVICE_FILE |
Controlled systemd service and unit file. |
ONECLICKVIRT_PROXY_SERVICES |
Comma-separated systemd service names such as Nginx, OpenResty, or Caddy to reload after an update/restart. |
ONECLICKVIRT_UPDATE_SCRIPT |
Existing installer path shown in the footer commands tab; when absent, the panel shows a download-and-run command. |
ONECLICKVIRT_UPDATE_HEALTH_PORT |
Local /api/v1/health port after restart; defaults to the controller config or 8888. |
ONECLICKVIRT_UPDATE_ALLOW_UNVERIFIED=true |
Recovery-only opt-out for old Releases without SHA256SUMS; do not set it in production. |
#Method 4: Build from Source
View Build Instructions
If you need to modify the source code or build custom images:
All-in-One Version (Built-in Database):
git clone https://github.com/oneclickvirt/oneclickvirt.git cd oneclickvirt docker build -t oneclickvirt . docker run -d \ --name oneclickvirt \ -p 80:80 \ -v oneclickvirt-data:/var/lib/mysql \ -v oneclickvirt-storage:/app/storage \ --restart unless-stopped \ oneclickvirt
Docker builds embed scripts/install_agent.sh automatically. If you also want the controller image to serve local agent release archives instead of redirecting to GitHub Releases, place these files in server/assets/agent/ before docker build:
install_agent.sh oneclickvirt-agent-linux-amd64.tar.gz oneclickvirt-agent-linux-arm64.tar.gz
Standalone Database Version:
git clone https://github.com/oneclickvirt/oneclickvirt.git cd oneclickvirt docker build -f Dockerfile.no-db -t oneclickvirt:no-db . docker run -d \ --name oneclickvirt \ -p 80:80 \ -e FRONTEND_URL="https://your-domain.com" \ -e DB_HOST="your-mysql-host" \ -e DB_PORT="3306" \ -e DB_NAME="oneclickvirt" \ -e DB_USER="root" \ -e DB_PASSWORD="your-password" \ -v oneclickvirt-storage:/app/storage \ --restart unless-stopped \ oneclickvirt:no-db
When updating or recreating a no-db container, reuse the same oneclickvirt-storage volume. The runtime configuration remains at /app/storage/config.yaml, so the database does not need to be initialized again.
Direct source builds of the Go controller behave the same way: local agent assets in server/assets/agent/ are optional, and missing files fall back to the official GitHub installer/releases instead of breaking the build.
#Development and Testing
#Proxmox VE integration checks
The proxmoxve integration job uses the installer from oneclickvirt/pve. It provisions a disposable worker, runs the installer in detached phases, waits through both the kernel reboot and any scheduled ifupdown2 bootstrap reboot, then validates the PVE runtime, bridge, NAT state, and controller-facing provider path. A lost worker connection is reported as an infrastructure skip only when the detached job cannot be observed; it is not treated as a passing module assertion. The PVE repository also runs syntax, network regression, and ShellCheck tests for its installer scripts.
View Development Setup
#Environment Requirements
- Go 1.25.0
- Node.js 22+
- MySQL 5.7+
- npm or yarn
#Environment Deployment
- Build frontend
cd web
npm i
npm run serve
- Build backend
cd server
go mod tidy
go run main.go
-
In development mode, there's no need to proxy the backend, as Vite already includes backend proxy requests.
-
Create an empty database named
oneclickvirtin MySQL, and record the corresponding account and password. -
Access the frontend address, which will automatically redirect to the initialization interface. Fill in the database information and related details, then click initialize.
-
After completing initialization, it will automatically redirect to the homepage, and you can start development and testing.
#Local Development
- Frontend: http://localhost:8080
- Backend API: http://localhost:8888
- API Documentation: http://localhost:8888/swagger/index.html
#Initial Account
The administrator account is created from the setup form during first initialization. The quick-fill action generates a random strong password each time; save the generated value before submitting the form.
#Configuration File
The main configuration file is located at server/config.yaml
#Sponsors
Thanks to the following groups and individuals for sponsoring OneClickVirt:
#LICENSE
#Demo Screenshots
The screenshots below are generated from the current responsive frontend, including the public homepage, sponsor section, mobile layout, admin pages, and user pages.
Public homepage
Sponsors
Mobile homepage
Admin dashboard
Provider management
User dashboard
User instances