Let's look how to set up OpenClaw AI Agent and use it safely on your PC
Looking for a step-by-step guide on how to install OpenClaw on Linux, macOS, or Windows? Here are our answers for all of your questions!
OpenClaw AI is an open-source personal AI agent platform. Users describe a task, and OpenClaw invents the capabilities it needs to use like opening files, cleaning your email, using a browser, connecting to a third-party service via an API, or even writing code from scratch. If you want to know more about the story of OpenClaw AI and an alternative for it, read our article.
You can talk to the OpenClaw AI agent via familiar apps like Telegram, WhatsApp, iMessage, Slack, or Signal. It can also connect to different AI models including Claude, ChatGPT, Kimi, and others. Of course, the more powerful the neural network, the better the performance.
OpenClaw AI agents also have memory, but it works more like preferences than a full diary. They can learn how you like to communicate or work, yet they don’t automatically store every past solution. If the AI agent figures out a useful method, you usually need to tell it to remember that approach, then next time it can repeat the result much faster and with less guidance.
In just a few weeks, an entire ecosystem has started to grow around the project:
The speed at which these tools and services have appeared is impressive. At the same time, it raises concerns. When an ecosystem grows this quickly, quality and security often struggle to keep up.
Connecting OpenClaw to messaging apps like Telegram, WhatsApp, and iMessage lets you interact with your AI agent in the same places you already chat every day. Instead of logging into a dashboard, you can send commands, ask questions, and automate tasks directly from your favorite messenger.
To connect OpenClaw to Telegram, first open Telegram and search for the official bot @BotFather (the one with the blue checkmark), then start a chat with it. After that, the setup only takes a few steps:
After that, your agent will be able to operate through Telegram.
Note: There are several connection modes for a bot in Telegram. The safest option is private mode, where the bot responds only to its owner. To enable this, you need to provide your Telegram ID, which you can obtain by messaging a bot that shows your account information.
If no Telegram ID is specified, other options apply. In open mode, the bot will respond to any user without restrictions. If neither open mode nor a specific owner is set, automatic pairing is used: the first person who messages the bot automatically becomes its owner.
OpenClaw connects to WhatsApp Web using the Baileys library. Follow these steps to set it up:
Note: It’s best to use a separate phone number for OpenClaw so your personal chats stay separate from the bot’s activity.
OpenClaw also can connect to iMessage on macOS using the imsg library. To set it up:
Note: Your Mac should have Messages signed in and active. OpenClaw and imsg also need Full Disk Access (to read the Messages database) and Automation permission to send messages.
OpenClaw AI assistant is not secure by default. Its security depends on how it is configured, sandboxed, and managed by the developer. Let's look at how to secure OpenClaw AI on our own.
Because the AI agent can act on its own, a mistake in its reasoning – or manipulated input – could lead to unintended actions, such as sending incorrect messages, launching unnecessary processes, or even deleting files.
Plugins and integrations also require caution, since third-party modules may contain unsafe logic or hidden malicious code. If the AI agent platform processes external inputs like messages or API requests, attackers might try to influence its behavior through carefully crafted prompts.
It’s easy to use OpenClaw AI via a messaging app, but it also creates more ways for things to go wrong. Security researcher Jamison O'Reilly showed how serious the risks can be: he was able to access sensitive data such as Anthropic API keys, Telegram bot tokens, Slack accounts, long message histories, and even send messages as the user. In some cases, he could also run commands with administrator rights.
Besides, OpenClaw AI has ClawdHub, it's a public skills registry. “Skills” in this context means ready-made scenarios that extend the agent's capabilities. ClawdHub also has no moderation whatsoever, and instead of skills, it was loaded with a multitude of malicious codes.
If you have any doubts about OpenClaw, you can try Sigma Browser. Its AI agent has a closed code and strict monitoring of user privacy.
If you give OpenClaw AI assistant access to systems, data, or integrations, be sure to address your security concerns beforehand. To prevent leaks, you must adhere to certain rules:
Setting up an AI agent on your PC might sound technical, but the process is actually straightforward once you know the steps. In this OpenClaw installation guide, we’ll walk through what you need, how to install it, and how to get your first agent running.
Before installing OpenClaw, make sure you have:
git clone https://github.com/openclaw/openclaw.gitcd openclawnpm installCreate a .env file and add your API key there:
# Using the APIYI access point
OPENAI_API_KEY=your_key_here
OPENAI_BASE_URL=https://vip.apiyi.com/v1
# Or using ClaudeANTHROPIC_API_KEY=your_key_claude_herenpm run startThe initial setup of OpenClaw includes a handful of basic configuration choices that affect security, access, and integrations.
Security tip: For the first launch, use sandbox mode. Once you’re comfortable, you can gradually allow full system access.
To uninstall OpenClaw, you can use the built-in openclaw uninstall utility for interactive removal (with confirmations). For a complete, silent removal, use openclaw uninstall --all --yes. If the CLI is not installed, you can manually remove the gateway service.
Let’s look at how to delete gateway service from your macOS. You can remove it manually using several commands. The default label is bot.molt.gateway (or bot.molt.<profile>).
Base commands:
launchctl bootout gui/$UID/bot.molt.gateway ,
rm -f ~/Library/LaunchAgents/bot.molt.gateway.plist
Note: If profiles were used (--profile / OPENCLAW_PROFILE), you need to repeat step 3 for each state directory (default: ~/.openclaw-<profile>). In remote mode, the state directory is located on the gateway host, so steps 1-4 must also be executed there.
In this part of our guide you'll find how to manually disable and delete the gateway user service on Linux systems. Manual removal of the gateway service (default unit name – openclaw-gateway.service).
Base commands:
systemctl --user disable --now openclaw-gateway.service ,
rm -f ~/.config/systemd/user/openclaw-gateway.service ,
systemctl - -user daemon-reload
Note: If you installed OpenClaw in a Docker-based sandbox, you also need to remove any Docker images and containers associated with OpenClaw.
Here we'll tell you how to remove OpenClaw from Windows. Manual removal of the scheduled task (default task name – OpenClaw Gateway):
Commands:
schtasks /Delete /F /TN "OpenClaw Gateway" ,
Remove-Item -Force "$env:USERPROFILE\.openclaw\gateway.cmd"
If a profile was used, delete the corresponding task name and file ~\.openclaw-<profile>\gateway.cmd.
Note: The openclaw uninstall command removes the gateway service and local data, but keeps the CLI utility itself. To remove it as well, run the following after uninstalling: npm rm -g openclaw (for OpenClaw).