All guides

Set up OpenClaw and finish your first local chat session

Follow the official quick start: install the OpenClaw CLI, complete onboarding, confirm the Gateway listens on port 18789, and send a first message in the dashboard chat.

AINavWritten / Updated Sources checked
On this page

At a glance

This guide takes you from nothing to a running Gateway, configured auth, and a reply in the web dashboard on your own computer. The official page says it takes about five minutes, though provider sign-in can take longer. The main route uses the official installer, because the later openclaw commands need the CLI to be installed.

Workflow

  1. Layer 1: environment and CLI

    Confirm node --version is in the documented range and install the CLI with the official installer, so the later openclaw commands exist.

  2. Layer 2: service

    After onboarding, run openclaw gateway status and look for the Gateway listening on port 18789. Do not start chatting until it is.

  3. Layer 3: session

    Run openclaw dashboard to open the Control UI and send a message in its chat. The first session is complete once you get a reply.

Each stage cites official sources.

Before you start

  • A supported Node.js: 24.16.0 or later on 24.x, or 26.1.0 or later. Node 26 is recommended, and 24.22.1+/26.12.1+ carry security fixes. Check with node --version.
  • An existing Claude Code or Codex CLI login, or a provider API key, which onboarding can reuse. Handle keys only in your local terminal; never paste them into chat or screenshots.
  • A working terminal: bash on macOS/Linux or PowerShell on Windows. The docs also mention a native Windows Hub app and WSL2, which this guide does not cover.

1. Check your Node version

Type node --version in the terminal and compare the result with the requirements above. If it does not match, handle the official Node setup first.

2. Install the CLI and enter onboarding

On macOS/Linux run curl -fsSL https://openclaw.ai/install.sh | bash; in Windows PowerShell run iwr -useb https://openclaw.ai/install.ps1 | iex. The installer starts the guided onboarding automatically. On a fresh install, choose Quick start after the security-guide pointer. If a usable Claude Code/Codex CLI login or API key exists, that is the only onboarding prompt: OpenClaw finds it, verifies it with a real completion, saves the config and opens the dashboard. Choose Custom setup for all guided options; openclaw configure adds settings later. Other install methods (Docker, Nix, npm) are on the official Install page.

3. Decide on background running

Quick start asks Keep OpenClaw running in the background?. Yes installs a copy of the same version under ~/.openclaw and runs the Gateway as a background service. No keeps the Gateway in this terminal until you press Ctrl+C; your config stays saved.

4. Install the service separately if needed

If you chose No and later want background running, press Ctrl+C to stop the foreground Gateway, then run openclaw gateway install followed by openclaw gateway start (the CLI must be installed as in the previous step). Install only means the service is registered, and the Gateway may still be starting. Start waits for health and readiness checks and does not restart a Gateway that is already running. If you answered Yes earlier, skip this step.

5. Verify the Gateway

Run openclaw gateway status and check that the Gateway is listening on port 18789. If it is not, use the diagnosis step below.

6. Open the dashboard and send a message

Run openclaw dashboard. The Control UI opens in your browser, and a page that loads means the path works. Type a non-sensitive message in the Control UI chat and wait for a reply. Later, run openclaw for the TUI, or openclaw dashboard again to reopen the web UI.

7. Diagnose problems

Run openclaw triage. It performs read-only health checks and writes a sanitized prompt, and nothing leaves your machine until you choose an agent. To read the findings yourself, run openclaw doctor.

Original example

Example (synthetic): a fresh macOS laptop where node --version meets the requirement and a Codex CLI login already exists. In the terminal run curl -fsSL https://openclaw.ai/install.sh | bash, and when onboarding starts choose Quick start and answer No to background running. Keep that terminal open, open a second one, and run openclaw gateway status; it shows port 18789 listening. Then run openclaw dashboard, type 'In one sentence, what can you do right now?' in the chat, and read the reply. Return to the first terminal and press Ctrl+C to stop the Gateway. The config is saved and the CLI is installed, so later you can run openclaw gateway install and openclaw gateway start to run it in the background.

Completion checks

  • The node --version output meets the documented requirement, and the openclaw command is available in your terminal after the installer finishes.
  • openclaw gateway status shows the Gateway listening on port 18789.
  • openclaw dashboard opens the Control UI and your chat message receives a reply.
  • If you used triage, confirm that you deliberately chose whether to hand the prompt to an agent.

Limits

  • This covers only the first local session. Connecting Telegram, Discord or other channels, pairing and access control are on the official Channels and Pairing pages.
  • The docs also describe a one-command npx openclaw@latest trial route. If you use only that without installing the CLI, later openclaw commands may not be available, so install the CLI the official way first. This guide does not expand that route.
  • The documentation gives no command for stopping the service in background mode, so this guide describes only Ctrl+C for the foreground Gateway and supplies no other command.
  • Custom Control UI builds (gateway.controlUi.root) and environment variables are advanced topics not needed for a first session. Whether sign-in or credential reuse works depends on your own provider account; the docs make no guarantee.

Verification scope

Written from reading the official documentation only. Login, installation, product API execution, file upload and generated output were not tested; what appears on your machine may differ.

Article sources

Original editorial content; official descriptions and checking suggestions are distinguished.

  1. OpenClaw · Official sources
    View details