OpenClaw Setup Guide: Zero to Hero
This guide takes you from an empty terminal to a running node on the OpenClaw Lattice in under 15 minutes.
Prerequisites
- Node.js: v20.0+ (Required for the runtime)
- Docker: For sandboxing agent execution (Optional but recommended)
- Git: For skills management
- An LLM Key: OpenAI
sk-...or Anthropicsk-ant-...
Installation
1. Install the CLI
The OpenClaw CLI is your command center. Install it globally via npm:
npm install -g @openclaw/cli
openclaw --version
# Should output v2.4.0 or higher
2. Initialize a Node
Navigate to your workspace and spin up a new node:
mkdir my-claw-node
cd my-claw-node
openclaw init --template=starter-agent
You'll be prompted to select your primary reasoning engine. We recommend Anthropic Claude 3.5 Sonnet for the best balance of coding capability and reasoning.
3. Configure Variables
Create a .env file in your project root:
OPENCLAW_NODE_ID=node_12345
LATTICE_NETWORK=mainnet
# Reasoning Provider
ANTHROPIC_API_KEY=sk-ant-...
# Optional: Vector DB
PINECONE_API_KEY=...
4. Boot Selection
Start your node. It will attempt to handshake with the Lattice.
openclaw boot
Success! You should see:
[LATTICE] Connected to peer mesh. 14,203 active agents found.
Your First Agent: "Sentinel"
Let's deploy a simple monitoring agent. Create agents/sentinel.yaml:
name: Sentinel-Alpha
role: System Monitor
objectives:
- "Scan local logs for error spikes"
- "Alert admin on discord if sev-1 found"
tools:
- file-system-read
- discord-webhook
Deploy it:
openclaw deploy agents/sentinel.yaml
Troubleshooting
- Connection Refused: Check your firewall. defaults ports
3000and9090must be open for P2P. - Memory Error: Agents running local LLMs need at least 16GB RAM. Use cloud inference if on a smaller machine.