Module 2: Setup Like a Pro•Lesson 2 of 6
Recommended Setup for Beginners
Recommended Setup for Beginners
Let's get you running in 15 minutes.
Prerequisites
You need:
- Node.js 20+ (check:
node --version) - npm (comes with Node)
- Git (check:
git --version) - An API key from Anthropic or OpenAI
Step 1: Install OpenClaw
npm install -g openclawVerify installation:
openclaw --versionStep 2: Initialize Your Workspace
mkdir my-agent && cd my-agent
openclaw initThis creates:
config.yaml— Main configurationworkspace/— Where your agent files live
Step 3: Configure Your API Key
Edit config.yaml:
providers:
anthropic:
apiKey: "sk-ant-..." # Your Anthropic key
# OR
openai:
apiKey: "sk-..." # Your OpenAI key
models:
default: anthropic/claude-sonnet-4 # Start with SonnetStep 4: Start the Gateway
openclaw gateway startYou should see:
✓ Gateway started on port 3000
✓ Workspace: /path/to/my-agent/workspaceStep 5: Connect a Channel
For testing, use the CLI:
openclaw chatOr connect Telegram:
# In config.yaml
channels:
telegram:
botToken: "123456:ABC..."
allowlist:
- your_telegram_user_idYou're Running!
That's it. You have a working OpenClaw instance.
In the next lessons, we'll configure it properly.