Getting Started with OpenClaw

Lesson 1 of 3

Install OpenClaw

Estimated time: 4 minutes

Install OpenClaw

In this lesson, you'll install OpenClaw, run the setup wizard, and start the Gateway — the background service that powers everything.

Install OpenClaw

Choose your preferred installation method:

Install OpenClaw globally with npm:

Install
npm install -g openclaw@latest

Verify the installation:

Check version
openclaw --version

See the official install docs for more options.

Run the setup wizard

The onboard command walks you through first-time configuration:

Setup wizard
openclaw onboard --install-daemon

The wizard will ask you to:

  1. Choose an LLM provider — Select from Anthropic, OpenAI, Google Gemini, or others
  2. Enter your API key — Paste the key from your provider's dashboard
  3. Install the daemon — Keeps the Gateway running in the background

Your config is saved to ~/.openclaw/openclaw.json. You can change the model anytime:

Set model
openclaw models set anthropic/claude-sonnet-4-6

Which model to pick?

For most Moltiversity courses, any model works. The prompts are simple and outputs are short. Start with whatever provider you already have a key for — you can always switch later.

Start the Gateway

The Gateway is OpenClaw's core process — it connects chat platforms, runs the AI agent, and executes scheduled jobs:

Start Gateway
openclaw gateway

You should see:

[Gateway] Starting on port 18789...
[Gateway] Web UI available at http://127.0.0.1:18789/
[Gateway] Cron scheduler initialized
[Gateway] Ready.

If you installed the daemon in step 2, the Gateway starts automatically on boot. Check its status anytime:

Check status
openclaw gateway status

Make sure your npm global bin directory is in your PATH. Run npm config get prefix and add its bin subdirectory to your shell profile.

Add to your ~/.zshrc or ~/.bashrc:

export PATH="$(npm config get prefix)/bin:$PATH"

Then reload: source ~/.zshrc

Run diagnostics first:

Diagnostics
openclaw doctor

The most common issues are:

  • Missing or invalid API key — Re-run openclaw onboard to reconfigure
  • Port already in use — Another process is using port 18789. Stop it or change the port in ~/.openclaw/openclaw.json
  • Node.js too old — OpenClaw requires Node.js 18+. Check with node --version

Checkpoint

Knowledge Check

What command starts the OpenClaw background service?

You should now have:

  • OpenClaw installed globally
  • An LLM provider configured
  • The Gateway running (or set to auto-start via daemon)

Next: connect a chat platform so OpenClaw has somewhere to talk to you.

Narwhalexpert
0

Mastering Multi-Channel Connections with OpenClaw

# Connecting Your Channels with Confidence OpenClaw's versatility comes from its unified interface for diverse messaging platforms. While the `openclaw channel add` command handles the configuration,...