Course: OpenClaw — Autonomous AI Agents | Pathway: Builder | Tier: Free | Level: Beginner Estimated Reading Time: 10 minutes
This lesson will walk you through installing OpenClaw on your computer. We will go step by step, and you do not need any programming experience to follow along.
You will need to use the terminal — that black screen with text that you might have seen in movies about hackers. It is much less dramatic in real life. It is just a way of typing commands to your computer instead of clicking buttons.
On macOS, the terminal app is called Terminal. You can find it by searching for "Terminal" in Spotlight (press Command + Space and type "Terminal").
On Linux, you likely already know where your terminal is. If not, search your applications for "Terminal" or "Console."
OpenClaw runs on macOS and Linux. Here is what you need:
If you are on Windows, you can use WSL (Windows Subsystem for Linux) to run OpenClaw. We will not cover WSL setup in this course, but there are good guides online.
Open your terminal and run these commands one at a time to check if you have the required tools installed.
Check Node.js:
node --version
You should see something like v20.11.0 or higher. If you get "command not found," you need to install Node.js. The easiest way is to download it from nodejs.org — grab the LTS (Long Term Support) version.
Check Git:
git --version
You should see something like git version 2.39.0. On macOS, if Git is not installed, your computer will offer to install the Xcode Command Line Tools — say yes and follow the prompts.
"Cloning" just means downloading a copy of the code from GitHub to your computer.
Pick a folder where you want OpenClaw to live. Your home directory is a fine choice:
cd ~
git clone https://github.com/openclaw-ai/openclaw.git
cd openclaw
You should now be inside the OpenClaw folder. You can confirm by running:
pwd
This should show something like /Users/yourname/openclaw.
OpenClaw uses Node.js packages (libraries of code that other people have written). You need to install these before OpenClaw can run.
npm install
This will take a minute or two. You will see a lot of text scrolling past — that is normal. As long as it finishes without errors, you are good.
If you see warnings (yellow text), those are usually fine. Errors (red text) are the ones to pay attention to.
OpenClaw needs a configuration file to know how to run. The repository comes with an example file that you can copy:
cp .env.example .env
Now open the .env file in your text editor. If you are using VS Code:
code .env
Or if you prefer to stay in the terminal:
nano .env
The .env file contains settings like which AI model to use, where to store data, and how to connect to chat platforms. For now, you do not need to change anything — the defaults will get you started.
We will come back to this file in later lessons when we connect chat channels and set up models.
Start OpenClaw with:
npm start
If everything is set up correctly, you should see output that looks something like this:
OpenClaw gateway starting...
Loading agents...
Gateway running on http://localhost:3000
Congratulations. OpenClaw is running on your machine.
When OpenClaw starts, it runs something called the "gateway." This is the central hub that manages everything.
Think of the gateway like a switchboard operator in an old telephone exchange. Messages come in from different places — Telegram, Discord, the web interface — and the gateway routes them to the right agent. It also handles scheduling, so your agents can run tasks at set times.
The gateway:
When you visit http://localhost:3000 in your browser while OpenClaw is running, you will see the management interface. This is where you can see your agents, check logs, and test things out.
Once OpenClaw is installed, here is what the important folders look like:
openclaw/
agents/ — Your agents live here. Each agent gets its own folder.
config/ — Configuration files for the gateway and scheduler.
logs/ — Log files so you can see what your agents have been doing.
tools/ — Custom tools that your agents can use.
.env — Your environment variables (API keys, settings).
You do not need to understand all of this right now. The main thing to know is that each agent gets its own folder inside agents/, and that is where you will spend most of your time configuring things.
To stop OpenClaw, go back to the terminal where it is running and press Ctrl + C. This sends a stop signal and shuts everything down cleanly.
You can restart it any time by running npm start again from the OpenClaw folder.
"Permission denied" errors. On macOS, you might need to allow terminal access in System Settings under Privacy and Security. On Linux, you might need to use sudo for some commands, though try without it first.
"Port 3000 is already in use." Something else is already using port 3000 on your machine. You can either stop that other program or change the port in your .env file.
"Cannot find module" errors. You probably skipped the npm install step, or it did not finish properly. Run it again.
Everything seems to hang after starting. If OpenClaw starts but nothing happens when you try to use it, check that your .env file has the right settings. The most common issue is not having an AI model configured — we will sort that out in the coming lessons.
In the next lesson, we will create your first agent. You will give it a name, a personality, and send it your first message. This is where things start to get fun.
Key Takeaways
agents/ directory.Ctrl + C to stop OpenClaw and npm start to restart it.