openclaw 安装

TwoAdmin 2025-10-18 5 10/18

安装

git clone https://github.com/openclaw/openclaw.git

npm install -g openclaw@latest
# or: pnpm add -g openclaw@latest

#安装向导 选择yes配置模型
openclaw onboard --install-daemon

#安装网关
openclaw gateway install

#直接前台运行
openclaw gateway start

#停止w网关
openclaw gateway stop

新开一个终端窗口,运行:

openclaw

 

附命令交互

openclaw onboard --install-daemon

🦞 OpenClaw 2026.4.26 (be8c246)
   Type the command with confidence—nature will provide the stack trace if needed.

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██
██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██
██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                  🦞 OPENCLAW 🦞                    
 
┌  OpenClaw setup
│
◇  Security disclaimer ───────────────────────────────────────────────────╮
│                                                                         │
│  OpenClaw is a hobby project and still in beta. Expect sharp edges.     │
│  By default, OpenClaw is a personal agent: one trusted operator         │
│  boundary.                                                              │
│  This bot can read files and run actions if tools are enabled.          │
│  A bad prompt can trick it into doing unsafe things.                    │
│                                                                         │
│  OpenClaw is not a hostile multi-tenant boundary by default.            │
│  If multiple users can message one tool-enabled agent, they share that  │
│  delegated tool authority.                                              │
│                                                                         │
│  If you’re not comfortable with security hardening and access control,  │
│  don’t run OpenClaw.                                                    │
│  Ask someone experienced to help before enabling tools or exposing it   │
│  to the internet.                                                       │
│                                                                         │
│  Recommended baseline                                                   │
│  - Pairing/allowlists + mention gating.                                 │
│  - Multi-user/shared inbox: split trust boundaries (separate            │
│    gateway/credentials, ideally separate OS users/hosts).               │
│  - Sandbox + least-privilege tools.                                     │
│  - Shared inboxes: isolate DM sessions (session.dmScope:                │
│    per-channel-peer) and keep tool access minimal.                      │
│  - Keep secrets out of the agent’s reachable filesystem.                │
│  - Use the strongest available model for any bot with tools or          │
│    untrusted inboxes.                                                   │
│                                                                         │
│  Run regularly                                                          │
│  openclaw security audit --deep                                         │
│  openclaw security audit --fix                                          │
│                                                                         │
│  Learn more                                                             │
│  - https://docs.openclaw.ai/gateway/security                            │
│                                                                         │
├─────────────────────────────────────────────────────────────────────────╯
│
◇  I understand this is personal-by-default and shared/multi-user use 
│  requires lock-down. Continue?
│  Yes
│
◇  Setup mode
│  QuickStart
│
◇  Existing config detected ─────────╮
│                                    │
│  workspace: ~/.openclaw/workspace  │
│  gateway.mode: local               │
│                                    │
├────────────────────────────────────╯
│
◇  Config handling
│  Use existing values
│
◇  QuickStart ─────────────────────────────╮
│                                          │
│  Keeping your current gateway settings:  │
│  Gateway port: 18789                     │
│  Gateway bind: Loopback (127.0.0.1)      │
│  Gateway auth: Token (default)           │
│  Tailscale exposure: Off                 │
│  Direct to chat channels.                │
│                                          │
├──────────────────────────────────────────╯
│
◇  Model/auth provider
│  Qwen Cloud
│
◇  Qwen Cloud auth method
│  Coding Plan API Key for China (subscription)
│
◇  Qwen Cloud Coding Plan (China) ─────────────────────────────╮
│                                                              │
│  Manage API keys: https://home.qwencloud.com/api-keys        │
│  Docs: https://docs.qwencloud.com/                           │
│  Endpoint: coding.dashscope.aliyuncs.com                     │
│  Models: qwen3.5-plus, glm-5, kimi-k2.5, MiniMax-M2.5, etc.  │
│                                                              │
├──────────────────────────────────────────────────────────────╯
│
◇  Enter Qwen Cloud Coding Plan API key (China)
│  sk-你的sk
│
◇  Model configured ───────────────────────╮
│                                          │
│  Default model set to qwen/qwen3.5-plus  │
│                                          │
├──────────────────────────────────────────╯
│
◇  Default model
│  Keep current (qwen/qwen3.5-plus)
│
◇  How channels work ───────────────────────────────────────────────────────╮
│                                                                           │
│  DM security: default is pairing; unknown DMs get a pairing code.         │
│  Approve with: openclaw pairing approve <channel> <code>                  │
│  Public DMs require dmPolicy="open" + allowFrom=["*"].                    │
│  Multi-user DMs: run: openclaw config set session.dmScope                 │
│  "per-channel-peer" (or "per-account-channel-peer" for multi-account      │
│  channels) to isolate sessions.                                           │
│  Docs: channels/pairing  │
│                                                                           │
│  Feishu: 飞书/Lark enterprise messaging with doc/wiki/drive tools.        │
│  Google Chat: Google Workspace Chat app with HTTP webhook.                │
│  Nostr: Decentralized protocol; encrypted DMs via NIP-04.                 │
│  Microsoft Teams: Teams SDK; enterprise support.                          │
│  Mattermost: self-hosted Slack-style chat; install the plugin to          │
│  enable.                                                                  │
│  Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots.        │
│  Matrix: open protocol; install the plugin to enable.                     │
│  BlueBubbles: iMessage via the BlueBubbles mac app + REST API.            │
│  LINE: LINE Messaging API webhook bot.                                    │
│  Zalo: Vietnam-focused messaging platform with Bot API.                   │
│  Zalo Personal: Zalo personal account via QR code login.                  │
│  Synology Chat: Connect your Synology NAS Chat to OpenClaw with full      │
│  agent capabilities.                                                      │
│  Tlon: decentralized messaging on Urbit; install the plugin to enable.    │
│  Discord: very well supported right now.                                  │
│  iMessage: this is still a work in progress.                              │
│  IRC: classic IRC networks with DM/channel routing and pairing            │
│  controls.                                                                │
│  QQ Bot: connect to QQ via official QQ Bot API with group chat and        │
│  direct message support.                                                  │
│  Signal: signal-cli linked device; more setup (David Reagans: "Hop on     │
│  Discord.").                                                              │
│  Slack: supported (Socket Mode).                                          │
│  Telegram: simplest way to get started — register a bot with @BotFather   │
│  and get going.                                                           │
│  Twitch: Twitch chat integration                                          │
│  WhatsApp: works with your own number; recommend a separate phone +       │
│  eSIM.                                                                    │
│  WeCom: Enterprise messaging and documents, scheduling, task tools.       │
│  Yuanbao: Tencent Yuanbao AI assistant conversation channel.              │
│                                                                           │
├───────────────────────────────────────────────────────────────────────────╯
│
◇  Select channel (QuickStart)
│  Skip for now
Config overwrite: /Users/user/.openclaw/openclaw.json (sha256 80037cd915b769f7bffc03a75f769651e9bbf556a874d6818e8a2137c044089c -> 9da5383499478d130170004500d5d2d4b39098ccbc8cfd031c27a02675247b29, backup=/Users/user/.openclaw/openclaw.json.bak)
Updated ~/.openclaw/openclaw.json
Workspace OK: ~/.openclaw/workspace
Sessions OK: ~/.openclaw/agents/main/sessions
│
◇  Web search ───────────────────────────────────────────────────────╮
│                                                                    │
│  Web search lets your agent look things up online.                 │
│  Choose a provider. Some providers need an API key, and some work  │
│  key-free.                                                         │
│  Docs: https://docs.openclaw.ai/tools/web                          │
│                                                                    │
├────────────────────────────────────────────────────────────────────╯
│
◇  Search provider
│  Skip for now
│
◇  Skills status ─────────────╮
│                             │
│  Eligible: 8                │
│  Missing requirements: 48   │
│  Unsupported on this OS: 0  │
│  Blocked by allowlist: 0    │
│                             │
├─────────────────────────────╯
│
◇  Configure skills now? (recommended)
│  No
│
◇  Hooks ──────────────────────────────────────────────────────────────────╮
│                                                                          │
│  Hooks let you automate actions when agent commands are issued.          │
│  Example: Save session context to memory when you issue /new or /reset.  │
│                                                                          │
│  Learn more: https://docs.openclaw.ai/automation/hooks                   │
│                                                                          │
├──────────────────────────────────────────────────────────────────────────╯
│
◇  Enable hooks?
│  Skip for now
Config overwrite: /Users/user/.openclaw/openclaw.json (sha256 9da5383499478d130170004500d5d2d4b39098ccbc8cfd031c27a02675247b29 -> 4e778629a416a9844be8edbab7de8e054ad8ce85ee03448a5682978ebc5c24e4, backup=/Users/user/.openclaw/openclaw.json.bak)
│
◇  Gateway service runtime ────────────────────────────────────────────╮
│                                                                      │
│  QuickStart uses Node for the Gateway service (stable + supported).  │
│                                                                      │
├──────────────────────────────────────────────────────────────────────╯
│
◓  Installing Gateway service…
Installed LaunchAgent: /Users/user/Library/LaunchAgents/ai.openclaw.gateway.plist
Logs: /Users/user/.openclaw/logs/gateway.log
◇  Gateway service installed.
│
◇  
Agents: main (default)
Heartbeat interval: 30m (main)
Session store (main): /Users/user/.openclaw/agents/main/sessions/sessions.json (1 entries)
- agent:main:main (36m ago)
│
◇  Optional apps ────────────────────────╮
│                                        │
│  Add nodes for extra features:         │
│  - macOS app (system + notifications)  │
│  - iOS app (camera/canvas)             │
│  - Android app (camera/canvas)         │
│                                        │
├────────────────────────────────────────╯
│
◇  Control UI ─────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Web UI: http://127.0.0.1:18789/                                             │
│  Web UI (with token):                                                        │
│  http://127.0.0.1:18789/#token=c4a5ef39de23f64e519c461f4fe8463efc0d8a412797  │
│  8acf                                                                        │
│  Gateway WS: ws://127.0.0.1:18789                                            │
│  Gateway: reachable                                                          │
│  Docs: https://docs.openclaw.ai/web/control-ui                               │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────╯
│
◇  Start TUI (best option!) ─────────────────────────────────╮
│                                                            │
│  This is the defining action that makes your agent you.    │
│  Please take your time.                                    │
│  The more you tell it, the better the experience will be.  │
│  We will send: "Wake up, my friend!"                       │
│                                                            │
├────────────────────────────────────────────────────────────╯
│
◇  Token ─────────────────────────────────────────────────────────────────╮
│                                                                         │
│  Gateway token: shared auth for the Gateway + Control UI.               │
│  Stored in: $OPENCLAW_CONFIG_PATH (default: ~/.openclaw/openclaw.json)  │
│  under gateway.auth.token, or in OPENCLAW_GATEWAY_TOKEN.                │
│  View token: openclaw config get gateway.auth.token                     │
│  Generate token: openclaw doctor --generate-gateway-token               │
│  Web UI keeps dashboard URL tokens in memory for the current tab and    │
│  strips them from the URL after load.                                   │
│  Open the dashboard anytime: openclaw dashboard --no-open               │
│  If prompted: paste the token into Control UI settings (or use the      │
│  tokenized dashboard URL).                                              │
│                                                                         │
├─────────────────────────────────────────────────────────────────────────╯
│
◇  How do you want to hatch your bot?
│  Open the Web UI
│
◇  Dashboard ready ────────────────────────────────────────────────────────────╮
│                                                                              │
│  Dashboard link (with token):                                                │
│  http://127.0.0.1:18789/#token=c4a5ef39de23f64e519c461f4fe8463efc0d8a412797  │
│  8acf                                                                        │
│  Opened in your browser. Keep that tab to control OpenClaw.                  │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────╯
│
◇  Workspace backup ────────────────────────────────────────╮
│                                                           │
│  Back up your agent workspace.                            │
│  Docs: https://docs.openclaw.ai/concepts/agent-workspace  │
│                                                           │
├───────────────────────────────────────────────────────────╯
│
◇  Security ──────────────────────────────────────────────────────╮
│                                                                 │
│  Running agents on your computer is risky — harden your setup:  │
│  https://docs.openclaw.ai/security                              │
│                                                                 │
├─────────────────────────────────────────────────────────────────╯
│
◇  Shell completion ──────────────────────────────────────────────╮
│                                                                 │
│  Failed to generate completion cache. Run `openclaw completion  │
│  --install` later.                                              │
│                                                                 │
├─────────────────────────────────────────────────────────────────╯
│
◇  Web search ───────────────────────────────────────╮
│                                                    │
│  Web search was skipped. You can enable it later:  │
│    openclaw configure --section web                │
│                                                    │
│  Docs: https://docs.openclaw.ai/tools/web          │
│                                                    │
├────────────────────────────────────────────────────╯
│
◇  What now ─────────────────────────────────────────────────────────────╮
│                                                                        │
│  What now: https://openclaw.ai/showcase ("What People Are Building").  │
│                                                                        │
├────────────────────────────────────────────────────────────────────────╯
│
└  Onboarding complete. Dashboard opened; keep that tab to control OpenClaw.


 

- THE END -
Tag:

TwoAdmin

4月29日16:41

最后修改:2026年4月29日
0

非特殊说明,本博所有文章均为博主原创。