SetupBeginner10 min

How to Set Up OpenClaw from Scratch

OpenClaw is a self-hosted gateway that connects your chat apps to AI coding agents. Here's how to get it running.


Prerequisites

  • **Node.js 22+** — Install via `nvm install 22` or from nodejs.org
  • **An API key** — Anthropic (Claude) recommended. Get one at console.anthropic.com
  • **A terminal** — macOS, Linux, or Windows WSL

  • Step 1: Install OpenClaw

    npm install -g openclaw

    Step 2: Configure

    openclaw configure

    This wizard walks you through setting your API key, choosing a model, and basic channel setup. Config is stored at `~/.openclaw/openclaw.json`.


    Step 3: Start the Gateway

    openclaw gateway start

    The gateway bridges your chat apps to the AI agent. Default port: 18789.


    Step 4: Open the Dashboard

    Visit **http://127.0.0.1:18789/** to see the Control UI with session monitoring, logs, and channel management.


    Step 5: Connect a Channel

    openclaw channels

    Follow prompts for Telegram (bot token from @BotFather), WhatsApp (QR code scan), Discord, or iMessage.


    Step 6: Chat!

    Message your bot from any connected channel. You now have a personal AI assistant accessible from your phone.


    Running as a Service

    For always-on operation:

    systemctl --user enable --now openclaw

    Next Steps

  • [Getting Started Guide](/guides/getting-started) for deeper config
  • [Best Skills to Install](/guides/best-skills) to extend functionality
  • [Top Dashboards](/dashboards) to visualize your setup