If this is your first time touching anything "AI + terminal", this guide is for you. Along with this, to show how useful this can be, I even had OpenClaw write this article for you.
This is written to be brutally practical: no jargon walls, no skipped steps, no "just configure it" hand-waving. We will move one command at a time, verify each step, and make sure you always know what to do next if something breaks.
By the end of this guide, you will have:
- OpenClaw installed
- OpenClaw onboarding completed
- A live dashboard chat working
- A second agent with its own workspace and personality
- A troubleshooting checklist for common issues
If you can copy and paste commands, you can do this.
What OpenClaw Is (In Plain English)
Before we install anything, here is the simple model:
OpenClaw: the app/CLI system you install locallyGateway: the local service that keeps OpenClaw running and routes requestsAgent: one assistant with its own instructions, memory, and behaviorWorkspace: a folder where agent files live (AGENTS.md,SOUL.md, memory files, and more)OpenClaw agents: multiple agents running from one OpenClaw install
Think of OpenClaw as a house. Each agent is a room in that house. They can all be useful, but each room has different rules and a different purpose.
Who This Guide Is For
This guide is built for:
- People who are new to AI tools
- People who are new to terminal commands
- People who want a "do this, then check this" setup path
- People on macOS, Linux, WSL2, or Windows PowerShell
If you are advanced, you can skim headings and copy only the commands.
Time, Cost, and Expectations
Expected setup time
- Fast path: 20 to 35 minutes
- First-time beginner path: 45 to 90 minutes
Expected cost
- OpenClaw install itself follows the official install path
- Model usage may cost money depending on the provider/API key you connect during onboarding
What "success" looks like
By the first 30 to 60 minutes, you should be able to send a message in dashboard and get a response.
Recommended Hardware Requirements
Official docs focus on software requirements (Node 22+, supported OS, and WSL2 recommendation on Windows). In practice, hardware quality changes how smooth OpenClaw feels.
Here is a beginner-safe hardware target:
Minimum (it works, but may feel slow)
- CPU: 2 cores
- RAM: 8 GB
- Storage: 10 GB free SSD space
- Internet: stable broadband
Recommended (best for most people)
- CPU: 4+ cores (modern Intel/AMD or Apple Silicon)
- RAM: 16 GB
- Storage: 20 GB+ free SSD space
- Internet: stable broadband with low dropouts
Comfortable for multi-agent + channels
- CPU: 6+ cores
- RAM: 32 GB
- Storage: 30 GB+ free SSD space
- Internet: always-on connection if you run channels full time
Device/OS recommendations
- Windows users: use WSL2 for the smoothest setup path
- Laptop users: keep plugged in during onboarding and channel login
- If you plan 24/7 usage: use a desktop, mini PC, or VPS instead of a sleeping laptop
Why hardware matters here
- More RAM helps when running multiple agents/sessions
- SSD speed improves startup, logs, and workspace operations
- Stable internet prevents failed auth/channel handshakes
Step 0: Preflight Checklist (Do This First)
Do this once before installation:
- Keep stable internet for at least 20 minutes
- Open a terminal
- Make sure you have permission to install software
- Have your model provider API key ready
- Close extra terminals so you do not confuse sessions
Optional but helpful:
- Keep a notes file open and paste every command you run
- Paste and save error messages exactly if anything fails
Step 1: Install OpenClaw
Use the official installer script for your platform.
macOS / Linux / WSL2
curl -fsSL https://openclaw.ai/install.sh | bashWindows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iexQuick check after install
Run:
openclaw --helpIf this prints CLI help text, OpenClaw is installed and visible in your shell path.
If it says command not found, skip ahead to the troubleshooting section and use the "command not found" fix.
Step 2: Run Onboarding (Guided Setup)
For beginners, this is the best command:
openclaw onboard --install-daemonIf you want manual control, use:
openclaw onboardOnboarding options, explained in detail
This is the section most beginners get stuck on, so here is the wizard prompt flow in plain English.
Prompt 1: Existing config found (Keep / Modify / Reset)
If OpenClaw already sees ~/.openclaw/openclaw.json, it asks what to do.
Keep: use current config as-isModify: keep most settings, change only selected partsReset: wipe selected scopes and rebuild
Reset scopes usually include:
- Config only
- Config + credentials + sessions
- Full reset (also removes workspace)
Beginner recommendation:
- Choose
Modifyif this is your second attempt - Choose
Resetonly if your setup is clearly broken
Prompt 2: QuickStart vs Advanced
QuickStart: picks safe defaults fastAdvanced: shows every step and every toggle
What QuickStart normally defaults to:
- Local gateway (loopback)
- Default workspace
- Port
18789 - Gateway token auth on
- Tailscale exposure off
- DM pairing/allowlist-friendly defaults for chat channels
Beginner recommendation: choose QuickStart for first install.
Prompt 3: Local gateway or Remote gateway
Local: OpenClaw gateway runs on this machineRemote: your local CLI connects to a gateway already running elsewhere
Beginner recommendation: choose Local.
Use Remote only if you already run a dedicated gateway host.
Prompt 4: Model/Auth provider choice
This is where you connect the model backend OpenClaw will use.
Common options include:
- Anthropic API key
- Anthropic OAuth / token flow
- OpenAI API key
- OpenAI Code (Codex) auth
- xAI API key
- Vercel AI Gateway
- Cloudflare AI Gateway
- Gemini API key
- Z.AI API key
- Moonshot / Kimi
- Synthetic
- OpenCode Zen
- Skip (configure later)
Beginner recommendation:
- For beginners, use
Googleas the service provider - Choose
Google Antigravityin the provider/auth flow when it is available in your wizard (as there is a free service tier) - Login through the pop up login prompt
- Avoid multi-gateway/proxy options on day one unless you already need them
- If you plan to use LM Studio local models, choose
Skip (configure later)and use the LM Studio section near the end of this guide (after Step 13)
Prompt 5: Default model selection
After auth, wizard asks for a default model.
Beginner recommendation:
- For beginners, pick
Gemini 3 Flashas your default model when it is available - If
Gemini 3 Flashis not listed in your account/region, choose the newestFlashGemini model shown - Avoid manual provider/model string entry on first setup
- If you chose
Skip (configure later)for LM Studio, set your model in the LM Studio section near the end of this guide (after Step 13) once your local server is running
You can switch models later with openclaw configure or model settings.
Prompt 6: Workspace location
This is the folder where agent files and memory live.
Default:
~/.openclaw/workspaceBeginner recommendation: keep the default.
Choose custom workspace only if:
- You have strict disk organization needs
- You maintain separate disks/volumes for projects
Prompt 7: Gateway settings (port, bind, auth, tailscale)
This set of options controls how OpenClaw is reachable.
Port: default18789Bind: loopback/local-only vs wider network bindAuth mode: token-based auth or disabled authTailscale exposure: optional remote access path
Beginner-safe choices:
- Keep port
18789 - Keep bind as loopback/local
- Keep token auth enabled (even local)
- Keep tailscale off for now
Do not disable auth unless you fully trust all local processes and understand the risk.
Prompt 8: Channels (WhatsApp, Telegram, Discord, etc.)
The wizard may offer channel setup in onboarding.
Typical channel requirements:
- WhatsApp: QR login
- Telegram: bot token
- Discord: bot token
- Google Chat: service account JSON + audience
- Mattermost: token + base URL
- Signal: optional
signal-clisetup - BlueBubbles / iMessage: extra local requirements
DM security behavior:
- Pairing is default for many DM flows
- First DM can return a code
- You approve with
openclaw pairing approve <channel> <code>or allowlists
Beginner recommendation:
- Skip channels during first pass
- Get dashboard/CLI working first
- Add one channel later, not many at once
Prompt 9: Daemon install and runtime
This controls background startup.
Platform behavior:
- macOS: LaunchAgent
- Linux/WSL2: systemd user unit (wizard may attempt lingering)
Runtime choice:
- Node (recommended)
- Bun (not recommended for onboarding path)
Beginner recommendation:
- Install daemon:
Yes - Runtime:
Node
Prompt 10: Skills installation
Wizard can install recommended skills and optional dependencies.
You may be asked for package manager (npm or pnpm) and optional dependency installs.
Beginner recommendation:
- Install recommended skills
- Choose
npmunless you already usepnpm
Prompt 11: Health check + finish
Wizard starts the gateway and runs health checks.
Expected success:
- Gateway starts successfully
- Health check passes
- Wizard prints next steps
If no GUI is detected, wizard may print port-forward guidance instead of opening browser automatically.
Recommended first-time onboarding path (short version)
If you want one clean answer for all prompts:
Modify(orKeepif already working)QuickStartLocalgatewayGoogleprovider +Google AntigravityflowGemini 3 Flash(or newest availableFlashGemini model)- Default workspace (
~/.openclaw/workspace) - Port
18789, loopback bind, token auth on, tailscale off - Skip channels for now
- Install daemon = yes, runtime = Node
- Install recommended skills
Step 3: Verify Health Before You Do Anything Else
Run these commands in order:
openclaw gateway status
openclaw doctor
openclaw dashboardWhat to look for
gateway status: should show running or healthydoctor: should not show blocking errorsdashboard: should open browser at local dashboard
Then send a simple first message in dashboard:
Say hello and tell me one thing you can help with.If you get a response, your core setup is working.
Step 4: Understand the Workspace Files
OpenClaw stores behavior and memory in workspace files.
Default workspace:
~/.openclaw/workspaceImportant files:
AGENTS.md: operating behavior and task rulesSOUL.md: style, personality, and voiceUSER.md: information about you and your preferencesIDENTITY.md: identity metadatamemory/YYYY-MM-DD.md: rolling memory logs
Beginner rule
If you only edit one file first, edit AGENTS.md.
Step 5: Set a Clean First Agent Policy
Paste this into AGENTS.md for a beginner-safe baseline:
# AGENTS
You are a practical assistant.
Be clear and brief.
Use plain language.
Always give numbered steps when user asks for actions.
If key information is missing, ask exactly one clarifying question.
Never pretend something was done if it was not actually done.This creates consistent behavior and reduces confusing answers.
Step 6: Run Your First Real Tasks
Now test both UI and CLI paths.
6.1 Dashboard test
Prompt:
Plan my next 3 hours with simple numbered steps and break times.6.2 CLI test
First check your agent name:
openclaw agents listMost first-time installs use main.
Run:
openclaw agent --agent main --message "Plan my next 3 hours in simple numbered steps."6.3 Optional channel delivery test
If you already configured a channel:
openclaw agent --agent main --to +15555550123 --message "Send me a short daily summary." --deliverIf this succeeds, your basic OpenClaw usage is complete.
Step 7: Create a Second Agent (OpenClaw Agents)
This is where OpenClaw gets powerful.
A second agent lets you separate contexts:
- personal planning vs work planning
- writing voice vs technical voice
- fast daily assistant vs strict operations assistant
7.1 Check existing agents
openclaw agents listMost users start with main.
7.2 Add a new agent
Simple flow:
openclaw agents add workExplicit workspace path flow:
openclaw agents add work --workspace ~/.openclaw/workspace-workImportant: keep each agent in a separate workspace.
7.3 Give the new agent identity
From identity file:
openclaw agents set-identity --workspace ~/.openclaw/workspace-work --from-identityOr direct values:
openclaw agents set-identity --agent work --name "WorkOps" --emoji "W" --avatar avatars/workops.png7.4 Add a strict work policy to the second agent
In that second workspace, set AGENTS.md to something like:
# AGENTS
You are a work execution assistant.
Prioritize high-impact tasks first.
Keep answers concise.
For planning requests, output:
1) Top priorities
2) Risks
3) Next concrete action in the next 15 minutes7.5 Test the new agent
openclaw agent --agent work --message "List my top 3 priorities today and the first 15-minute action."If this returns a response, multi-agent setup is working.
Step 8: Route Channels to the Right Agent (Optional)
If you connect messaging channels, bindings control which agent responds.
Check routing/bindings:
openclaw agents list --bindingsSimple strategy:
- Send personal channel to personal agent
- Send business channel to work agent
- Keep testing one channel at a time before adding another
Warning: do not point multiple agents at the same agentDir/workspace.
Step 9: Add a Chat Channel Safely (WhatsApp Example)
If you want to message your assistant from phone:
9.1 Log in channel
openclaw channels login9.2 Add sender allowlist
Edit ~/.openclaw/openclaw.json:
{
"channels": {
"whatsapp": {
"allowFrom": ["+15555550123"]
}
}
}9.3 Verify service health
openclaw gateway status
openclaw healthNow only allowlisted numbers can DM your bot.
Step 10: "No Surprises" Daily Operating Routine
If you use OpenClaw daily, this routine avoids most headaches:
- Check gateway health before heavy usage
- Keep each agent role-specific
- Keep prompts explicit ("give 3 options", "show numbered steps")
- Avoid mixing personal/work instructions in one agent
- Review memory files occasionally for drift
Step 11: Troubleshooting (Detailed)
Use this as your recovery playbook.
Problem A: openclaw command not found
Run:
node -v
npm -v
npm prefix -gIf needed on macOS/Linux:
export PATH="$(npm prefix -g)/bin:$PATH"Then close and reopen terminal and run:
openclaw --helpProblem B: Onboarding fails midway
Do this:
- Re-run onboarding:
openclaw onboard --install-daemon - Copy exact error text
- Run
openclaw doctor - Resolve only the first blocking error, then retry
Problem C: Gateway not responding
Run:
openclaw gateway status
openclaw status --deep
openclaw doctorIf status looks unhealthy, run onboarding again to repair setup.
Problem D: Dashboard does not open
Run:
openclaw dashboardIf browser still does not open, manually visit:
http://127.0.0.1:18789/Problem E: Agent replies are inconsistent
Fix sequence:
- Tighten
AGENTS.mdrules - Keep one role per agent
- Use explicit prompt formats
- Test in CLI with short messages before channel delivery
Problem F: Linux/WSL2 stops after logout
Enable lingering:
sudo loginctl enable-linger $USERProblem G: Pass --to <E.164>, --session-id, or --agent to choose a session
Your CLI now requires an explicit target session.
Quick fix:
- List agents:
openclaw agents list- Use one explicitly:
openclaw agent --agent main --message "Plan my next 3 hours in simple numbered steps."Alternative targets:
- Use
--to +1555...for a channel recipient - Use
--session-id <id>for a known session
Step 12: Safety Defaults You Should Keep
Use these from day one:
- Keep
allowFromfor any external channel - Use dedicated number/accounts for bots when possible
- Treat pairing codes and auth files like passwords
- Keep workspaces private and backed up
- Slow/disable automation heartbeat until behavior is stable
Heartbeat example:
{
"agent": {
"heartbeat": { "every": "0m" }
}
}Step 13: Beginner Progression Path (What To Do Next)
After first success, scale slowly:
- Week 1: one agent, dashboard + CLI only
- Week 2: add second agent with separate workspace
- Week 3: add one channel with allowlist
- Week 4: refine prompts and memory hygiene
This path gives you consistent results with less chaos.
Optional: Host Models Locally with LM Studio
If you want OpenClaw to run against a model on your own machine (instead of a cloud API), LM Studio is the easiest path.
This is optional. You can still follow the normal cloud setup and come back to this later.
What this gives you
- Local inference on your machine
- Better data locality/privacy
- No per-request cloud token billing for the local model
Important reality check
OpenClaw works best with large context windows and strong models. Small or heavily quantized local models can be slow, less accurate, and weaker against prompt-injection style attacks.
Step L1: Install LM Studio
Download and install from:
https://lmstudio.aiStep L2: Download and load a model in LM Studio
In LM Studio:
- Open the model search/download area
- Download the model you want to run
- Load the model so it is active in memory
Beginner tip: pick the largest model your machine can run reliably.
Step L3: Start LM Studio local server
Use either option:
- LM Studio UI:
Developertab -> toggleStart server - CLI:
lms server start --port 1234Default local API URL:
http://127.0.0.1:1234Step L4: Confirm LM Studio API is reachable
Run:
curl http://127.0.0.1:1234/v1/modelsIf this returns model JSON, the local API server is working.
If it fails:
- Check LM Studio server is started
- Check the model is loaded (not just downloaded)
- Check port
1234is not blocked/in use
Step L5: Connect OpenClaw to LM Studio
Edit ~/.openclaw/openclaw.json and add/update a provider block like this:
{
"agents": {
"defaults": {
"model": { "primary": "lmstudio/<your-model-id>" },
"models": {
"lmstudio/<your-model-id>": { "alias": "Local LM (LM Studio)" }
}
}
},
"models": {
"mode": "merge",
"providers": {
"lmstudio": {
"baseUrl": "http://127.0.0.1:1234/v1",
"apiKey": "lmstudio",
"api": "openai-responses",
"models": [
{
"id": "<your-model-id>",
"name": "Local model via LM Studio",
"reasoning": false,
"input": ["text"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 131072,
"maxTokens": 8192
}
]
}
}
}
}How to fill <your-model-id>:
- Read it from
GET /v1/modelsoutput (Step L4) - Use the same value for:
models.providers.lmstudio.models[0].id - Prefix with
lmstudio/when settingagents.defaults.model.primary
Step L6: Verify OpenClaw can use your local model
- Make sure LM Studio server is still running
- Run:
openclaw gateway status
openclaw doctor
openclaw dashboard- Send a simple message in dashboard and confirm you get a reply
If there is a model/provider error:
- Re-check
baseUrlishttp://127.0.0.1:1234/v1 - Re-check model ID spelling/casing
- Re-run
curl http://127.0.0.1:1234/v1/models
Optional: Keep cloud fallback while using local primary
Keep models.mode: "merge" and keep one cloud model configured as fallback. This gives you reliability when the local model is unloaded or unavailable.
Final Quick-Start Recap
If you only want the shortest reliable setup:
- Install OpenClaw with installer script
- Run
openclaw onboard --install-daemon - Run
openclaw gateway statusandopenclaw doctor - Run
openclaw dashboardand send first message - Create second agent with
openclaw agents add work - Test it with
openclaw agent --agent work --message "..."
At that point, you are running OpenClaw and OpenClaw agents successfully.
References
- OpenClaw Install
- OpenClaw Docs: Get Started
- OpenClaw Docs:
openclaw agentcommand - OpenClaw Docs:
openclaw agentscommand - OpenClaw Docs: Onboarding Wizard (CLI)
- OpenClaw Docs: Onboarding Wizard Reference
- OpenClaw Docs: Local Models
- LM Studio Docs: Local API Server
- LM Studio Docs: OpenAI-Compatible
GET /v1/models - LM Studio CLI (
lms) Docs