OpenClaw – Complete Guide, Part 1: Installation and First Launch

Installing OpenClaw on a VPS
From the terminal to a running gateway: the step-by-step guide
Matteo 6 min

You’ve read the introductory post on OpenClaw and decided to give it a try. Good. In this first part of the guide we’ll install the gateway, choose where to run it, and get it started for the first time. No theory: just concrete steps.

What you’ll learn in this article:

  • The minimum requirements to run OpenClaw
  • The difference between local and VPS installation (and which to choose)
  • How to install OpenClaw and complete the initial onboarding wizard
  • How to keep it running as a background service

Prerequisites: What You Need Before Starting

Before touching any command, make sure you have:

Required software

  • Node.js version 22 or higher — OpenClaw runs on Node. If you don’t have it, download it from nodejs.org or use nvm to manage versions.
  • At least one API key for a language model — The most recommended one to start is Anthropic (Claude). You’ll find it at console.anthropic.com. You can also use OpenAI, Google Gemini or local models via Ollama.
  • npm — Installed automatically alongside Node.js.

Minimum knowledge required

  • Knowing how to open a terminal and type commands
  • Knowing how to edit a text file (even with nano or any editor)
  • Being familiar with the concept of environment variables and JSON configuration files

If these concepts are new to you, take an hour for a basic terminal tutorial before continuing. It’s worth the investment.


First Decision: Local or VPS?

This is the most important choice you’ll make. It has implications for security, cost, and convenience.

Local installation (on your computer)

Advantages: Immediate setup, no additional cost, easy to experiment with.

Disadvantages: OpenClaw only works when your computer is on. If you shut down your Mac or PC, the agent stops working. Not suitable for proactive 24/7 tasks.

When it makes sense: Testing and learning phase. If you just want to understand how it works before investing in a server.

VPS installation (cloud server)

Advantages: The agent runs 24/7, 7 days a week, even while you sleep. Your personal computer stays isolated and safe. This is the recommended mode for serious use.

Disadvantages: Has a monthly cost (an entry-level VPS with 2GB RAM costs between €4 and €10/month on providers like Hetzner, DigitalOcean or Vultr). Requires a few extra steps for the initial configuration.

When it makes sense: As soon as you decide to use OpenClaw for something more than an experiment. The separation between the agent’s server and your personal machine is also a fundamental security measure.

Recommendation: Start locally to get familiar. Then, when you’re ready, migrate to VPS. This guide covers both scenarios.


Installation

Method 1: One-liner script (the fastest)

Open your terminal and run:

curl -fsSL https://openclaw.ai/install.sh | bash

The script downloads OpenClaw, configures the environment, and prepares you for the next step. It’s the fastest method and handles dependencies automatically.

Security note: Before running any script downloaded from the internet with curl | bash, it’s good practice to visit the script URL in your browser to read its contents. It’s one extra step, but it’s a good habit.

Method 2: Installation via npm (more controlled)

If you prefer a more direct approach:

npm install -g openclaw

The -g option installs the package globally, making it available as a command from any folder on the system.

Verify the installation was successful:

openclaw --version

You should see the current version number. If the command is not recognized, you may need to restart the terminal or add the npm global packages folder to your PATH.


First Launch: The Onboarding Wizard

OpenClaw includes an interactive wizard that guides you through the initial configuration. Launch it with:

openclaw onboard

The wizard will ask you a few fundamental questions. Here’s what to expect:

1. API key entry You’ll be asked to enter the API key for your preferred AI provider. For Anthropic (Claude), you’ll find it in your dashboard at console.anthropic.com. Paste it when prompted.

2. Default model choice You can choose which model to use by default for the agent. To start, claude-haiku or claude-sonnet are great choices: they offer a good balance between capability and cost. Avoid setting claude-opus as the default model: it’s powerful but expensive, and using it for all tasks is wasteful.

3. Messaging channel configuration The wizard will offer to connect a channel right away (Telegram is the simplest to start with — we’ll cover it in detail in article 2). You can skip this step for now and configure channels later.

4. Confirmation and first test At the end, the wizard will briefly start the gateway to verify everything works. If you see the confirmation message, you’re good to go.


Installing as a Service (VPS or Continuous Use Only)

If you want OpenClaw to stay active even after closing the SSH session (or the terminal), you need to install it as a daemon — a background process managed by the operating system.

openclaw onboard --install-daemon

This command registers OpenClaw as a system service. From this point on, the gateway will start automatically on every server reboot, without you having to do anything.

To check the service status:

openclaw status

To stop or restart the gateway manually:

openclaw stop
openclaw restart

The Web Dashboard: Your Control Center

Once started, OpenClaw exposes a web dashboard accessible from the browser. By default, it’s located at:

http://127.0.0.1:18789/

From here you can:

  • See active conversations with the agent
  • Manage connected channel sessions
  • Check logs in real time
  • Configure some settings without manually editing configuration files

VPS warning: If you’re using a remote server, don’t expose port 18789 on the internet without protection. Use SSH tunneling (ssh -L 18789:localhost:18789 user@your-server) to access the dashboard securely. In article 2 we’ll look at more elegant solutions with Tailscale or Cloudflare.


Where Are the Configuration Files

All of OpenClaw’s configuration lives in a single JSON file:

~/.openclaw/openclaw.json

You can open it with any text editor. For now there’s no need to edit it manually — the wizard took care of the basic settings. In article 2 we’ll see how to customize it for security and channel configuration.


Summary and Next Step

At this point you should have:

  • OpenClaw installed and running (locally or on VPS)
  • The onboarding wizard completed with at least one API key configured
  • The web dashboard accessible from the browser
  • Optionally: the daemon service active for 24/7 operation

In the next article we’ll connect OpenClaw to Telegram and WhatsApp, configure the allowlist for security, and see how to protect the gateway from unauthorized access.


Next article → Part 2: Channel Configuration and Security

content_copy Copiato