Loading...
Loading...
A guided, zero-friction installer and maintenance assistant for OpenClaw. Use this skill when the user wants to install OpenClaw, set up OpenClaw on a local machine or remote server, connect OpenClaw to DingTalk, get OpenClaw skill recommendations for their use case, or perform post-installation maintenance (health checks, troubleshooting, installing new skills, changing AI models, adding chat channels, updating OpenClaw). Handles full environment detection, installation, optional DingTalk integration, scene-based skill recommendations, and daily maintenance — all interactively, with no wasted steps.
npx skill4agent add leroy-zhang/openclaw-setup-assistant openclaw-setup-assistantopenclaw doctor --fix123456"Where would you like to install OpenClaw?"
- On this computer (local)
- On a remote server (cloud / VPS)
uname -s 2>/dev/null || echo "windows"DarwinLinuxcat /etc/os-release | grep ID="Do you have an AI model API Key ready?"
- Yes — I have one
- No — I need help getting one
- Anthropic (Claude)
- OpenAI (GPT)
- DeepSeek ← recommended for China users, most stable access
- Alibaba Bailian — Standard version (DashScope)
- Alibaba Bailian — Coding Plan ← free quota, best for getting started
- Other
- Standard version (DashScope)
- Coding Plan (free quota, apply at https://www.aliyun.com/benefit/scene/codingplan)
"No problem! Two easy options:
- DeepSeek — sign up at platform.deepseek.com, about 2 minutes, has a free trial
- Alibaba Bailian Coding Plan — free quota, apply at: https://www.aliyun.com/benefit/scene/codingplan Which would you like? I'll wait while you sign up."
sk-sp-xxxxx"Would you like to connect OpenClaw to a chat app so you can talk to it from your phone or desktop? Pick one (you can add more later):"
- DingTalk (钉钉) ← recommended, best supported
- Feishu (飞书)
- Discord
- No, skip for now — I'll use the web console
"Great choice — DingTalk has the smoothest setup. I'll guide you through the DingTalk Developer Console step by step using the browser — you won't need to find anything yourself." (Credentials collected during Phase 4)
"I'll walk you through the Feishu Open Platform step by step." (Credentials collected during Phase 4B)
"I'll guide you through the QQ Open Platform setup." (Credentials collected during Phase 4C)
"I'll walk you through the Discord Developer Portal." (Credentials collected during Phase 4D)
"What do you mainly want to use OpenClaw for? Pick one or more:"
- Daily Productivity Assistant — docs, scheduling, notes
- Information Tracker — news, research, web monitoring
- Efficiency Tools — task automation, reminders, workflows
- Stock Market Analysis — A-shares, US stocks, market news
┌─────────────────────────────────────────────────────┐
│ You (or your team) │
│ Chat via: DingTalk / Feishu / QQ / Discord / Web │
└──────────────────────┬──────────────────────────────┘
│ messages
▼
┌─────────────────────────────────────────────────────┐
│ OpenClaw Gateway (runs on your computer) │
│ ┌────────────┐ ┌────────────┐ ┌──────────────┐ │
│ │ Skills │ │ Plugins │ │ IM Channels │ │
│ │ (what it │ │ (DingTalk │ │ (connects │ │
│ │ can do) │ │ Feishu…) │ │ to you) │ │
│ └────────────┘ └────────────┘ └──────────────┘ │
└──────────────────────┬──────────────────────────────┘
│ sends your request
▼
┌─────────────────────────────────────────────────────┐
│ AI Model API (DeepSeek / Claude / Bailian / GPT) │
│ (the brain that thinks and responds) │
└─────────────────────────────────────────────────────┘━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OpenClaw Setup — Confirm Your Plan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Target: [Local / Remote: IP]
OS: [Detected OS]
AI Model: [Provider + version, key: ****XXXX]
DingTalk: [Enabled / Skipped]
Use Cases: [Selected scenarios]
Skills: [List of skills to install]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Ready? This will take about 3-5 minutes.
[ Yes, let's go ] [ Edit my choices ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━CRITICAL: Follow ONLY the section matching the OS from Phase 0.2. Do not mix commands across OS sections under any circumstance.
node -v 2>/dev/null# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Load nvm in current session
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Install Node 22 and set as default
nvm install 22
nvm use 22
nvm alias default 22
# Persist to shell profile
SHELL_RC="$HOME/.zshrc"
[ -f "$HOME/.bashrc" ] && SHELL_RC="$HOME/.bashrc"
grep -q 'NVM_DIR' "$SHELL_RC" || cat >> "$SHELL_RC" << 'EOF'
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
EOFnode -vnpm config set registry https://registry.npmmirror.commkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
SHELL_RC="$HOME/.zshrc"
[ -f "$HOME/.bashrc" ] && SHELL_RC="$HOME/.bashrc"
grep -q 'npm-global' "$SHELL_RC" || echo 'export PATH=~/.npm-global/bin:$PATH' >> "$SHELL_RC"
source "$SHELL_RC"All commands in this section are PowerShell only. Do not use bash, sh, or Unix-style commands here.
"Windows blocks scripts by default for security. I need to allow scripts for your user account only — this won't affect other users or system security."
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -ForceGet-ExecutionPolicy -Scope CurrentUser
# Expected: RemoteSignednode -v 2>$nullwinget install Schniz.fnm --silent --accept-package-agreements --accept-source-agreements
# Reload PATH immediately
$env:PATH = [System.Environment]::GetEnvironmentVariable("PATH","Machine") + ";" +
[System.Environment]::GetEnvironmentVariable("PATH","User")Invoke-WebRequest `
-Uri "https://github.com/Schniz/fnm/releases/latest/download/fnm-windows.zip" `
-OutFile "$env:TEMP\fnm.zip"
Expand-Archive "$env:TEMP\fnm.zip" -DestinationPath "$env:USERPROFILE\.fnm\bin" -Force
$env:PATH = "$env:USERPROFILE\.fnm\bin;" + $env:PATHfnm install 22
fnm use 22
fnm default 22
# Persist to PowerShell profile
if (!(Test-Path $PROFILE)) {
New-Item -ItemType File -Path $PROFILE -Force | Out-Null
}
if (!(Select-String -Path $PROFILE -Pattern 'fnm env' -Quiet -ErrorAction SilentlyContinue)) {
Add-Content $PROFILE 'fnm env --use-on-cd | Out-String | Invoke-Expression'
}
if (!(Select-String -Path $PROFILE -Pattern '\.fnm\\bin' -Quiet -ErrorAction SilentlyContinue)) {
Add-Content $PROFILE '$env:PATH = "$env:USERPROFILE\.fnm\bin;" + $env:PATH'
}node -v # Expected: v22.x.x or highernpm config set registry https://registry.npmmirror.comNote: npm global permission issues do not apply on Windows with fnm. fnm manages Node in the user's home directory — no admin rights needed.
node -v 2>/dev/nullcurl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejsnode -vnpm config set registry https://registry.npmmirror.commkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
grep -q 'npm-global' ~/.bashrc || echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrcnode -v 2>/dev/nullcurl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -
sudo yum install -y nodejsnode -vnpm config set registry https://registry.npmmirror.commkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
grep -q 'npm-global' ~/.bashrc || echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrcNode.js v22.x — Ready
npm mirror configured (npmmirror.com)
Environment readyopenclaw doctor --fixnpm install -g openclaw@latestnpm install -g openclaw@latestopenclaw --versionopenclaw config setmkdir -p ~/.openclaw
[ -f ~/.openclaw/openclaw.json ] || echo '{}' > ~/.openclaw/openclaw.json$dir = "$env:USERPROFILE\.openclaw"
$file = "$dir\openclaw.json"
if (!(Test-Path $dir)) { New-Item -ItemType Directory -Path $dir -Force | Out-Null }
if (!(Test-Path $file)) { '{}' | Set-Content $file }Note: All templates include the requiredsection. Withoutgateway, OpenClaw will refuse to start.gateway.mode
{
"models": {
"providers": {
"deepseek": {
"baseUrl": "https://api.deepseek.com/v1",
"apiKey": "YOUR_API_KEY",
"api": "openai-completions"
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "deepseek/deepseek-chat"
}
}
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "GENERATE_A_RANDOM_TOKEN"
},
"http": {
"endpoints": {
"chatCompletions": {
"enabled": true
}
}
}
},
"plugins": {
"enabled": true,
"allow": []
}
}{
"models": {
"providers": {
"anthropic": {
"apiKey": "YOUR_API_KEY"
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-sonnet-4-5"
}
}
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "GENERATE_A_RANDOM_TOKEN"
},
"http": {
"endpoints": {
"chatCompletions": {
"enabled": true
}
}
}
},
"plugins": {
"enabled": true,
"allow": []
}
}{
"models": {
"providers": {
"openai": {
"apiKey": "YOUR_API_KEY"
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "openai/gpt-4o"
}
}
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "GENERATE_A_RANDOM_TOKEN"
},
"http": {
"endpoints": {
"chatCompletions": {
"enabled": true
}
}
}
},
"plugins": {
"enabled": true,
"allow": []
}
}{
"models": {
"providers": {
"dashscope": {
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"apiKey": "YOUR_API_KEY",
"api": "openai-completions"
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "dashscope/qwen-max"
}
}
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "GENERATE_A_RANDOM_TOKEN"
},
"http": {
"endpoints": {
"chatCompletions": {
"enabled": true
}
}
}
},
"plugins": {
"enabled": true,
"allow": []
}
}bailiandashscope{
"models": {
"mode": "merge",
"providers": {
"bailian": {
"baseUrl": "https://coding.dashscope.aliyuncs.com/v1",
"apiKey": "YOUR_API_KEY",
"api": "openai-completions",
"models": [
{
"id": "qwen3.5-plus",
"name": "qwen3.5-plus",
"reasoning": false,
"input": ["text", "image"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 1000000,
"maxTokens": 65536
},
{
"id": "qwen3-coder-plus",
"name": "qwen3-coder-plus",
"reasoning": false,
"input": ["text"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 262144,
"maxTokens": 65536
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "bailian/qwen3.5-plus"
}
}
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "GENERATE_A_RANDOM_TOKEN"
},
"http": {
"endpoints": {
"chatCompletions": {
"enabled": true
}
}
}
},
"plugins": {
"enabled": true,
"allow": []
}
}gateway.auth.tokengatewayTokenGATEWAY_TOKEN=$(openssl rand -hex 32)
echo "Gateway token: $GATEWAY_TOKEN"$GATEWAY_TOKEN = -join ((1..32) | ForEach-Object { '{0:x2}' -f (Get-Random -Max 256) })
Write-Host "Gateway token: $GATEWAY_TOKEN"GENERATE_A_RANDOM_TOKENcat ~/.openclaw/openclaw.jsonGet-Content "$env:USERPROFILE\.openclaw\openclaw.json"openclaw gateway install
openclaw gateway startopenclaw gateway installopenclaw gateway install
openclaw gateway startgateway install# Runs in a separate window — works fine, won't auto-start after reboot
Start-Process powershell -ArgumentList "-NoExit", "-Command", "openclaw gateway run" -WindowStyle Normalopenclaw doctor
openclaw gateway statuscurl http://127.0.0.1:18789/health
# Expected: {"status":"ok"} or similar(Invoke-WebRequest http://127.0.0.1:18789/health).Content
# Expected: {"status":"ok"} or similargateway statusOpenClaw installed — version [X]
Gateway running on port 18789
Health check passed ✓
AI model connected: [Provider]npx clawhub@latest install <slug>openclaw skills installopenclaw/skillsnpx clawhub@latest installmkdir -p ~/.openclaw/skills/<skill-name>
curl -fsSL https://raw.githubusercontent.com/openclaw/skills/main/<skill-name>/SKILL.md \
-o ~/.openclaw/skills/<skill-name>/SKILL.md$skill = "<skill-name>"
$dir = "$env:USERPROFILE\.openclaw\skills\$skill"
New-Item -ItemType Directory -Path $dir -Force | Out-Null
Invoke-WebRequest `
-Uri "https://raw.githubusercontent.com/openclaw/skills/main/$skill/SKILL.md" `
-OutFile "$dir\SKILL.md"openclaw gateway restartnpx clawhub@latest install summarize
npx clawhub@latest install weather
npx clawhub@latest install agent-browser
npx clawhub@latest install obsidiannpx clawhub@latest install agent-browser
npx clawhub@latest install summarize
npx clawhub@latest install weather
npx clawhub@latest install proactive-agentnpx clawhub@latest install agent-browser
npx clawhub@latest install self-improving-agent
npx clawhub@latest install proactive-agent
npx clawhub@latest install summarizenpx clawhub@latest install a-share-real-time-data
npx clawhub@latest install stock-evaluator
npx clawhub@latest install agent-browser
npx clawhub@latest install summarizeNote: Stock analysis is for reference only. Not investment advice.
soimy/openclaw-channel-dingtalkNPM_CONFIG_REGISTRY=https://registry.npmmirror.com \
openclaw plugins install @dingtalk-real-ai/dingtalk-connector$env:NPM_CONFIG_REGISTRY = "https://registry.npmmirror.com"
openclaw plugins install @dingtalk-real-ai/dingtalk-connectorcd ~/.openclaw/extensions/dingtalk-connector
rm -rf node_modules package-lock.json
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com npm installSet-Location "$env:USERPROFILE\.openclaw\extensions\dingtalk-connector"
Remove-Item -Recurse -Force node_modules, package-lock.json -ErrorAction SilentlyContinue
$env:NPM_CONFIG_REGISTRY = "https://registry.npmmirror.com"
npm installhttps://open-dev.dingtalk.com/https://open-dev.dingtalk.com/fe/apphttps://open-dev.dingtalk.com/fe/app#/corp/app~/.openclaw/openclaw.jsondingtalk-connectordingtalkplugins.allow"dingtalk-connector""dingtalk"gatewayTokengateway.auth.token{
"plugins": {
"enabled": true,
"allow": ["dingtalk-connector"]
},
"channels": {
"dingtalk-connector": {
"clientId": "USER_APP_KEY",
"clientSecret": "USER_APP_SECRET",
"gatewayToken": "SAME_VALUE_AS_gateway.auth.token",
"sessionTimeout": 1800000
}
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "SAME_TOKEN_AS_ABOVE"
},
"http": {
"endpoints": {
"chatCompletions": {
"enabled": true
}
}
}
}
}openclaw gateway restart
openclaw plugins listdingtalk-connectoropenclaw logs --follow &
LOG_PID=$!
sleep 15
kill $LOG_PID 2>/dev/null$job = Start-Job { openclaw logs --follow }
Start-Sleep 15
Stop-Job $job
Receive-Job $job"The DingTalk plugin appears to be disconnecting immediately and restarting. This is a known issue with some versions of the plugin. Please try:
- Run: openclaw plugins install @dingtalk-real-ai/dingtalk-connector (to get the latest version)
- Restart the gateway: openclaw gateway restart If it persists, check https://open.dingtalk.com/document/dingstart/install-openclaw-locally for the latest plugin version."
"Open DingTalk, search for your bot by the app name you created, and send it a message like 'hello'. If it replies, you're all set!"
https://open.feishu.cn/appcontact:user.base:readonlyim:messageim:message:send_as_botim:resourceim.message.receive_v1openclaw onboard"Open Feishu, go to your Workspace (工作台) or search for your app name. Send it a message like 'hello'. If it replies, you're all set! You can also add the bot to a group chat and @mention it."
https://q.qq.com/#/curl -s ifconfig.me(Invoke-WebRequest -Uri "https://ifconfig.me" -UseBasicParsing).Contentopenclaw onboard"Open QQ, find your bot, and send it a message. If it replies, you're all set!"
https://discord.com/developers/applicationsbotSend MessagesRead Message Historyopenclaw onboard"Go to your Discord server. Send a message to the bot or @mention it. If it replies, you're all set!"
python3 -c "
import json
with open('$HOME/.openclaw/openclaw.json') as f:
d = json.load(f)
print(d.get('gateway', {}).get('auth', {}).get('token', 'not found'))
"$config = Get-Content "$env:USERPROFILE\.openclaw\openclaw.json" | ConvertFrom-Json
$config.gateway.auth.tokenbrowser.navigate("http://127.0.0.1:18789?token=GATEWAY_TOKEN_HERE")openclaw gateway restart━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OpenClaw is ready!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AI Model: [Provider + version]
Skills: [X] skills installed
Chat via: [DingTalk / Feishu / QQ / Discord / Web Console]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"Would you like a quick tutorial for any of the skills you just installed?"
| Error | Plain explanation | Fix |
|---|---|---|
| SyntaxError: Unexpected token | Node.js version too old | Upgrade to Node 22 via nvm/fnm |
| EACCES: permission denied | npm install folder issue (macOS/Linux) | Run npm-global fix in Phase 1 |
| gateway.mode required / allow-unconfigured | Config missing gateway section | Add |
| Timed out waiting for gateway | Gateway didn't start | Check config file, run |
| device token mismatch | Config corrupted after update | Run |
| pairing required | Need to re-pair after update | Run |
| 401 Unauthorized from DingTalk bot | gatewayToken missing or wrong | Check channels.dingtalk-connector.gatewayToken matches gateway.auth.token |
| 405 Method Not Allowed | chatCompletions endpoint not enabled | Add |
| dingtalk-connector not in plugins list | plugins.allow not set | Add "dingtalk-connector" to plugins.allow array |
| npm install stuck / slow | npm registry slow from China | Already set npmmirror — retry |
| running scripts is disabled (Windows) | ExecutionPolicy blocking scripts | Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned |
| not recognized as cmdlet | fnm or openclaw not in PATH | Reload PATH from Phase 1-win steps |
| GitHub 403 rate limit on clawhub install | GitHub API anonymous rate limit exceeded | Use manual SKILL.md download fallback in Phase 3 |
| auto-restart attempt loop (DingTalk) | Plugin lifecycle incompatibility | Update plugin, see Phase 4.4 |
| too many failed authentication attempts | Web console auth lockout | Run |
| Feishu bot not responding | App not published or permissions missing | Check all 4 permissions are enabled, app is published and approved |
Feishu | Event subscription not configured | Ensure WebSocket long connection mode selected, event added |
QQ | IP whitelist missing your IP | Add server/computer public IP to QQ bot whitelist |
| QQ bot credentials invalid | Secret copied wrong or expired | Re-create bot secret on QQ Open Platform |
| Discord bot not responding | Message Content Intent not enabled | Enable Message Content Intent in Bot settings |
Discord | Bot not invited or missing permissions | Re-generate invite URL with Send Messages + Read Message History |
| health check returns connection refused | Gateway not running or wrong port | Run |
openclaw doctor --fixopenclaw logs --tail 50openclaw gateway status
openclaw doctor
curl http://127.0.0.1:18789/health # macOS/Linux
# or: (Invoke-WebRequest http://127.0.0.1:18789/health).Content # Windowsopenclaw gateway startopenclaw gateway restartopenclaw doctoropenclaw doctor --fix"Your OpenClaw gateway had stopped — probably because your computer restarted. I've started it back up, and it's running normally now."
npx clawhub@latest install <skill-name>
openclaw gateway restartopenclaw skills list| Want to... | Skill | What it does |
|---|---|---|
| Browse the web | agent-browser | Read and extract content from any webpage |
| Get weather | weather | Real-time weather, no API key needed |
| Summarize anything | summarize | Condense documents, articles, webpages |
| Automate routines | proactive-agent | Schedule tasks like "every Monday, send me..." |
| Track A-shares | a-share-real-time-data | Real-time stock data via TDX protocol |
cat ~/.openclaw/openclaw.json # macOS/Linux
Get-Content "$env:USERPROFILE\.openclaw\openclaw.json" # Windowsmodels.providersagents.defaults.model.primaryopenclaw gateway restartopenclaw logs --tail 50openclaw --version
npm install -g openclaw@latest
openclaw doctor --fix
openclaw gateway restartopenclaw doctor --fix