What is OpenClaw?
OpenClaw is nothing more than a tool that use large language model (LLM) to help you manage your device and, therotically, it can do anything that a human can do on a computer. It is an open source project that is still in development, but it has already shown great potential in automating tasks and improving productivity.
More than Vibe Coding
The term ‘vibe coding’ was created to describe the process of coding with the help of an LLM, whereby the developer writes the prompts (natural language instructions) and the LLM generates the code. OpenClaw builds on this concept by enabling you to generate, execute and manage your device through natural language commands. This means that people don’t need to know any programming languages or even how to use a computer. They can simply tell OpenClaw what they want to do and it will take care of the rest.
Installation
There are multiple ways can install OpenClaw, and I choose to use docker to install it on my ubuntu server. Here are the steps:
1. Write a docker-compose.yml and Dockerfile with the following content:
# save as docker-compose.yml
services:
searxng:
image: searxng/searxng:latest
container_name: search
restart: unless-stopped
ports:
- "your_local_port:8080" # Change to your desired local port
volumes:
- /your/local/path:/etc/searxng # Change to your desired local path to preserve searxng settings
openclaw-gateway:
build:
context: .
dockerfile: Dockerfile.openclaw
container_name: openclaw
restart: unless-stopped
ports:
- "your_local_port:18789" # Change to your desired local port
volumes:
- /your/local/path:/home/node/.openclaw # Change to your desired local path to preserve OpenClaw settings
- /your/local/path:/home/node/.openclaw/workspace # Change to your desired local path for the workspace
environment:
HOME: /home/node
TERM: xterm-256color
TZ: ${OPENCLAW_TZ:-UTC}
# syntax=docker/dockerfile:1.7
# save as Dockerfile.openclaw
FROM ghcr.io/openclaw/openclaw:latest
USER root
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
# repair the independency of the base image and the openclaw image, and install the dependencies for openclaw
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3.11-venv \
python3-pip \
curl && \
mkdir -p /home/node/.openclaw/workspace /ms-playwright && \
chown -R node:node /home/node/.openclaw /ms-playwright && \
python3 -m venv /opt/openclaw-venv && \
/opt/openclaw-venv/bin/pip install --upgrade pip && \
/opt/openclaw-venv/bin/pip install httpx rich && \
node /app/node_modules/playwright-core/cli.js install-deps chromium && \
node /app/node_modules/playwright-core/cli.js install chromium && \
npm install -g clawhub@latest && \
rm -rf /var/lib/apt/lists/*
USER node
ENV PATH="/opt/openclaw-venv/bin:${PATH}" \
PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
WORKDIR /app
2. Build and run the docker containers:
docker compose -f docker-compose.yml up -d
Run
docker compose -f docker-compose.yml down --rmi allto stop and remove the containers and images.
3. Initialize OpenClaw:
docker exec -it openclaw /bin/bash # Enter the OpenClaw container
openclaw onboard --install-daemon # Initialize OpenClaw
Follow the instructions to complete the initialization process.
Choose Searxng engine in search setting, and input
http://search:8080as the search engine URL.
After that, you should be able to access OpenClaw through the local port you specified in the docker-compose.yml file. Please open your browser and navigate to http://localhost:your_local_port to start using OpenClaw.
It may requires you to input your token for the first time, you can get the token from the OpenClaw container by running the following command:
docker exec -it openclaw /bin/bash
cat /home/node/.openclaw/config.json | grep token
If you need to use root permission for some tasks, you can enter container with root user by running
docker exec -u root -it openclaw /bin/bash.
4. Setting the search engine and browser for OpenClaw:
In the OpenClaw interface, tackle the Browser Enabled and input /ms-playwright/chromium_headless_shell-1217/chrome-linux/chrome-headless-shell as the browser path in Browser Executable Path. Save the settings and OpenClaw will be restarted automatically.
Define Agent
OpenClaw allows you to customize your own agent with a distinct personality. It has been writen in the markdown (*.md) file under workplace directory. Ther are four files used to define the agent:
- IDENTITY.md: This file is used to define the identity of the agent, including its name, role, and the tone of communication.
- SOUL.md: This file is used to define the role of the agent, and the behavior patterns.
- TOOLS.md: This file is used to define the tools that the agent can use, and how to use them.
- USER.md: This file is used to let agent understand the user’s background, preferences and other information that can help agent to better serve the user.
Learn Skills
OpenClaw has a skill system that allows agent to learn new skills by reading the markdown files. The skill files are stored in the skills directory under workplace. Each skill is defined in a separate markdown file, and the file name is the name of the skill. The content of the skill file should include the description of the skill, the usage instructions, and some examples.
You can install the skills from ClawHub, which is a skill marketplace for OpenClaw. You can also create your own skills and share them with the community. To install a skill from ClawHub, you can use the following command:
# Enter the OpenClaw container
docker exec -it openclaw /bin/bash
clawhub install <skill_name>
OR you can also install the skill through the OpenClaw interface. Just go to the Skills section, search for the skill you want to install, and click the install button.
Then you should be able to use the skill in OpenClaw. For example, if you install the “weather” skill, you can simply ask OpenClaw “What’s the weather like today?” and it will use the weather skill to get the weather information for you.
Please be aware that some skills may contain malicious code, so make sure you review the code before installing the skill.
Automate Tasks
OpenClaw can help you automate tasks by Cron Jobs. The easiest way to create a cron job is through the OpenClaw interface. Just go to the Cron Jobs section, and select the Create Cron Job. Follow the instructions to create a new cron job. Make sure you set the correct time and frequency for the cron job and the correct command to be executed. Test the cron job before saving it to ensure that it works as expected.
Link for more information
The most important thing of OpenClaw is it can connect to chat platforms like WeChat, Telegram, Slack and so on. This means that you can interact with OpenClaw through these platforms to operate your computer, and you can also receive notifications from OpenClaw through these platforms. Differnt platforms have different ways to connect with OpenClaw, so please refer to the official documentation for more details.
OpenClaw Chat Channels Documentation: https://docs.openclaw.ai/channels
OpenClaw is still in development, and there are many features that this article has not covered. If you want to learn more about OpenClaw, please check the following links:
Hello Claw: https://datawhalechina.github.io/hello-claw/cn/adopt/intro/