> ## Documentation Index
> Fetch the complete documentation index at: https://labs.prompthon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw 命令参考

> Gateway、dashboard、health、config、update 和排错命令速查。

<div className="not-prose my-4 rounded-md border border-gray-200 bg-gray-50 p-2 text-sm dark:border-gray-800 dark:bg-gray-900/40">
  <div className="mb-2 px-1 text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">需要帮助？</div>

  <div className="flex flex-wrap gap-2">
    <a className="inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 no-underline shadow-sm hover:border-gray-300 hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950/60 dark:text-gray-200 dark:hover:bg-gray-900" href="https://discord.gg/sDE2HhGTg4" target="_blank" rel="noreferrer">
      <Icon icon="discord" iconType="brands" size={14} />

      <span>在 Discord 提问</span>
    </a>

    <a className="inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 no-underline shadow-sm hover:border-gray-300 hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950/60 dark:text-gray-200 dark:hover:bg-gray-900" href="https://github.com/Prompthon-IO/agent-systems-handbook/issues/new/choose" target="_blank" rel="noreferrer">
      <Icon icon="github" iconType="brands" size={14} />

      <span>提交 GitHub Issue</span>
    </a>

    <a className="inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 no-underline shadow-sm hover:border-gray-300 hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950/60 dark:text-gray-200 dark:hover:bg-gray-900" href="https://github.com/Prompthon-IO/agent-systems-handbook/blob/main/zh-Hans/SUPPORT.md" target="_blank" rel="noreferrer">
      <Icon icon="life-ring" size={14} />

      <span>支持指南</span>
    </a>
  </div>
</div>

<Note>
  将 `<GATEWAY_HOST>`、`<DASHBOARD_URL>` 这类 placeholder 替换成你的实际值。
</Note>

## 启动和停止 Gateway

```bash theme={null}
# 启动。推荐在 tmux session 中运行。
openclaw gateway start

# 使用 config 文件启动。
openclaw gateway start --config ./config/gateway.yaml

# 停止。
openclaw gateway stop

# 重启。
openclaw gateway restart

# 检查状态。
openclaw gateway status

# 跟随日志，如果支持。
openclaw gateway logs --follow
```

## Dashboard

```bash theme={null}
# 启动 dashboard。
openclaw dashboard

# 停止 dashboard。
openclaw dashboard stop

# 在浏览器中打开 dashboard，如果支持。
openclaw dashboard open

# 输出 dashboard URL 或状态。
openclaw dashboard status
```

## Health Checks

```bash theme={null}
# Ping gateway。
openclaw gateway ping

# 检查系统健康状态。
openclaw health
```

## Configuration

```bash theme={null}
# 显示当前 config。
openclaw config show

# 验证 config 文件。
openclaw config validate --config ./config/gateway.yaml
```

## Updates And Version

```bash theme={null}
# 检查版本。
openclaw --version

# 自更新，如果支持。
openclaw update
```

## Troubleshooting

```bash theme={null}
# 显示环境诊断。
openclaw doctor

# 提高日志级别。
openclaw gateway start --log-level debug

# 显示运行中的进程，如果支持。
openclaw ps

# 跟随日志。
openclaw logs --follow
```

## Model Configuration

```bash theme={null}
# 切换到 Codex-backed model profile。
openclaw models set openai-codex/gpt-5.3-codex

# 在 config 中设置 primary default model。
openclaw config set agents.defaults.model.primary openai/gpt-5.5
```
