How to set up OpenClaw on your computer or a VPS
Install OpenClaw locally or on a Linux server, connect a model and a chat app, and keep the Gateway private, using commands from the official docs.
This guide follows the official docs and announcements, linked inline. AideDex did not test these products and does not score them. How we check facts.
Last checked Oct 22, 2026. Every command below is copied from the official OpenClaw docs. Commands and version numbers change often, so check the linked page before you run anything.
What OpenClaw is
OpenClaw is an open-source personal agent. You run its Gateway on your own machine or server, and you talk to it from a web dashboard or a chat app. The OpenClaw Foundation, a US non-profit, keeps the whole product MIT licensed, and says “there is no enterprise edition and no paid version” (openclaw.ai). You still pay your model provider for usage, unless you use a login or key you already have.
Before you start: security
An agent with tools can run commands, read files and send messages for you. The docs say the Gateway binds to loopback on a regular host install, most chat channels answer an unknown sender with a pairing code, and group access is allowlisted (Security). The exception: container images default to an exposed bind, so pair them with auth (Security).
The docs also say one Gateway is one trust boundary. It is not built to separate users who do not trust each other. For that, run separate Gateways, ideally under separate OS users or hosts (Security).
Check you are past the fix for CVE-2026-25253. NVD describes it as OpenClaw “before 2026.1.29” taking a gatewayUrl from a query string and connecting to it automatically, “sending a token value” (NVD). Any current install is far newer, but older installs should update first (see “Updating” below).
Requirements
- Node.js. The Node page says OpenClaw requires Node 24.22.1+ or Node 26.12.1+, and Node 26 is recommended (Node.js). The Install overview lists a lower floor of Node 24.16+ or 26.1+ (Install). Follow the stricter Node page. The installer script provisions Node for you if it is missing (Install).
- Operating system. macOS, Linux or Windows. On Windows you can use the Windows Hub app, the PowerShell installer, or a WSL2 Gateway (Install).
- AI access. An existing Claude Code or Codex CLI login, or a provider API key. Onboarding can reuse it (Getting started).
pnpmonly if you build from source (Install).
Check your Node version with node --version (Getting started).
Local install
Option 1: installer script (recommended by the docs)
It detects your OS, installs Node if needed, installs OpenClaw, and starts onboarding (Install).
macOS, Linux or WSL2:
curl -fsSL https://openclaw.ai/install.sh | bash
Windows (PowerShell):
iwr -useb https://openclaw.ai/install.ps1 | iex
To install without running onboarding, add --no-onboard on macOS/Linux (Install):
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
Option 2: npm
If you manage Node yourself, on npm 12 or npm 11.16+ (Install):
npm install -g openclaw@latest --allow-scripts=openclaw
openclaw onboard --install-daemon
On npm 11.15 and earlier, drop --allow-scripts=openclaw (Install). The same page lists pnpm, bun and from-source commands.
Option 3: desktop apps
- Windows: the docs recommend the native Windows Hub companion app, a signed installer with setup, tray status and chat (Install).
- macOS: download the
OpenClaw-<version>.dmgfrom OpenClaw GitHub releases and launch OpenClaw.app (Install).
Both apps can set up a local Gateway on first run, or connect to a remote one (Install).
Run onboarding and start the Gateway
The installer starts the onboarding wizard. Choose Quick start to reuse detected AI access, or Custom setup for the full flow. You can return later with openclaw configure (Getting started).
Quick start keeps the Gateway in the foreground. To run it in the background, press Ctrl+C, then install the service (Getting started):
openclaw gateway install
This installs a LaunchAgent on macOS, a systemd user unit on Linux and WSL2, or a Scheduled Task on Windows (Getting started). Then check it and open the dashboard:
openclaw gateway status
openclaw dashboard
The docs say you should see the Gateway listening on port 18789 (Getting started).
Connect a model provider
The docs describe two steps: authenticate with the provider, usually via openclaw onboard, then set the default model as provider/model (Model provider quickstart). Their example config:
{
agents: { defaults: { model: { primary: "anthropic/claude-opus-4-6" } } },
}
The starter list includes Anthropic, OpenAI, OpenRouter, Amazon Bedrock, Mistral, xAI and others (Model provider quickstart).
Connect a chat channel
The Getting started page calls Telegram the fastest channel to set up, since it needs only a bot token (Getting started).
Telegram
- In Telegram, chat with @BotFather (check the handle is exact), run
/newbot, and save the token (Telegram setup). - Add the token to OpenClaw (Telegram setup):
openclaw channels add --channel telegram --token <bot-token>
- Check the channel (Telegram setup):
openclaw channels status --probe
- Send your bot a message, then approve the pairing request. Codes expire after 1 hour (Telegram setup):
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>
WhatsApp links by QR code only (WhatsApp):
openclaw channels login --channel whatsapp
Approve the first sender the same way, with openclaw pairing list whatsapp and openclaw pairing approve whatsapp <CODE> (WhatsApp). The docs recommend a separate WhatsApp number, and show a config with dmPolicy: "pairing" plus an allowFrom list of your own number (WhatsApp).
VPS or Linux server
On a server, the Gateway runs on the VPS and owns state and workspace. You connect from your laptop or phone (Linux server). The docs list provider guides for Azure, DigitalOcean, Fly.io, GCP, Hetzner, Hostinger, Oracle Cloud, Railway, Render, Raspberry Pi and more (Linux server).
1. Harden admin access first
Decide how you will administer the box before installing. For tailnet-only admin, the docs say to install Tailscale, join the VPS to your tailnet, verify SSH over the Tailscale address, then restrict public SSH (Linux server).
2. Install and run as a service
Install with the same script or npm commands as above. The openclaw onboard --install-daemon path installs a systemd user unit (Linux server). To check health on the server, the Gateway runbook lists (Gateway runbook):
openclaw gateway status
openclaw status
openclaw logs --follow
3. Keep the Gateway private
The docs’ secure default: keep the Gateway on loopback and reach it through an SSH tunnel or Tailscale Serve (Linux server). Do not expose the Gateway port to the public internet. The network exposure page says to prefer Tailscale Serve over LAN binds, firewall any LAN bind to a tight source-IP allowlist, and “never expose the Gateway unauthenticated on 0.0.0.0” (Network exposure).
Three remote access options from the docs:
- SSH tunnel. From your laptop (Remote access):
ssh -N -L 18789:127.0.0.1:18789 user@gateway-host
- Tailscale Serve. Tailnet-only access while the Gateway stays on
127.0.0.1(Tailscale):
{
gateway: {
bind: "loopback",
tailscale: { mode: "serve" },
},
}
The docs note that funnel mode is public HTTPS and requires a shared password (Tailscale).
- Cloudflare Tunnel with Access. The Gateway keeps
gateway.bind: "loopback",cloudflareddials out, and Cloudflare Access checks identity before traffic reaches OpenClaw. No inbound port is opened (Cloudflare Tunnel and Access).
If you ever bind to lan or tailnet, the Gateway requires a shared secret (gateway.auth.token or gateway.auth.password) (Linux server). Back up state and workspace on the VPS regularly (Linux server).
Docker option
The docs call Docker optional, useful for an isolated or throwaway Gateway (Docker). You need Docker Desktop or Docker Engine with Compose v2 (Docker). From the repo root:
./scripts/docker/setup.sh
To use the pre-built image instead of a local build (Docker):
export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest"
./scripts/docker/setup.sh
The script runs onboarding, generates a Gateway token into .env, and starts the Gateway with Docker Compose. Open http://127.0.0.1:18789/ and paste that token into Settings (Docker). The docs say to use only ghcr.io/openclaw/openclaw or openclaw/openclaw, not unofficial mirrors (Docker).
On a VPS, Docker-published ports bypass normal host firewall rules. The docs say to enforce rules in the DOCKER-USER chain (Network exposure).
Security checklist
- Run the audit after any config change or before exposing anything (Running the security audit):
openclaw security audit
openclaw security audit --deep # attempts a live Gateway check
openclaw security audit --fix # apply safe remediations
Per the docs, --fix is narrow: it flips open group policies to allowlists and tightens file permissions (Running the security audit).
- Turn on sandboxing. It is off by default. It moves tool execution into a sandbox backend such as Docker, set via
agents.defaults.sandbox(Sandboxing). The docs say it is “not a perfect security boundary” but limits file and process access (Sandboxing). - Keep allowlists tight. Keep DM pairing on and list only your own accounts in
allowFrom(WhatsApp). The audit flags open DM and group policies and plugins loaded without an explicit allowlist (Running the security audit). - Vet ClawHub skills. ClawHub is open by default: anyone can upload. Public pages show the latest scan state so you can inspect a skill before installing (ClawHub). Read a skill’s files and scan summary before you install it.
- Stay updated. Be on 2026.1.29 or later for the CVE-2026-25253 fix (NVD).
Updating
The docs recommend one command. It detects your install type, checks the new version while the old Gateway runs, then activates it (Updating):
openclaw update
To preview first (Updating):
openclaw update --dry-run # preview without applying
Create a verified backup before a significant update (Updating). The macOS app updates through its own app updater, and Docker users replace the container image (Updating).
Troubleshooting
openclaw doctor is the health check and repair tool (Run doctor). The docs list these postures:
openclaw doctor
openclaw doctor --fix
The first runs guided checks; --fix applies supported repairs (Run doctor). For a first-time setup that will not work, the Getting started page also points to openclaw triage, which runs read-only checks and writes a sanitized diagnosis (Getting started).
Sources
21 pages- OpenClaw: official site openclaw.ai
- OpenClaw Docs: Install docs.openclaw.ai
- OpenClaw Docs: Node.js docs.openclaw.ai
- OpenClaw Docs: Getting started docs.openclaw.ai
- OpenClaw Docs: Model provider quickstart docs.openclaw.ai
- OpenClaw Docs: Telegram setup docs.openclaw.ai
- OpenClaw Docs: WhatsApp docs.openclaw.ai
- OpenClaw Docs: Linux server docs.openclaw.ai
- OpenClaw Docs: Gateway runbook docs.openclaw.ai
- OpenClaw Docs: Remote access docs.openclaw.ai
- OpenClaw Docs: Tailscale docs.openclaw.ai
- OpenClaw Docs: Cloudflare Tunnel and Access docs.openclaw.ai
- OpenClaw Docs: Network exposure docs.openclaw.ai
- OpenClaw Docs: Docker docs.openclaw.ai
- OpenClaw Docs: Security docs.openclaw.ai
- OpenClaw Docs: Running the security audit docs.openclaw.ai
- OpenClaw Docs: Sandboxing docs.openclaw.ai
- OpenClaw Docs: ClawHub docs.openclaw.ai
- OpenClaw Docs: Updating docs.openclaw.ai
- OpenClaw Docs: Run doctor docs.openclaw.ai
- NVD: CVE-2026-25253 nvd.nist.gov