forked from 1Panel-dev/appstore
-
Notifications
You must be signed in to change notification settings - Fork 118
feat: 增加OneClickVirt通用虚拟化管理控制面板的APP #3535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
spiritLHLS
wants to merge
1
commit into
okxlin:localApps
Choose a base branch
from
spiritLHLS:localApps
base: localApps
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| ## 使用说明 | ||
|
|
||
| > 安装前请先在 **应用商店** 中安装并运行 **MySQL** 或 **MariaDB**,安装时在表单中选择对应的数据库服务。 | ||
| > | ||
| > 默认 Web 访问端口为 **80**,容器启动后等待约 **30 秒**再访问。 | ||
| > | ||
| > **`前端访问地址(FRONTEND_URL)`** 为可选项:若通过 IP 直接访问可留空;若需要通过域名或 HTTPS 访问,请填入完整地址(如 `https://your-domain.com`),该配置影响 CORS 和 OAuth2 回调等功能。 | ||
| > | ||
| > 数据持久化目录: | ||
| > - `./storage` → 容器内 `/app/storage`(配置、证书、日志、上传等) | ||
|
|
||
| ## 产品介绍 | ||
|
|
||
| **OneClickVirt** 是一个可扩展的通用虚拟化管理控制面板,通过 SSH 或 API 远程管理多台节点服务器上的虚拟化环境,支持自动 NAT 端口映射、资源配额管理、兑换码/邀请码/OAuth2 分发容器与虚拟机。 | ||
|
|
||
| 控制面板本身对部署环境**没有公网独立 IP 的要求**,只需有端口能访问前端即可;甚至在无公网 IPv4 地址的环境下也可正常管理多台虚拟化节点。 | ||
|
|
||
| 详细文档见 [www.spiritlhl.net](https://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_precheck.html) | ||
|
|
||
| > ⚠️ **节点要求**:被纳管节点的宿主机网卡必须直接绑定待映射的公网 IP 地址。不支持阿里云 VPC 等通过 NAT/端口转发提供公网 IP 的宿主机。 | ||
|
|
||
| > 开源仓库见 [https://github.com/oneclickvirt/oneclickvirt](https://github.com/oneclickvirt/oneclickvirt) | ||
|
|
||
| ## 支持的虚拟化平台 | ||
|
|
||
| | 平台 | 实例类型 | | ||
| |------|----------| | ||
| | Proxmox VE | 容器、虚拟机 | | ||
| | Incus | 容器、虚拟机 | | ||
| | LXD | 容器、虚拟机 | | ||
| | Docker | 容器 | | ||
| | Podman | 容器 | | ||
| | Containerd (nerdctl) | 容器 | | ||
|
|
||
| ## 主要功能 | ||
|
|
||
| - **多节点管理**:通过 SSH 或 API 统一管理多台服务器上的虚拟化环境,无需逐台登录操作 | ||
| - **自动 NAT 端口映射**:支持 IPv4/IPv6 自动端口映射,支持 NAT IPv4、独立 IPv4、纯 IPv6 等多种网络类型,根据不同 Provider 自动选择最佳映射方案(原生、设备代理、iptables 等) | ||
| - **灵活分发机制**:支持邀请码、兑换码、OAuth2 等方式分发容器/虚拟机,支持非公开注册的邀请机制 | ||
| - **资源配额管理**:按用户等级设置实例数量、CPU、内存、磁盘、带宽的配额限制 | ||
| - **流量统计与限制**:集成 IP 级和网络接口级的精确流量统计,支持用户级、实例级、Provider 级的流量限制,每月初统一重置 | ||
| - **内置镜像数据**:各虚拟化平台自带预编译镜像,无需自行查找,支持统一管理或自定义添加镜像地址 | ||
| - **国际化界面**:前端支持中英双语切换,默认中文显示 | ||
| - **多架构支持**:同时提供 `amd64` 与 `arm64` 架构镜像 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| ## Usage Notes | ||
|
|
||
| > Before installing, please first install and run **MySQL** or **MariaDB** from the **App Store**, then select the database service in the installation form. | ||
| > | ||
| > The default Web UI port is **80**. After the container starts, please wait approximately **30 seconds** before accessing the Web UI. | ||
| > | ||
| > **`Frontend URL (FRONTEND_URL)`** is optional: leave it empty if accessing by IP directly; set it to the full URL (e.g. `https://your-domain.com`) if you need domain or HTTPS access — this affects CORS and OAuth2 callback configurations. | ||
| > | ||
| > Data persistence directory: | ||
| > - `./storage` → inside container `/app/storage` (configs, certs, logs, uploads, etc.) | ||
|
|
||
| ## Product Overview | ||
|
|
||
| **OneClickVirt** is an extensible universal virtualization management control panel. It manages virtualization environments across multiple node servers via SSH or API, with support for automatic NAT port mapping, resource quota management, and distributing containers/VMs via voucher codes, invite codes, or OAuth2. | ||
|
|
||
| The control panel itself **does not require a public IP** on the machine it runs on — any accessible port for the frontend is enough. It was designed specifically to manage multiple virtualization nodes even without a public IPv4 address. | ||
|
|
||
| Full documentation: [www.spiritlhl.net](https://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_precheck.html) | ||
|
|
||
| > ⚠️ **Node requirement**: Managed nodes must have the public IP address directly bound to a network interface. Hosts where the public IP is provided through NAT/port forwarding (e.g. Alibaba Cloud VPC) are not supported. | ||
|
|
||
| > Open Source repo: [https://github.com/oneclickvirt/oneclickvirt](https://github.com/oneclickvirt/oneclickvirt) | ||
|
|
||
|
|
||
| ## Supported Virtualization Platforms | ||
|
|
||
| | Platform | Instance Types | | ||
| |----------|----------------| | ||
| | Proxmox VE | container, vm | | ||
| | Incus | container, vm | | ||
| | LXD | container, vm | | ||
| | Docker | container | | ||
| | Podman | container | | ||
| | Containerd (nerdctl) | container | | ||
|
|
||
spiritLHLS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## Key Features | ||
|
|
||
| - **Multi-Node Management**: Manage virtualization environments on multiple servers via SSH or API from a single control panel | ||
| - **Automatic NAT Port Mapping**: Supports IPv4/IPv6 auto port mapping across multiple network types (NAT IPv4, dedicated IPv4, pure IPv6, etc.), with automatic selection of the best mapping method per provider (native, device proxy, iptables, etc.) | ||
| - **Flexible Distribution**: Distribute containers/VMs via invite codes, voucher codes, or OAuth2; supports invite-only registration with per-level resource quotas | ||
| - **Resource Quota Management**: Set per-user limits on instance count, CPU, memory, disk, and bandwidth by user level | ||
| - **Traffic Statistics & Limits**: Precise IP-level and interface-level traffic tracking; supports user-level, instance-level, and provider-level limits; resets monthly | ||
| - **Built-in Image Catalog**: Pre-compiled images included for all supported platforms — no manual image hunting required; supports custom image sources | ||
| - **Internationalization**: Frontend supports Chinese/English language switching (Chinese by default) | ||
| - **Multi-Architecture Support**: Available for both `amd64` and `arm64` architectures | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: OneClickVirt | ||
| tags: | ||
| - 实用工具 | ||
| title: 一键虚拟化管理面板 | ||
| description: 一键虚拟化管理面板 | ||
| additionalProperties: | ||
| key: oneclickvirt | ||
| name: OneClickVirt | ||
| tags: | ||
| - Tool | ||
| shortDescZh: 可扩展的通用虚拟化管理平台,需外部 MySQL/MariaDB | ||
| shortDescEn: Extensible virtualization management platform requiring external MySQL/MariaDB | ||
| description: | ||
| en: OneClickVirt is an extensible universal virtualization management platform. It supports multiple virtualization backends including Docker, LXD, Incus, Podman, Containerd, Proxmox VE, QEMU, and KubeVirt, making it easy to provision and manage virtual machines and containers. | ||
| ja: OneClickVirtは、拡張可能な汎用仮想化管理プラットフォームです。Docker、LXD、Incus、Podman、Containerd、Proxmox VE、QEMU、KubeVirtなど複数の仮想化バックエンドをサポートします。 | ||
| ms: OneClickVirt ialah platform pengurusan virtualisasi universal yang boleh dikembangkan. Ia menyokong pelbagai backend virtualisasi termasuk Docker, LXD, Incus, Podman, Containerd, Proxmox VE, QEMU dan KubeVirt. | ||
| pt-br: OneClickVirt é uma plataforma extensível de gerenciamento de virtualização. Suporta múltiplos backends de virtualização, incluindo Docker, LXD, Incus, Podman, Containerd, Proxmox VE, QEMU e KubeVirt. | ||
| ru: OneClickVirt — расширяемая универсальная платформа управления виртуализацией. Поддерживает множество бэкендов виртуализации, включая Docker, LXD, Incus, Podman, Containerd, Proxmox VE, QEMU и KubeVirt. | ||
| ko: OneClickVirt는 확장 가능한 범용 가상화 관리 플랫폼입니다. Docker, LXD, Incus, Podman, Containerd, Proxmox VE, QEMU, KubeVirt 등 다양한 가상화 백엔드를 지원합니다. | ||
| zh-Hant: OneClickVirt 是一個可擴展的通用虛擬化管理平台,支援 Docker、LXD、Incus、Podman、Containerd、Proxmox VE、QEMU、KubeVirt 等多種虛擬化後端。 | ||
| zh: OneClickVirt 是一款可扩展的通用虚拟化管理平台,支持 Docker、LXD、Incus、Podman、Containerd、Proxmox VE、QEMU、KubeVirt 等多种虚拟化后端,轻松实现虚拟机与容器的创建与管理。 | ||
| type: website | ||
| crossVersionUpdate: false | ||
| limit: 0 | ||
| recommend: 0 | ||
| batchInstallSupport: false | ||
| website: https://github.com/oneclickvirt/oneclickvirt | ||
| github: https://github.com/oneclickvirt/oneclickvirt | ||
| document: https://github.com/oneclickvirt/oneclickvirt | ||
| architectures: | ||
| - amd64 | ||
| - arm64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| additionalProperties: | ||
| formFields: | ||
| - child: | ||
| default: "" | ||
| envKey: PANEL_DB_HOST | ||
| required: true | ||
| type: service | ||
| default: mysql | ||
| envKey: PANEL_DB_TYPE | ||
| label: | ||
| en: Database Service | ||
| ja: データベースサービス | ||
| ms: Perkhidmatan Pangkalan Data | ||
| pt-br: Serviço de Banco de Dados | ||
| ru: Сервис базы данных | ||
| ko: 데이터베이스 서비스 | ||
| zh-Hant: 資料庫服務 | ||
| zh: 数据库服务 | ||
| required: true | ||
| type: apps | ||
spiritLHLS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| values: | ||
| - label: MySQL | ||
| value: mysql | ||
| - label: MariaDB | ||
| value: mariadb | ||
spiritLHLS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - default: oneclickvirt | ||
| envKey: PANEL_DB_NAME | ||
| label: | ||
| en: Database Name | ||
| ja: データベース名 | ||
| ms: Nama Pangkalan Data | ||
| pt-br: Nome do Banco de Dados | ||
| ru: Имя базы данных | ||
| ko: 데이터베이스 이름 | ||
| zh-Hant: 資料庫名稱 | ||
| zh: 数据库名 | ||
| random: true | ||
| required: true | ||
| rule: paramCommon | ||
| type: text | ||
| - default: oneclickvirt | ||
| envKey: PANEL_DB_USER | ||
| label: | ||
| en: Database User | ||
| ja: データベースユーザー | ||
| ms: Pengguna Pangkalan Data | ||
| pt-br: Usuário do Banco de Dados | ||
| ru: Пользователь базы данных | ||
| ko: 데이터베이스 사용자 | ||
| zh-Hant: 資料庫使用者 | ||
| zh: 数据库用户 | ||
| random: true | ||
| required: true | ||
| rule: paramCommon | ||
| type: text | ||
| - default: oneclickvirt | ||
| envKey: PANEL_DB_USER_PASSWORD | ||
| label: | ||
| en: Database Password | ||
| ja: データベースパスワード | ||
| ms: Kata Laluan Pangkalan Data | ||
| pt-br: Senha do Banco de Dados | ||
| ru: Пароль базы данных | ||
| ko: 데이터베이스 비밀번호 | ||
| zh-Hant: 資料庫密碼 | ||
| zh: 数据库密码 | ||
| random: true | ||
| required: true | ||
| rule: paramComplexity | ||
| type: password | ||
| - default: "" | ||
| edit: true | ||
| envKey: FRONTEND_URL | ||
| label: | ||
| en: Frontend URL (optional, e.g. https://your-domain.com) | ||
| ja: フロントエンド URL(例:https://your-domain.com) | ||
| ms: URL bahagian hadapan (cth. https://your-domain.com) | ||
| pt-br: URL do frontend (ex. https://your-domain.com) | ||
| ru: URL фронтенда (напр. https://your-domain.com) | ||
| ko: 프론트엔드 URL(예:https://your-domain.com) | ||
| zh-Hant: 前端存取位址(選填,如 https://your-domain.com) | ||
| zh: 前端访问地址(选填,如 https://your-domain.com) | ||
| required: false | ||
| rule: paramExtUrl | ||
| type: text | ||
| - default: 80 | ||
| edit: true | ||
| envKey: PANEL_APP_PORT_HTTP | ||
| label: | ||
| en: WebUI Port | ||
| ja: WebUI ポート | ||
| ms: Port WebUI | ||
| pt-br: Porta WebUI | ||
| ru: Порт WebUI | ||
| ko: WebUI 포트 | ||
| zh-Hant: WebUI 埠 | ||
| zh: 网页端口 | ||
| required: true | ||
| rule: paramPort | ||
| type: number | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| services: | ||
| oneclickvirt: | ||
| image: spiritlhl/oneclickvirt:no-db | ||
| container_name: ${CONTAINER_NAME} | ||
| restart: unless-stopped | ||
| networks: | ||
| - 1panel-network | ||
| ports: | ||
| - ${PANEL_APP_PORT_HTTP}:80 | ||
| environment: | ||
| - FRONTEND_URL=${FRONTEND_URL} | ||
| - PANEL_DB_HOST=${PANEL_DB_HOST} | ||
| - PANEL_DB_PORT=${PANEL_DB_PORT} | ||
| - PANEL_DB_NAME=${PANEL_DB_NAME} | ||
| - PANEL_DB_USER=${PANEL_DB_USER} | ||
| - PANEL_DB_USER_PASSWORD=${PANEL_DB_USER_PASSWORD} | ||
| volumes: | ||
| - ./storage:/app/storage | ||
spiritLHLS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| command: | ||
| - /bin/bash | ||
| - -c | ||
| - | | ||
| awk ' | ||
| /^mysql:/{in_mysql=1} | ||
| /^[a-zA-Z]/ && !/^mysql:/{in_mysql=0} | ||
| in_mysql && /^ path:/{print " path: " ENVIRON["PANEL_DB_HOST"]; next} | ||
| in_mysql && /^ port:/{print " port: " ENVIRON["PANEL_DB_PORT"]; next} | ||
| in_mysql && /^ db-name:/{print " db-name: " ENVIRON["PANEL_DB_NAME"]; next} | ||
| in_mysql && /^ username:/{print " username: " ENVIRON["PANEL_DB_USER"]; next} | ||
| in_mysql && /^ password:/{print " password: " ENVIRON["PANEL_DB_USER_PASSWORD"]; next} | ||
spiritLHLS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| {print} | ||
| ' /app/config.yaml > /tmp/config.yaml.tmp && mv /tmp/config.yaml.tmp /app/config.yaml && | ||
| exec /start.sh | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "wget -q -O - http://localhost/api/v1/health || exit 1"] | ||
| interval: 30s | ||
| timeout: 10s | ||
| retries: 5 | ||
| start_period: 30s | ||
| labels: | ||
| createdBy: "Apps" | ||
| networks: | ||
| 1panel-network: | ||
| external: true | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.