What You Will Achieve
By following this guide, you will install OpenClaw on your Linux computer. OpenClaw lets you chat with AI through apps like WhatsApp, Telegram, and Discord. The whole process takes about 15-20 minutes.
What is OpenClaw?
OpenClaw is like a bridge between your chat apps and AI. Once installed, you can send a message on WhatsApp or Telegram, and an AI will reply to you. Everything runs on your own computer, so your conversations stay private.
Which Linux Are You Using?
This guide works for:
- Ubuntu 20.04, 22.04, or 24.04 (most common)
- Debian 11 or 12
- Linux Mint 20 or 21
- Other Debian-based distributions
Different Linux?
If you use Fedora, Arch, or another distribution, the commands will be slightly different. The main steps are the same, but package installation commands vary. This guide focuses on Ubuntu/Debian.
Check If Your Computer Is Ready
Before we begin, let us make sure your computer meets the requirements.
Open a terminal:
On most Linux systems, you can open a terminal by:
- Pressing
Ctrl + Alt + Ton your keyboard, OR - Clicking the "Activities" button (top-left corner) and typing "Terminal", OR
- Looking for "Terminal" in your applications menu
What is a Terminal?
A terminal is a program where you type commands to tell your computer what to do. It looks like a window with text. When you see a blinking cursor, you can start typing.
Check your Linux version:
Type this command and press Enter:
lsb_release -a
Expected Result
Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04
You should see information about your Linux version. Any recent version (from the last few years) should work.
What you need:
- A computer running Linux (Ubuntu, Debian, or similar)
- An internet connection
- The ability to run commands as administrator (using
sudo) - About 2GB of free disk space
Step-by-Step Installation
Update Your System
Before installing anything new, it is a good idea to update your system. This makes sure you have the latest security fixes and software.
Type this command and press Enter:
sudo apt update && sudo apt upgrade -y
What Does This Command Mean?
sudo= "super user do" - this runs the command with administrator permissionsapt update= check what updates are available&&= "and then do this next thing"apt upgrade -y= install the updates (the-ymeans "yes, do it automatically")
When asked for your password:
Type your computer login password and press Enter. You will not see any characters as you type - this is a security feature, not a bug. Just type your password and press Enter.
This may take a few minutes. You will see text scrolling on the screen - this is normal.
Expected Result
Reading package lists... Done Building dependency tree... Done ... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Install Required Tools
We need to install a few tools that OpenClaw needs. These are common programs that many other applications also use.
Type this command and press Enter:
sudo apt install -y curl git build-essential
What Are These Tools?
curl= a program that downloads files from the internetgit= a program for downloading and managing codebuild-essential= basic tools needed to build software
Wait for the installation to complete (about 1-2 minutes).
Expected Result
Reading package lists... Done ... Setting up build-essential ...
Install Node.js
OpenClaw needs a program called Node.js to run. We need version 22 or higher.
What is Node.js?
Node.js is a tool that lets programs written in JavaScript run on your computer. OpenClaw uses JavaScript, so we need Node.js to run it. You do not need to learn JavaScript - we just need to install Node.js.
First, add the Node.js download source:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
What Does This Command Do?
This command downloads a setup script from NodeSource (a trusted source for Node.js) and runs it. The script tells your computer where to find Node.js version 22.
When asked for your password, type it and press Enter.
Wait about 30 seconds for this to complete.
Now install Node.js:
sudo apt install -y nodejs
Wait for the installation to complete (about 1-2 minutes).
Verify that Node.js installed correctly:
node --version
Expected Result
v22.x.x
The number should start with v22 (like v22.1.0 or v22.5.1). The exact numbers after v22. do not matter.
Got a Different Number?
If you see a number lower than 22 (like v18.x.x or v20.x.x), the installation did not work correctly. Try running the two commands in this step again from the beginning.
Also check npm (the package manager that comes with Node.js):
npm --version
Expected Result
10.x.x
Any version 10 or higher is fine.
Install OpenClaw
Now we can install OpenClaw! This is the main program we have been preparing for.
Type this command and press Enter:
curl -fsSL https://openclaw.ai/install.sh | bash
What Does This Command Do?
This downloads the OpenClaw installer from the official website and runs it. It is similar to downloading and double-clicking an installer, but done through the terminal.
Wait for the installation to complete (about 1-2 minutes).
Expected Result
Downloading OpenClaw... Installing OpenClaw... openclaw@1.x.x installed successfully Run 'openclaw onboard' to get started
Important: Close and reopen your terminal before continuing!
- Close your terminal window (click the X button or type
exit) - Open a new terminal (press
Ctrl + Alt + T)
This step is necessary so that your computer recognizes the new openclaw command.
Verify that OpenClaw installed correctly:
openclaw --version
Expected Result
openclaw/1.x.x
See 'command not found'?
If you see "openclaw: command not found", try these fixes:
- Make sure you closed and reopened your terminal
- Try running the install command again
- Check our detailed guide: OpenClaw Command Not Found
Run the Setup Wizard
OpenClaw includes a setup wizard that helps you configure everything. This is like going through setup screens when you install a new program.
Type this command and press Enter:
openclaw onboard --install-daemon
What is --install-daemon?
The --install-daemon part tells OpenClaw to set itself up to run in the background automatically. A "daemon" is a program that runs continuously, even when you are not using the terminal.
The wizard will ask you several questions. Here is what to choose:
-
Gateway mode: Use the arrow keys on your keyboard to select "local" and press Enter. This means OpenClaw will run on your computer only.
-
Authentication: The wizard will ask how you want to connect to AI services. Follow the prompts to enter your API key or set up OAuth.
-
Channels: Select which chat apps you want to use (WhatsApp, Telegram, Discord, etc.). You can change this later.
-
Background service: Choose "Yes" to keep OpenClaw running even when you close the terminal.
You Need an API Key
To make OpenClaw work with AI, you need an API key from an AI provider (like Anthropic or OpenAI). The wizard will explain how to get one. Without an API key, OpenClaw cannot respond to your messages.
Check That OpenClaw Is Running
Let us make sure everything is working correctly.
Type these commands one at a time, pressing Enter after each:
openclaw status
Expected Result
Gateway: running Port: 18789 Auth: configured Channels: none connected
openclaw health
Expected Result
Health: OK
What Do These Results Mean?
- Gateway: running = OpenClaw is active and working
- Port: 18789 = OpenClaw is listening on port 18789 (like a door number for network connections)
- Auth: configured = Your API key is set up correctly
- Channels: none connected = You have not connected WhatsApp/Telegram yet (we will do this next)
- Health: OK = Everything is working normally
Open the OpenClaw Dashboard
OpenClaw has a web page where you can see everything that is happening and change settings.
Open this address in your web browser (Firefox, Chrome, etc.):
http://127.0.0.1:18789/
What is 127.0.0.1?
127.0.0.1 is a special address that means "this computer". Port 18789 is where OpenClaw is listening. Together, this address takes you to the OpenClaw dashboard running on your own computer.
You should see the OpenClaw dashboard in your browser. From here you can:
- See the status of your connections
- View message logs
- Change settings
Installation Complete!
Congratulations! OpenClaw is now installed and running on your Linux computer.
Common Problems and Solutions
"sudo: command not found"
This means you might not have sudo installed, which is unusual on most Linux systems.
Solution:
Log in as root and install sudo:
apt install sudo
Then add your user to the sudo group.
"curl: command not found"
Solution:
Install curl first:
sudo apt install curl
Then continue with the installation.
"openclaw: command not found"
This means the terminal does not know where OpenClaw is installed.
Solutions to try in order:
- Close your terminal completely and open a new one
- Run the install command again:
curl -fsSL https://openclaw.ai/install.sh | bash - See our detailed guide: OpenClaw Command Not Found
"Permission denied" errors
This usually means you need to use sudo or fix file permissions.
Solution:
sudo chown -R $(whoami) ~/.npm
Then try installing OpenClaw again.
"No auth configured" message
This means you need to set up your API key.
Solution:
Run the setup wizard again:
openclaw onboard
Node.js version is too old
If node --version shows a version lower than 22:
Solution:
Remove the old version and reinstall:
sudo apt remove nodejs
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
Making OpenClaw Start Automatically
If you want OpenClaw to start every time you turn on your computer:
Enable the systemd service
If you chose "Yes" for the background service during setup, OpenClaw should already start automatically. You can verify this:
systemctl --user status openclaw
Expected Result
openclaw.service - OpenClaw Gateway Active: active (running)
Start OpenClaw manually (if needed)
If the service is not running, you can start it:
systemctl --user start openclaw
To make it start automatically on boot:
systemctl --user enable openclaw
Keeping OpenClaw Safe
Security Tips
Follow these practices to keep your installation secure.
-
OpenClaw only runs locally: By default, only your computer can access OpenClaw. Other devices on your network cannot see it.
-
Keep your control token secret: If you set up a control token during setup, do not share it with anyone.
-
Update regularly: Run this command occasionally to get security updates:
openclaw update
- Check for security issues:
openclaw security audit --deep
What To Do Next
Now that OpenClaw is installed, you are ready to connect it to your chat apps:
- Connect to Telegram - Send AI messages through Telegram
- Connect to WhatsApp - Use AI through WhatsApp
- Connect to Discord - Add AI to your Discord server
- Your First Agent - Learn how to start chatting with AI
Stuck?
If you run into problems not covered here, check our Troubleshooting guide or visit the official OpenClaw documentation.
Last updated: February 2, 2026 | Found an error? Contact us