🧙 Onboarding Wizard Chi Tiết
Onboarding Wizard là công cụ giúp bạn cấu hình OpenClaw một cách tự động và an toàn. Trang này giải thích chi tiết từng bước của wizard.
Khởi động Wizard
openclaw onboard --install-daemon
Bước 1: Chọn Gateway Mode
Wizard sẽ hỏi bạn muốn chạy Gateway ở chế độ nào:
| Mode | Mô tả | Phù hợp cho |
|---|---|---|
| Local | Gateway chạy trên localhost | Sử dụng cá nhân, testing |
| Remote | Gateway expose ra internet | VPS, truy cập từ xa |
Local Mode (Khuyên dùng cho người mới):
- Chỉ truy cập được từ máy local
- An toàn hơn, không cần expose port
- Dashboard tại
http://127.0.0.1:18789/
Bước 2: Cấu hình Authentication
2.1 Anthropic API Key (Khuyên dùng)
Cách đơn giản nhất để bắt đầu:
- Truy cập console.anthropic.com
- Đăng ký / Đăng nhập
- Vào Settings → API Keys → Create Key
- Copy key và paste vào wizard
? Enter your Anthropic API key: sk-ant-xxxxx
2.2 OAuth (Tùy chọn nâng cao)
OpenClaw hỗ trợ OAuth cho một số provider:
openclaw configure --section auth
Nơi lưu OAuth credentials:
- Legacy:
~/.openclaw/credentials/oauth.json - Auth profiles:
~/.openclaw/agents/<agentId>/agent/auth-profiles.json
2.3 Claude Setup Token
Nếu bạn đã có Claude Code subscription:
claude setup-token
Wizard sẽ tự động detect và reuse credentials.
Bước 3: Cấu hình Channels
Wizard sẽ hỏi bạn muốn kết nối với platforms nào:
- 🔵 Telegram
- 🟣 Discord
- 📢 Mattermost
Bước 4: Pairing Defaults
Pairing là cơ chế bảo mật quan trọng của OpenClaw. Wizard sẽ hỏi:
? Default DM policy: (Use arrow keys)
❯ pairing (recommended - approve each user)
allowlist (only specific users)
open (dangerous - anyone can chat)
disabled (no DMs)
Chọn pairing (mặc định) để:
- Chỉ những người được bạn phê duyệt mới chat được với bot
- Ngăn chặn spam và lạm dụng API
- Có audit trail đầy đủ
Bước 5: Workspace & Skills
Cấu hình Workspace
? Workspace directory: ~/.openclaw/workspace
Đây là thư mục mà Agent có thể truy cập để đọc/ghi file.
Cài đặt Skills (Optional)
Skills là các khả năng mở rộng for Agent:
? Install default skills? (Y/n): Y
Default skills bao gồm:
- Web search (cần Brave API key)
- File management
- Code execution (sandboxed)
Bước 6: Daemon Installation
? Install as background service? (Y/n): Y
Điều này sẽ:
- 🍎 macOS
- 🐧 Linux
- 🪟 WSL2
Kiểm tra sau Onboarding
Health Check
openclaw status
openclaw health
Security Audit
openclaw security audit --deep
Verify Gateway
openclaw gateway status
Output mong đợi:
Gateway Status: ✅ Running
- Port: 18789
- Uptime: 2 hours
- Connected channels: 2
- Active sessions: 1
Nơi lưu cấu hình
| Loại | Đường dẫn |
|---|---|
| Config chính | ~/.openclaw/config.json |
| Credentials | ~/.openclaw/credentials/ |
| Agent configs | ~/.openclaw/agents/<id>/ |
| Logs | ~/.openclaw/logs/ |
| Workspace | ~/.openclaw/workspace/ |
Cấu hình thủ công (Nâng cao)
Nếu bạn muốn bypass wizard và config bằng tay:
# Mở file config
vim ~/.openclaw/config.json
Ví dụ cấu hình:
{
"gateway": {
"port": 18789,
"auth": {
"token": "your-generated-token"
}
},
"routing": {
"agents": {
"main": {
"workspace": "~/.openclaw/workspace",
"sandbox": {
"mode": "off"
}
}
}
},
"channels": {
"whatsapp": { "enabled": true },
"telegram": { "enabled": true, "token": "..." }
}
}
Troubleshooting
Wizard bị crash
# Reset và chạy lại
rm -rf ~/.openclaw/
openclaw onboard --install-daemon
API Key không accept
- Kiểm tra key có đúng format
sk-ant-... - Kiểm tra key chưa bị revoke
- Kiểm tra account có payment method
Daemon không start
# macOS
launchctl list | grep openclaw
# Linux
systemctl --user status openclaw-gateway
# Manual start
openclaw gateway --port 18789 --verbose