mirror of
https://github.com/acepanel/acepanel.github.io.git
synced 2026-02-04 14:07:16 +08:00
feat: 更新文档
This commit is contained in:
@@ -1,46 +1,57 @@
|
||||
AcePanel 提供了命令行工具,方便用户在无法访问 Web 界面时进行基本的面板管理操作。
|
||||
# 命令行工具
|
||||
|
||||
## Managing Panel Service
|
||||
AcePanel 提供命令行工具 `acepanel`,用于在无法访问 Web 界面时进行面板管理。
|
||||
|
||||
Do not stop or restart AcePanel while background tasks are still running, as this may cause task stuck or data loss.
|
||||
## 服务管理
|
||||
|
||||
* Start Panel: `acepanel start`
|
||||
* Stop Panel: `acepanel stop`
|
||||
* Restart Panel: `acepanel restart`
|
||||
::: warning 注意
|
||||
后台任务运行时请勿停止或重启面板,可能导致任务中断或数据丢失。
|
||||
:::
|
||||
|
||||
## Panel Command Line
|
||||
|
||||
下表列出了常用的 AcePanel 命令行工具命令:
|
||||
|
||||
| Command | Description |
|
||||
|--------------------------------------------------------|------------------------------------------------------------------------------|
|
||||
| `acepanel status` | Get the current status of the AcePanel service |
|
||||
| `acepanel start` | Start the AcePanel service |
|
||||
| `acepanel stop` | Stop the AcePanel service |
|
||||
| `acepanel restart` | Restart the AcePanel service |
|
||||
| `acepanel update` | Update AcePanel to the latest version |
|
||||
| `acepanel sync` | Sync AcePanel cached data with cloud |
|
||||
| `acepanel fix` | Fix AcePanel upgrade issues |
|
||||
| `acepanel info` | Output AcePanel basic information and generate new password |
|
||||
| `acepanel user list` | List all users |
|
||||
| `acepanel user username <old_username> <new_username>` | Change a user's username |
|
||||
| `acepanel user password <username> <new_password>` | Change a user's password |
|
||||
| `acepanel user 2fa <username>` | Toggle two-factor authentication for a user |
|
||||
| `acepanel https <on/off>` | Enable or disable HTTPS for AcePanel |
|
||||
| `acepanel https generate` | Obtain a free certificate or generate a self-signed certificate for AcePanel |
|
||||
| `acepanel entrance <on/off>` | Enable or disable the AcePanel access entrance |
|
||||
| `acepanel bind-domain off` | Disable domain binding for AcePanel |
|
||||
| `acepanel bind-ip off` | Disable IP binding for AcePanel |
|
||||
| `acepanel bind-ua off` | Disable User-Agent binding for AcePanel |
|
||||
| `acepanel port <new_port>` | Change the AcePanel listening port |
|
||||
| `acepanel sync-time ` | Sync server time with NTP |
|
||||
| `acepanel clear-task` | Clear all tasks in the task queue if they are stuck |
|
||||
| `acepanel help` | Display help information for AcePanel commands |
|
||||
|
||||
For example, to change a user's password, you can use:
|
||||
|
||||
```bash
|
||||
acepanel user password haozi 123456
|
||||
```shell
|
||||
acepanel start # 启动
|
||||
acepanel stop # 停止
|
||||
acepanel restart # 重启
|
||||
acepanel status # 查看状态
|
||||
```
|
||||
|
||||
This will change the password for the user `haozi` to `123456`.
|
||||
## 用户管理
|
||||
|
||||
```shell
|
||||
acepanel user list # 列出所有用户
|
||||
acepanel user username <旧用户名> <新用户名> # 修改用户名
|
||||
acepanel user password <用户名> <新密码> # 修改密码
|
||||
acepanel user 2fa <用户名> # 开关两步验证
|
||||
```
|
||||
|
||||
## 安全设置
|
||||
|
||||
```shell
|
||||
acepanel https on|off # 开关 HTTPS
|
||||
acepanel https generate # 生成证书(自签名或 Let's Encrypt)
|
||||
acepanel entrance on|off # 开关安全入口
|
||||
acepanel port <端口号> # 修改监听端口
|
||||
acepanel bind-domain off # 解除域名绑定
|
||||
acepanel bind-ip off # 解除 IP 绑定
|
||||
acepanel bind-ua off # 解除 UA 绑定
|
||||
```
|
||||
|
||||
## 维护命令
|
||||
|
||||
```shell
|
||||
acepanel update # 更新面板
|
||||
acepanel fix # 修复更新问题
|
||||
acepanel sync # 同步缓存数据
|
||||
acepanel sync-time # 同步服务器时间
|
||||
acepanel clear-task # 清空任务队列
|
||||
acepanel info # 查看面板信息并重置密码
|
||||
acepanel help # 帮助
|
||||
```
|
||||
|
||||
## 示例
|
||||
|
||||
修改用户 `admin` 的密码为 `newpassword`:
|
||||
|
||||
```shell
|
||||
acepanel user password admin newpassword
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user