Pelican Panel v1.0.0-rc.2 常用 CLI 命令与工具详解
Pelican Panel v1.0.0-rc.2 的 php artisan 命令体系实测详解:p:* 八族命令总览,环境配置/redis/用户/节点/服务器/计划任务/egg/插件/维护逐条参数表,实测回显(p:info、p:node:make 21 参数、p:user:make UUID、p:node:list 空表、migrate/cache:clear/tinker),help 与官方文档 3 处差异标注,6 条 FAQ。
Pelican Panel v1.0.0-rc.2 常用 CLI 命令与工具详解
目标:把 Pelican Panel v1.0.0-rc.2 的命令行体系——
php artisan下的p:*自定义命令族与 Laravel 标准命令——逐条讲清:命令总览、参数表、实测输出、日常运维用法与 FAQ。本文所有回显为 2026-11-02/03 在 Ubuntu 24.04.5 + PHP 8.5.12 + MariaDB 10.11 + Redis 部署环境实测;配置层背景见 《Pelican Panel v1.0.0-rc.2 配置参数详解》。
一、环境信息
| 项目 | 值 |
|---|---|
| 组件 | Pelican Panel v1.0.0-rc.2 |
| 命令行入口 | php artisan <command>(工作目录 /var/www/html,p:info 实测 Installation Directory) |
| 框架 | Laravel Framework 13.38.0(php artisan --version 实测) |
| 运行时 | PHP 8.5.12 / Composer 2.10.3(p:info 实测) |
| 数据库 | MariaDB 10.11(迁移 255 条全部 Ran,实测) |
| 缓存/会话/队列 | Redis(实测) |
| 演示账号 | root / q1w2e3r4(p:user:make 实测创建) |
| 官方文档 | Artisan Commands 文档页(Updated 01/11/2026)+ 各命令 --help(实测抓取) |
| 实测日期 | 2026-11-02/03 |
二、工具总览
2.1 版本与运行态:php artisan p:info
面板自带的"体检"命令,输出环境、缓存、驱动、Filament/Livewire/权限组件与版本对照(实测节选):
Pelican ....................................................................
Latest Version .................................................. 1.0.0-rc.2
Panel Version ................................................... 1.0.0-rc.2
Up-to-Date ............................................................. Yes
Drivers ....................................................................
Cache ................................................................ redis
Database ........................................................... mariadb
Queue ................................................................ redis
Session .............................................................. redis
全文(含 Laravel 13.38.0 / PHP 8.5.12 / Filament v5.10.2 / Livewire v4.4.7 / Spatie Permissions 8.3.2 等)见配置详解篇 3.1 节。php artisan --version 实测回显:
Laravel Framework 13.38.0
2.2 命令族一览
按官方 Artisan 文档页与实测 --help 归纳(p:* 为 Pelican 自定义命令,共 8 个族):
| 族 | 命令 | 用途 |
|---|---|---|
| 环境配置 | p:environment:setup | 初始化 .env 与基础目录(实测见 4.1) |
| 环境配置 | p:environment:cache / :database / :mail / :queue / :queue-service / :session | 分项写配置(实测见 4.1/4.2) |
| Redis | p:redis:setup | 一条命令把 cache/queue/session 三驱动指到 Redis |
| 用户 | p:user:make / :delete / :disable2fa | 建号/删号/关两步验证 |
| 节点 | p:node:make / :list / :configuration | 登记 Wings 节点/列表/导出节点配置 |
| 服务器 | p:server:bulk-power | 批量电源操作(start/stop/restart/kill) |
| 计划任务 | p:schedule:process | 处理数据库内计划任务 |
| Egg 模板 | p:egg:check-updates / :update-index / :normalize | 模板索引检查/更新/格式归一 |
| 插件 | p:plugin:list / :make / :install / :update / :disable / :uninstall / :composer | 插件全生命周期 |
| 维护 | p:maintenance:clean-service-backups / :prune-backups / :prune-images / :fix-database-grants | 孤儿备份/卡死备份/节点残留清理/库权限修复 |
| Laravel 标准 | migrate / migrate:status / cache:clear / tinker / config:cache(禁用) | 迁移与缓存基础操作 |
三、前置条件
# artisan 可用(实测)
$ php artisan --version
Laravel Framework 13.38.0
# 数据库就绪:迁移全部执行(实测 255 条 Ran,节选)
$ php artisan migrate:status | tail -4
2026_10_02_000000_remove_illegal_subusers_again .................... [1] Ran
2026_10_03_000000_add_timezone_to_schedules ........................ [1] Ran
2026_10_10_000000_repair_released_primary_allocations .............. [1] Ran
$ php artisan migrate:status | grep -c "Ran"
255
# 管理员已建(实测)
$ php artisan p:user:make --email=admin@example.com --username=root --password=q1w2e3r4 --admin=1
⚠️ 注意:
APP_ENV=production下所有写库命令(migrate 等)须带--force,否则实测回显WARN Command cancelled.。
四、各工具详解
4.1 环境配置命令族 p:environment:*
p:environment:setup——初始化 .env、storage 链接与图标缓存。实测:
$ php artisan p:environment:setup --url=http://192.168.1.172:8132
Writing APP_URL
Creating storage link
ERROR The [public/storage] link already exists.
Caching components & icons DONE
link already exists 为幂等噪音(官方分发已预建符号链接),不影响流程。
分项配置命令(--help 实测,参数表如下;通用项 -h/--silent/-q/-V/--ansi/--no-ansi/-n/--env/-v 略):
| 命令 | 专属参数(help 原文描述) |
|---|---|
p:environment:cache | --driver(缓存驱动)、--redis-host/--redis-user/--redis-pass/--redis-port |
p:environment:database | --driver、--database、--schema(PG 专用)、--host、--port、--username、--password |
p:environment:mail | --driver、--email(发件地址)、--from(发件人名)、--encryption、--host、--port、--endpoint、--username、--password |
p:environment:queue | --driver、--redis-host/--redis-user/--redis-pass/--redis-port |
p:environment:session | --driver、--redis-host/--redis-user/--redis-pass/--redis-port |
p:environment:queue-service | --service-name(队列 worker 服务名)、--user(PHP 运行用户)、--group、--overwrite(已存在则强制覆盖) |
p:environment:queue-service 的 Description 实测为 Create the service for the queue worker.——面向裸机 systemd 部署生成服务单元;官方分发内置 supervisord 常驻队列 worker(实测进程组含 queue-worker),该场景无需此命令。
4.2 p:redis:setup
Description 实测:Configure the Panel to use Redis as cache, queue and session driver.。参数:--redis-host、--redis-user、--redis-pass、--redis-port。一条命令等价于分别跑 p:environment:cache/queue/session --driver=redis。
4.3 用户管理 p:user:*
p:user:make——实测创建管理员:
$ php artisan p:user:make --email=admin@example.com --username=root --password=q1w2e3r4 --admin=1
UUID: a0f24380-3d33-47d3-82a2-44e264a30dd3
+----------+-------+
| Username | Admin |
+----------+-------+
| root | Yes |
+----------+-------+
官方文档参数:--email、--username、--name(缺省取 username)、--first-name、--last-name、--password(缺省随机生成并打印)、--admin(1/0)。
p:user:delete——实测 help:
Description:
Deletes a user from the Panel if no servers are attached to their account.
Usage:
p:user:delete [options]
Options:
--user[=USER]
仅 --user 一个业务参数(官方文档页写的 --id/--email 在实测 help 中不存在,以 help 为准);账号名下还挂着服务器时不会删除。
p:user:disable2fa——实测 help:
Description:
Disable two-factor authentication for a specific user in the Panel.
Usage:
p:user:disable2fa [options]
Options:
--email[=EMAIL] The email of the user to disable 2-Factor for.
玩家丢失两步验证设备时的救援命令(按 --email 定位,与官方文档的 --user 表述不一致,以实测 help 为准)。
4.4 节点管理 p:node:*
p:node:make——CLI 登记一个 Wings 节点,实测 help 全参数(21 个业务参数):
Description:
Creates a new node on the system via the CLI.
Usage:
p:node:make [options]
Options:
--name[=NAME] A name to identify the node.
--description[=DESCRIPTION] A description to identify the node.
--locationId[=LOCATIONID] A valid locationId.
--fqdn[=FQDN] The domain name (e.g node.example.com) to be used for connecting to the daemon. An IP address may only be used if you are not using SSL for this node.
--public[=PUBLIC] Should the node be public or private? (public=1 / private=0).
--scheme[=SCHEME] Which scheme should be used? (Enable SSL=https / Disable SSL=http).
--proxy[=PROXY] Is the daemon behind a proxy? (Yes=1 / No=0).
--maintenance[=MAINTENANCE] Should maintenance mode be enabled? (Enable Maintenance mode=1 / Disable Maintenance mode=0).
--maxMemory[=MAXMEMORY] Set the max memory amount.
--overallocateMemory[=OVERALLOCATEMEMORY] Enter the amount of ram to overallocate (% or -1 to overallocate the maximum).
--maxDisk[=MAXDISK] Set the max disk amount.
--overallocateDisk[=OVERALLOCATEDISK] Enter the amount of disk to overallocate (% or -1 to overallocate the maximum).
--maxCpu[=MAXCPU] Set the max cpu amount.
--overallocateCpu[=OVERALLOCATECPU] Enter the amount of cpu to overallocate (% or -1 to overallocate the maximum).
--uploadSize[=UPLOADSIZE] Enter the maximum upload filesize.
--daemonListeningPort[=DAEMONLISTENINGPORT] Enter the daemon listening port.
--daemonConnectingPort[=DAEMONCONNECTINGPORT] Enter the daemon connecting port.
--daemonSFTPPort[=DAEMONSFTPPORT] Enter the daemon SFTP listening port.
--daemonSFTPAlias[=DAEMONSFTPALIAS] Enter the daemon SFTP alias.
--daemonBase[=DAEMONBASE] Enter the base folder.
p:node:list——实测(尚未登记任何节点,空表):
$ php artisan p:node:list
+----+------+------+------+
| ID | UUID | Name | Host |
+----+------+------+------+
p:node:configuration——实测 help:
Description:
Generate a Wings configuration file for a specific node.
Usage:
p:node:configuration [options]
Options:
--node[=NODE] The ID of the node to generate the configuration for.
--format[=FORMAT] The format of the configuration file (yaml or json) (default: "yaml")
面板侧直接导出节点侧 Wings 配置文件(yaml/json),省去手抄 token——节点接入的标准动线:p:node:make 登记 → p:node:configuration --node=<ID> --format=yaml 导出 → 交给 Wings。
4.5 服务器与计划任务
p:server:bulk-power——实测 help:
Description:
Perform a bulk power action on multiple servers.
Usage:
p:server:bulk-power <action> [options]
Arguments:
action The power action to perform. (supports: start, stop, restart, kill)
Options:
--server[=SERVER] A server UUID to target. (multiple values allowed)
--servers[=SERVERS] A comma separated list of server UUIDs to target.
--node[=NODE] A node ID to target.
--nodes[=NODES] A comma separated list of node IDs to target.
--server/--servers 按服务器 UUID、--node/--nodes 按节点 ID 圈定范围,action 取 start/stop/restart/kill。
p:schedule:process——实测 help:
Description:
This processes the schedules in the database.
Usage:
p:schedule:process [options]
Options:
--server[=SERVER] Limit the processing to a single server.
面板内置调度器每分钟自动跑(实测调度心跳日志:Running ['artisan' health:queue-check-heartbeat] 等);此命令用于手工触发或排障。
4.6 Egg 模板 p:egg:*
p:egg:check-updates——实测 help:
Description:
Check for egg updates and display available updates.
Usage:
p:egg:check-updates
p:egg:update-index——实测 help:
Description:
Update the service eggs index from the latest Pelican Panel updates.
Usage:
p:egg:update-index [options]
Options:
--force Force update even if index is already current
p:egg:normalize——官方文档语法:php artisan p:egg:normalize <file>,把 egg 文件归一为当前格式(rc.2 changelog 修复项含 yaml egg 导入归一)。
4.7 插件管理 p:plugin:*
p:plugin:list——实测:
$ php artisan p:plugin:list
No plugins installed
官方文档补齐全生命周期语法(本环境未安装插件,仅实测 list):
php artisan p:plugin:make <name> # 生成插件骨架
php artisan p:plugin:install <name> # 安装
php artisan p:plugin:update <name> # 更新
php artisan p:plugin:disable <name> # 禁用
php artisan p:plugin:uninstall <name> # 卸载
php artisan p:plugin:composer <plugin> <command> [--timeout=300] # 对插件目录跑 composer
入口脚本每次启动会自动执行 p:plugin:composer --working-dir=/var/www/html/plugins --no-dev(实测启动日志 Optimizing Filament 前后段落),插件目录持久化方式见部署篇 4.1/五。
4.8 维护清理 p:maintenance:*
实测 help 三条:
| 命令 | Description(help 原文) | 参数(help 原文) |
|---|---|---|
p:maintenance:clean-service-backups | Clean orphaned .bak files created when modifying services. | 无业务参数 |
p:maintenance:prune-backups | Marks all backups older than "n" minutes that have not yet completed as being failed. | --prune-age[=PRUNE-AGE] |
p:maintenance:prune-images | Clean up all dangling docker images from nodes running the Wings service. | --force(help 原文:Force the command to run without confirmation prompts) |
💡 说明:
prune-images清理的是节点侧 Wings 主机上的悬垂游戏运行时副本(help 原文含 "docker images" 字样,属命令自带描述),面板本机不涉及;官方文档称其已纳入每日调度自动执行。prune-backups实测 help 只有--prune-age(分钟阈值),官方文档页的--days/--chunk/--force与实测 help 不一致,以 help 为准。
另有官方文档命令 php artisan p:maintenance:fix-database-grants(重建 MariaDB 用户授权,迁移/改库后修权限用),本环境未触发使用。
4.9 Laravel 标准命令
| 命令 | 实测情况 |
|---|---|
php artisan migrate --seed --force | 安装主线第二步(实测 batch [1] 全部 Ran + Seeding database);APP_INSTALLED=true 后启动自动执行 |
php artisan migrate(不带 --force) | production 下实测回显 WARN Command cancelled. |
php artisan migrate:status | 实测 255 条全部 [1] Ran |
php artisan cache:clear | 实测回显 INFO Application cache cleared successfully. |
php artisan config:cache | 官方禁用,实测回显 WARN Configuration caching has been disabled. + Reason: This application uses dynamic plugins. Caching config prevents /plugins/config/*.php files from being loaded correctly.(背景见配置详解篇 5.6) |
php artisan tinker --execute "..." | 实测验证口令:var_dump(Hash::check('q1w2e3r4', \App\Models\User::where('username','root')->first()->password)); → bool(true) |
五、注意事项
- 不要缓存配置:
config:cache被官方禁用(动态插件约束,实测 WARN),性能诉求走cache:clear与内置视图缓存(入口脚本每次启动自动filament:optimize+view:cache,实测 p:info 显示 Views/Panel Components CACHED)。 - 写库命令带
--force:production 环境 migrate 不带--force会被交互确认取消(实测)。 p:user:make的口令策略:不带--password时随机生成并打印(官方文档),演示环境固定q1w2e3r4便于复现。p:node:*只登记控制面记录:节点侧还需单独部署 Wings 并回连面板(p:node:configuration导出配置),本专栏范围仅面板本体。- help 与官方文档页不一致时以
--help实测为准(本文 4.3/4.8 已标注三处差异)。
六、常见问题
6.1 p:node:list 输出空表
正常——尚未登记节点。登记走 p:node:make(参数见 4.4),或 Web 后台 Admin→Nodes。
6.2 p:plugin:list 回显 No plugins installed
插件体系 rc.1 才重构为 webhook 承载 + 插件目录加载(changelog 实查),生态起步期,空列表是当前常态。
6.3 想清缓存但 config:cache 报 WARN
不是故障,官方禁用(见五.1)。应用层缓存用 php artisan cache:clear(实测成功回显见 4.9)。
6.4 p:environment:setup 报 The [public/storage] link already exists
官方分发已预建该符号链接,setup 重复创建失败属幂等噪音(实测后续步骤全部正常),无需处理。
6.5 忘记管理员口令,p:user:* 里没有改密命令
实测命令族只有 make/delete/disable2fa。救援路线:p:user:make 再建一个管理员,或 php artisan tinker --execute 用 Hash::make('<新口令>') 回填 users.password(tinker 可用性实测见 4.9)。
6.6 批量电源操作报参数错误
p:server:bulk-power 的 action 是位置参数(<action>),不在 options 里;目标用 --servers=<uuid,uuid> 或 --nodes=<id,id> 批量给(实测 help 结构,见 4.5)。
七、参考链接
- 官方仓库:https://github.com/pelican/panel
- 官方 Artisan Commands 文档页(Updated 01/11/2026)
- 节点守护进程 Wings:https://github.com/pelican/wings
- 官网:https://pelican.dev
- 站内相关:《Pelican Panel 介绍与选型指南》、《Pelican Panel Docker Compose 部署指南》、《Pelican Panel v1.0.0-rc.2 配置参数详解》、《Crafty Controller 4.11.0 常用 CLI 命令与工具详解》(同类面板 CLI 篇对照)
(全部命令与回显实测日期 2026-11-02/03。)