Install and run OpenClaw for the first time on any platform.

Install OpenClaw on macOS, Linux, or Windows and complete your first AI-assisted task in under 5 minutes.

Install OpenClaw on macOS, Linux, or Windows and complete your first AI-assisted task in under 5 minutes.

 

From zero to running in just 5 minutes.

Most "getting started" guides hide the actual installation command under several explanatory paragraphs. Ignore that part. Here's what you need and how to run it.

By the end of this lesson, you will have installed OpenClaw and be able to communicate with AI models.

Prerequisite: Node.js

OpenClaw requires Node.js version 22.14 or later (Node 24 recommended). Check if you have it installed:

node --version

If you see version v22.14.0 or higher, you're ready. If not, install it:

macOS:

brew install node

Linux (Ubuntu/Debian):

curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash - sudo apt-get install -y nodejs

Windows: Download the installer from nodejs.org and run it. Select the LTS version.

Quick check : Which command checks your Node.js version?

Answer : node --version

Install OpenClaw

One command:

npm install -g openclaw

This command installs the openclaw command system-wide. Verify that it is working:

openclaw --version

You will see the version number. If you get "command not found," your npm system-wide path is not in the PATH - run `npm config get prefix` and add that /bin directory to your shell configuration.

Initial setup process

This is an important order:

openclaw onboard --install-daemon

This command will launch the setup process, guiding you through the following steps:

  1. Gateway configuration - Where OpenClaw runs (local by default)
  2. Model validation - Connecting to an AI vendor (choose any vendor you have - we'll add more vendors in lessons 3-5)
  3. Setting up the workspace - Create the ~/.openclaw/ directory with your agent files.
  4. Daemon settings - Keep OpenClaw running in the background
  5. Optional channels - Telegram, Discord, WhatsApp (ignore these channels currently)

 

Follow the instructions. For the model provider, select the provider for which you already have an API key. If you don't have one yet, select "Skip" - we'll set them up in the following lessons.

Your first task

After the initial setup is complete, try this command:

openclaw chat

Then type:

Kiểm tra xem hàm này có lỗi không: function calculateTotal(items) { let total = 0; for (let i = 0; i <= items.length; i++) { total += items[i].price * items[i].quantity; } return total; }

OpenClaw will catch a one-unit deviation error (<= should be <). If it catches it, your setup is working.

Understanding the workspace

OpenClaw has created a workspace at ~/.openclaw/. Here is the content inside:

~/.openclaw/ ├── config.yaml # Cài đặt gateway và nhà cung cấp ├── workspace/ │ ├── SOUL.md # Tính cách agent của bạn (bài học 7) │ ├── AGENTS.md # Quy tắc hoạt động (bài học 7) │ ├── USER.md # Thông tin về bạn │ └── memory/ # Các file bộ nhớ dài hạn └── logs/ # Nhật ký phiên và việc sử dụng token

Don't edit these files right now – we'll customize them in Lesson 7. For now, just know they exist.

Quick check : By default, where does OpenClaw store its workspace files?

Answer : ~/.openclaw/workspace/

Try it yourself.

Open the terminal and run these steps in this order:

# 1. Kiểm tra Node.js node --version # 2. Cài đặt OpenClaw npm install -g openclaw # 3. Xác minh cài đặt openclaw --version # 4. Chạy quá trình thiết lập ban đầu openclaw onboard --install-daemon # 5. Bắt đầu trò chuyện openclaw chat

If everything works, ask OpenClaw to explain the function of the files in ~/.openclaw/workspace/. It should describe SOUL.md, AGENTS.md, and the memory system—exactly what we'll learn in Lesson 7.

Troubleshooting

Problem Solution
command not found: openclaw Add the system-wide npm bin directory to the PATH environment variable:export PATH="$(npm config get prefix)/bin:$PATH"
Access permission error on Linux Use sudo npm install -g openclawor modify npm access permissions.
The integration process is stuck at "gateway". Check if port 3000 is currently in use:lsof -i :3000
"No model configured" You skipped the step of adding a supplier - that's okay, we'll add suppliers in lessons 3-5.

 

Key points to note

  • OpenClaw requires Node.js 22.14 or later and is installed via the command `npm install -g openclaw`.
  • The command `openclaw onboard --install-daemon` will handle all initial setup in a single guided process.
  • Your workspace is located at `~/.openclaw/` and contains configuration files, agent files, and memory.
  • You can start a chat immediately with OpenClaw Chat.
  • Question 1:

    What is the minimum Node.js version required for OpenClaw?

    EXPLAIN:

    OpenClaw requires Node 22.14 or later; Node 24 is recommended for best performance.

  • Question 2:

    What does the command 'openclaw onboard --install-daemon' do?

    EXPLAIN:

    The onboard command is a formal, guided setup that configures everything in a single session: port, model authentication, workspace directory, and optional messaging channels.

 

Training results

You have completed 0 questions.

-- / --

Related posts
  • Proficient in OpenClaw

    this series will guide you through the entire openclaw setup process, from initial installation to multi-vendor configuration ready for a production environment.
  • Learn with OpenClaw

    openclaw isn't the first ai agent – ​​companies have been using automated trading bots and logistics optimization tools for years.
  • Using OpenClaw with Ollama: Building a local data analytics system.

    with openclaw's channel integrations, the same local system can be extended to interfaces like whatsapp or slack, allowing secure access to your processes from familiar environments.
Other Program articles
  • Proficient in OpenClaw

    sê-ri này sẽ hướng dẫn bạn toàn bộ quy trình thiết lập openclaw, từ cài đặt ban đầu đến cấu hình đa nhà cung cấp sẵn sàng cho môi trường sản xuất.
  • MS Word - Lesson 15: Numbering at the beginning of lines

    số thứ tự tự động cho phép bạn định dạng văn bản theo dạng danh sách với dạng số, dấu chấm tròn, đường viền và còn có rất nhiều tùy chỉnh, thiết lập khác mà người dùng có thể áp dụng cho tài liệu word. bài viết dưới đây sẽ hướng dẫn bạn đọc cách đánh số thứ tự trên word theo nhiều cách khác nhau.
  • MS Word - Lesson 11: Formatting Word Pages

    Định dạng trang word về cơ bản như định dạng tài liệu word, nhưng có thêm nhiều tùy chỉnh cho trang tài liệu.
  • How to create a table in Word 2007

    tạo bảng trong word là thao tác cơ bản và thường xuyên gặp phải khi chúng ta soạn thảo dữ liệu hay chỉnh sửa nội dung tài liệu. microsoft word hỗ trợ người dùng đầy đủ các công cụ hay nhiều cách khác nhau để kẻ bảng, chèn bảng biểu vào nội dung word.
  • MS Word - Lesson 7: How to Use Styles

    styles trong word giúp định dạng nhanh nội dung với những form cho trước.
  • How to use the do-while loop in Excel VBA

    bạn muốn tự động hóa các nhiệm vụ lặp lại trong excel vba? vậy thì hãy cùng học cách dùng vòng lặp do-while để triển khai một loạt các hành động lặp lại cho tới khi một điều kiện được đáp ứng.
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup