> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/openclaw/openclaw/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get OpenClaw up and running in under 5 minutes

# Quickstart

Get your personal AI assistant running in under 5 minutes. This guide will walk you through installation, onboarding, and sending your first message.

## Prerequisites

Before you begin, ensure you have:

* **Node.js ≥ 22**: OpenClaw requires Node.js version 22 or higher
* **Package Manager**: npm, pnpm, or bun
* **Operating System**: macOS, Linux, or Windows (via WSL2)
* **AI Provider Account**: Anthropic (Claude) or OpenAI (ChatGPT) subscription

<Note>
  For the best experience, we recommend **Anthropic Pro/Max + Opus 4.6** for long-context strength and better prompt-injection resistance.
</Note>

## Installation

<Steps>
  <Step title="Install OpenClaw globally">
    Choose your preferred package manager:

    <CodeGroup>
      ```bash npm theme={null}
      npm install -g openclaw@latest
      ```

      ```bash pnpm theme={null}
      pnpm add -g openclaw@latest
      ```

      ```bash bun theme={null}
      bun add -g openclaw@latest
      ```
    </CodeGroup>

    <Tip>
      Using pnpm? Make sure your shell's PATH includes `~/Library/pnpm` (macOS) or `~/.local/share/pnpm` (Linux).
    </Tip>
  </Step>

  <Step title="Run the onboarding wizard">
    The wizard will guide you through setting up the Gateway, configuring your AI model, and connecting your first channel:

    ```bash theme={null}
    openclaw onboard --install-daemon
    ```

    The `--install-daemon` flag automatically installs the Gateway as a background service (launchd on macOS, systemd on Linux) so it stays running.

    <Accordion title="What does the wizard do?">
      The onboarding wizard:

      1. Creates the configuration file at `~/.openclaw/openclaw.json`
      2. Sets up your AI model credentials (Anthropic or OpenAI)
      3. Configures the Gateway on port 18789
      4. Optionally sets up your first messaging channel
      5. Installs the Gateway daemon for automatic startup
    </Accordion>
  </Step>

  <Step title="Start the Gateway">
    If you didn't install the daemon, start the Gateway manually:

    ```bash theme={null}
    openclaw gateway --port 18789 --verbose
    ```

    You should see output indicating the Gateway is running:

    ```
    Gateway listening on ws://127.0.0.1:18789
    Control UI available at http://127.0.0.1:18789
    ```

    <Info>
      The Gateway binds to localhost (127.0.0.1) by default for security. See the [deployment guide](/guides/deployment) for remote access options.
    </Info>
  </Step>
</Steps>

## Your First Message

Once the Gateway is running, you can interact with your assistant in several ways:

### Via CLI (Direct)

Send a message directly to the agent:

```bash theme={null}
oclaw agent --message "Hello, what can you help me with?"
```

### Via Messaging Channel

If you configured a messaging channel during onboarding, just send a message to your bot on that platform:

* **WhatsApp**: Send a message to your linked device
* **Telegram**: Message your bot at `@yourbotname`
* **Discord**: Mention your bot in a channel or DM
* **Slack**: DM your bot or mention it in a channel

### Via Web UI

Open your browser to `http://127.0.0.1:18789` to access the Control UI and WebChat interface.

## Verify Installation

Check that everything is working correctly:

```bash theme={null}
# Check Gateway status
oclaw gateway status

# Check connected channels
oclaw channels status

# Run diagnostics
oclaw doctor
```

## Configuration File

Your configuration is stored at `~/.openclaw/openclaw.json`. Here's a minimal example:

```json theme={null}
{
  "agent": {
    "model": "anthropic/claude-opus-4-6"
  },
  "gateway": {
    "port": 18789,
    "bind": "loopback"
  }
}
```

See the [configuration guide](/configuration) for all available options.

## Common Issues

<AccordionGroup>
  <Accordion title="Port 18789 already in use">
    If port 18789 is already in use, specify a different port:

    ```bash theme={null}
    openclaw gateway --port 18790
    ```

    Update your config file to use the new port:

    ```json theme={null}
    {
      "gateway": {
        "port": 18790
      }
    }
    ```
  </Accordion>

  <Accordion title="Node version too old">
    OpenClaw requires Node.js ≥ 22. Check your version:

    ```bash theme={null}
    node --version
    ```

    If it's older, install Node 22+ using [nvm](https://github.com/nvm-sh/nvm) or your system's package manager.
  </Accordion>

  <Accordion title="Gateway won't start">
    Check the logs for errors:

    ```bash theme={null}
    openclaw logs --follow
    ```

    Common issues:

    * Config file syntax errors (run `openclaw config validate`)
    * Missing AI provider credentials
    * Port conflicts
    * File permission issues
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Add More Channels" icon="plug" href="/channels/overview">
    Connect WhatsApp, Telegram, Discord, and more
  </Card>

  <Card title="Configure Your Gateway" icon="gear" href="/configuration">
    Customize models, routing, and security settings
  </Card>

  <Card title="Explore Platform Apps" icon="mobile" href="/platforms/macos">
    Install the macOS app or iOS/Android nodes
  </Card>

  <Card title="Deploy to Production" icon="server" href="/guides/deployment">
    Run OpenClaw on a VPS or cloud instance
  </Card>
</CardGroup>

## Learn More

* **Architecture**: Understand how OpenClaw works in the [architecture guide](/concepts/architecture)
* **Core Concepts**: Learn about [sessions](/concepts/sessions), [routing](/concepts/routing), and [agents](/concepts/agents)
* **Security**: Review [security best practices](/guides/security) before exposing your Gateway
* **Troubleshooting**: Check the [troubleshooting guide](/guides/troubleshooting) for common issues
