System Requirements
Trước khi cài đặt OpenClaw, đảm bảo hệ thống của bạn đáp ứng các tiêu chuẩn sau đây để đảm bảo hiệu suất tốt nhất và an toàn.
💻 Hệ điều hành
- 🍎 macOS
- 🐧 Linux
- 🪟 Windows
Version 12.0+ (Monterey)
✅ Cực kỳ khuyên dùng cho người mới bắt đầu.
Môi trường Unix-based native hỗ trợ tốt nhất cho development tools mà không cần config phức tạp.
Ubuntu 20.04+, Debian 11+
✅ Tốt nhất cho Production/Server.
Hiệu năng cao nhất, không có overhead của GUI. Khuyên dùng cho VPS (DigitalOcean, Hetzner).
Yêu cầu WSL2
✅ Chạy qua Windows Subsystem for Linux (Ubuntu).
Lưu ý: Không hỗ trợ PowerShell/CMD native. Bạn bắt buộc phải cài WSL2 để chạy Gateway.
⚠️ Hỗ trợ thử nghiệm
- Raspberry Pi OS (ARM64)
- Arch Linux
- Fedora 35+
⚙️ Phần cứng
Tối thiểu (Testing only):
- CPU: Dual-core 2GHz+
- RAM: 2GB
- Disk: 5GB free space
- Network: Stable internet connection
Khuyến nghị (Production):
- CPU: Quad-core 2.5GHz+
- RAM: 4GB+ (8GB ideal)
- Disk: 20GB+ SSD
- Network: 10Mbps+ stable
Nếu chạy trên VPS:
- DigitalOcean: Droplet $6/month (2GB RAM)
- Vultr: Cloud Compute $6/month
- Hetzner: CX21 €5.83/month (4GB RAM) - Tốt nhất trong tầm giá
🛠️ Phần mềm yêu cầu
1. Node.js
Version: ≥ 22.x (STRICT REQUIREMENT - không optional!)
Check version hiện tại:
node --version
npm --version
OpenClaw KHÔNG CHẠY với Node < 22.
Reasons:
- Native Fetch API required
- Modern ES modules
- Performance improvements
Nếu bạn có Node 18/20, BẮT BUỘC phải upgrade lên 22+
Cài đặt Node.js 22:
Ubuntu/Debian
# Dùng NodeSource repository
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify
node --version # v22.x.x
npm --version # 10.x.x
macOS
# Option 1: Homebrew (khuyên dùng)
brew install node@22
brew link node@22
# Option 2: NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 22
nvm use 22
Windows (WSL2)
- Cài WSL2 trước: Microsoft Guide
- Trong WSL terminal, follow hướng dẫn Ubuntu ở trên
2. Git (Optional nhưng khuyên dùng)
# Ubuntu/Debian
sudo apt-get install git
# macOS
brew install git
# Verify
git --version
3. Build Tools
Linux:
sudo apt-get install build-essential python3
macOS:
xcode-select --install
Windows (WSL2):
sudo apt-get install build-essential
4. Brave Search API Key (Optional nhưng khuyên dùng)
For: Web search tool (web_search)
Lấy API key:
- Đăng ký tại: https://brave.com/search/api/
- Free tier: 2,000 queries/month
- Configure:
openclaw configure --section web
Lưu ở đâu:
# Via environment variable
export BRAVE_API_KEY="your-key-here"
# Or via wizard khi setup
openclaw onboard
Không có Brave API key vẫn dùng được OpenClaw, chỉ thiếu web search feature.
🔑 API Keys cần thiết
1. Anthropic Claude API (BẮT BUỘC)
OpenClaw sử dụng Claude để suy luận AI.
Lấy API key:
- Đăng ký tại: https://console.anthropic.com
- Verify email và thêm payment method
- Tạo API key: Settings → API Keys → Create Key
- Copy và lưu an toàn
Giá:
- Pay-as-you-go (trả theo sử dụng)
- Claude 3.5 Sonnet: ~$3-15/1M tokens
- Ước tính: $10-50/tháng cho usage thông thường
- KHÔNG commit API key vào Git
- KHÔNG chia sẻ key với người khác
- Lưu trong environment variables hoặc secret manager
2. Channel-specific Keys (OPTIONAL)
Tùy vào platform bạn muốn kết nối:
| Platform | Cần gì | Lấy ở đâu |
|---|---|---|
| Telegram | Bot Token | @BotFather |
| Discord | Bot Token + Application ID | Discord Developer Portal |
| Slack | Bot Token + App Token | Slack API |
| ❌ (QR scan) | N/A | |
| Google Chat | Service Account | Google Cloud Console |
🌐 Network Requirements
Ports cần mở:
| Port | Purpose | Required |
|---|---|---|
| 18789 | Gateway WebSocket | ✅ Yes |
| 18793 | Canvas file server | Optional (for nodes) |
| 443 | HTTPS API calls | ✅ Yes |
| 80 | HTTP redirects | Optional |
Notes:
- Port 18789: Gateway WS endpoint (
ws://127.0.0.1:18789) - Port 18793: HTTP server cho Canvas UI (default
canvasHost.port) - Cả 2 ports đều bind localhost by default (secure)
Firewall Rules:
Outbound (Required):
# Cho phép kết nối đến:
- api.anthropic.com (Claude API)
- api.telegram.org (nếu dùng Telegram)
- discord.com (nếu dùng Discord)
Inbound (Optional):
# Chỉ cần nếu muốn access dashboard từ remote
- Port 18789 (hoặc custom port)
ĐỪNG expose port 18789 ra public Internet!
Nếu cần remote access:
- Dùng VPN (Tailscale, WireGuard)
- SSH tunnel:
ssh -L 18789:localhost:18789 user@server - Nginx reverse proxy với authentication
📦 Disk Space Planning
Breakdown:
OpenClaw installation: ~500MB
Node modules: ~200MB
Conversation history: ~50MB/1000 messages
Vector database: ~100MB/10k messages
Logs: ~10MB/week
Plugins: Varies
Total recommended: 5GB+ (20GB for production)
Auto-cleanup:
# Set log rotation
openclaw config set logs.maxSize 100MB
openclaw config set logs.maxAge 30d
# Vector DB cleanup
openclaw config set memory.retention 90d
🔒 Security Considerations
Môi trường cài đặt:
❌ ĐỪNG CÀI TRÊN:
- Máy chính làm việc
- Máy có dữ liệu quan trọng
- Server production có data nhạy cảm
✅ NÊN CÀI TRÊN:
- Máy ảo riêng (VM)
- VPS dedicated cho OpenClaw
- Docker container với volume isolation
- Raspberry Pi riêng
Isolation:
# Tạo user riêng
sudo useradd -m -s /bin/bash openclaw
sudo su - openclaw
# Giới hạn permissions
chmod 700 ~/.openclaw
umask 077
✅ Readiness Checklist
Trước khi bắt đầu cài đặt, check:
- Node.js ≥ 22.x installed
- npm ≥ 10.x installed
- Git installed (optional)
- Build tools installed
- Anthropic API key ready
- Môi trường isolated (VM/VPS)
- Minimum 5GB disk space
- Stable internet connection
- Đã đọc Security Alerts
🚀 Sẵn sàng cài đặt?
Chọn phương pháp cài đặt phù hợp:
- Quick Start - Cài trong 5 phút (khuyên dùng cho mới)
- Docker Installation - Isolated, dễ manage
- Production Deployment - Full control
❓ Câu hỏi thường gặp
Tôi có thể dùng Node.js 18 không?
Không khuyến khích. OpenClaw cần Node 22+ cho:
- Native Fetch API
- Modern ES modules
- Performance improvements
Một số features có thể không hoạt động với Node 18.
RAM 2GB có đủ không?
Đủ cho testing, nhưng:
- Limit số conversations đồng thời
- Memory có thể bị full nếu nhiều plugins
- Recommend 4GB+ cho stable
Có cần GPU không?
KHÔNG. OpenClaw dùng API cloud (Anthropic), không chạy model local.
GPU chỉ cần nếu bạn muốn:
- Run local LLM (advanced)
- Image/video processing intensive
Windows native có được không?
Hiện tại chỉ qua WSL2. Native Windows support đang được phát triển.
WSL2 performance rất tốt, gần như native Linux.
Còn thắc mắc? Hỏi trong Discord #support