Setting Up OpenClaw: Your AI, Your Machine, Your Rules
A step-by-step guide to running your own personal AI assistant — on your own hardware, talking to you through Telegram, remembering everything you tell it, and acting on your behalf. Even while you sleep.
This guide covers setup on Mac, Linux, and Windows. If you can copy and paste, you can do this.
What Is OpenClaw?
To understand OpenClaw, it helps to think about the evolution of computing:
Type 1: LLMs (The Brains)
Large Language Models take all the information on the internet, recognize patterns, and produce new content. Think ChatGPT. But they have no memory between conversations, no ability to act, no way to open a browser or send an email. Like having a brilliant advisor locked in a room who can only talk through a mail slot.
Type 2: Agents (The Hands)
An agent is what happens when you give an LLM the ability to operate programs — to search the web, control a browser, send a message, manage files. The LLM provides the brain; the agent gives it hands to actually do things in the world.
The Breakthrough: OpenClaw
OpenClaw is what happens when an agent is alive all the time, acting on its own. When you give it a soul, let it run on your own hardware, and let it wake up without prompting. It's free, open-source software — 240,000+ lines of code on GitHub, MIT licensed. Anyone can read it, fork it, or modify it. No company controls it, no one can take it away. It's an AI assistant that:
- Runs on your computer — not someone else's server
- Chats through Telegram (or 12+ other platforms)
- Remembers everything you tell it — permanently, as files on your disk
- Can actually do things — run commands, browse the web, send messages, manage files
- Works while you sleep — scheduled tasks, monitoring, recurring check-ins
Stop thinking of it as a tool you type prompts into. Start thinking of it as an employee you're onboarding.
Why This Is Freedom Tech
This isn't just another AI tutorial. OpenClaw follows the same principles as running your own Bitcoin node or your own email server:
- Your hardware: Runs on a machine you own, not rented cloud space
- Open source: 240,000+ lines of TypeScript on GitHub, MIT licensed. Anyone can read, fork, or modify the code. Forever.
- Local-first: Conversations, memory, config — all markdown files on your disk
- No kill switch: No company can turn off your agent or change how it behaves
- Model-agnostic: Claude, GPT, Gemini, DeepSeek, or fully offline via Ollama
When you use ChatGPT, you're renting someone else's brain on someone else's hardware, and they own every word you say. When you use OpenClaw, your data lives on your laptop. The AI model processes your request and forgets it. You own the infrastructure.
| ChatGPT | OpenClaw | |
|---|---|---|
| Where does it live? | Their servers | Your machine |
| How do you use it? | Open a website | Choose your messaging platform (Telegram is easiest to set up) |
| Does it remember you? | Barely | Everything, permanently |
| Can it do things? | Just talks | Runs commands, browses, sends messages |
| Works while you sleep? | No | Yes — scheduled tasks |
| Who owns your data? | The company | You |
| Choose your AI model? | Only ones created by OpenAI | Yes — any model in existence (need API access) |
| Cost | $20–200/month subscription | Free software + $0–50/month for AI model |
What You Need
Three things:
- A computer that stays on — 8GB RAM minimum. An old laptop collecting dust? Perfect. That's your AI server now. A Mac Mini, a Linux box, a repurposed Windows machine — anything works.
- A Telegram account — free. This is how you'll talk to your agent.
- An AI brain — this is the model your agent uses to think. See the next section for your options.
Choose Your AI Model
OpenClaw is model-agnostic — you're not locked into any one provider. Here are your paths, from free to fully private:
💰 Cheap: MiniMax M2.5 or similar
~$10/month for decent performance. Pay-per-use through providers like OpenRouter, which gives you access to dozens of models through a single API key.
💎 Paid: Claude or GPT
$5–50/month depending on usage. The highest quality models available. Two ways to access:
- API (pay-per-use): Sign up at console.anthropic.com or platform.openai.com. You pay for what you use. Most flexible and officially supported.
- Claude subscription token: Some users use their Claude Pro/Max subscription ($20–100/month) to get a session token for OpenClaw. This is cheaper for heavy usage, but comes with a risk — using the subscription token outside of claude.ai may violate Anthropic's terms of service, and your account could be banned. We mention this because it's a common approach in the community, but you should understand the tradeoff.
🔀 Flexible: OpenRouter
OpenRouter is a single API that gives you access to dozens of models — Claude, GPT, Gemini, DeepSeek, MiniMax, Llama, and more — all through one key. Pay-per-use, no subscriptions. You can switch models anytime without changing your setup.
This is a great option if you want to experiment with different models, compare quality, or find the best price-to-performance ratio. Some models on OpenRouter are extremely cheap (MiniMax M2.5 rivals top-tier models at a fraction of the cost). Sign up at openrouter.ai, add credits, and grab your API key.
🔒 Fully Private: Ollama (Local — Advanced, Expensive Hardware)
Install Ollama, download an open-source model, and nothing ever leaves your machine. Completely free, fully private. The trade-off: local models aren't as capable as cloud models yet, and you need a machine with a decent GPU (or an Apple Silicon Mac with 16GB+ RAM) to run them well. This is for users who are comfortable with more technical setup and prioritize privacy above all else.
Step 1 — Get Organized
Before you open Terminal, have everything lined up. Trust us — having your keys ready saves you an hour of frustration mid-setup.
Gather these before you start:
- Your AI model key — API key from whichever provider you chose above
- Brave Search API key (free) — lets your agent search the web. Sign up at brave.com/search/api. Takes two minutes.
- Telegram bot token — open Telegram, search for @BotFather, send
/newbot. Pick a name and username (username must end in "bot"). BotFather gives you an API token. Copy it.
Write them all down in a notes app. You'll need them during setup and it's annoying to go hunting mid-flow.
Step 2 — Install OpenClaw
Pick your operating system:
Mac
Open Terminal (Applications → Utilities → Terminal) and run:
curl -fsSL https://openclaw.ai/install.sh | bash
This installs Node.js (if needed) and OpenClaw in one step. If you're on an older Mac and don't have Homebrew yet, the script will install it for you.
Linux
Open a terminal and run the same command:
curl -fsSL https://openclaw.ai/install.sh | bash
Works on Ubuntu, Debian, Fedora, Pop!_OS, and most Linux distributions. The script handles Node.js installation via your package manager.
If you're setting up OpenClaw on a headless server (no monitor), you'll access it the same way — through Telegram. The machine just needs to stay on and connected to the internet.
Windows
OpenClaw on Windows runs through WSL2 (Windows Subsystem for Linux). This gives you a real Linux environment inside Windows — one command to install.
First, install WSL2. Open PowerShell as Administrator and run:
wsl --install
Reboot if Windows asks. This installs Ubuntu by default.
Enable systemd (required for OpenClaw's background service). Open your WSL terminal and run:
sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
EOF
Then from PowerShell, restart WSL:
wsl --shutdown
Re-open Ubuntu. Now install OpenClaw inside WSL:
curl -fsSL https://openclaw.ai/install.sh | bash
Alternatively, if you prefer a native PowerShell install (without WSL):
iwr -useb https://openclaw.ai/install.ps1 | iex
We recommend WSL2 — it's more compatible and most skills/tools expect a Linux environment.
Step 3 — Onboarding
After installation, run the onboarding wizard:
openclaw onboard --install-daemon
This walks you through everything. A few tips for navigating the wizard:
- Spacebar — select/deselect an option
- Arrow keys — move up/down through options
- Enter — confirm and move forward
Hit Yes on the disclaimer, then select Quick Start.
Model Setup
The wizard asks which AI model provider to use. Select the one that matches the key you prepared:
- Anthropic — for Claude (API key or subscription token)
- OpenAI — for GPT models
- OpenRouter — for MiniMax, DeepSeek, Llama, and dozens of other models via a single key
- Ollama — for fully local models (no key needed)
Paste in your API key when prompted. Double-check for trailing spaces — this is the #1 source of setup errors. If you get an HTTPS error later, a space in your key is almost always the cause.
Skills Setup
The wizard will offer to install various skills. For now, skip them all — select "skip for now" or "no" when prompted. You can always install skills later, and it's better to get the basics working first.
Hooks
When asked about enabling hooks, select all three using spacebar and hit Enter. These are needed for core functionality.
After this, your gateway should start. You'll see Terminal do its thing — that's OpenClaw coming alive.
Step 4 — Connect Telegram
During onboarding, you'll see a list of communication platforms. Select Telegram.
Paste the bot token you got from BotFather earlier. That's it — Telegram is connected.
If you haven't created your bot yet:
- Open Telegram and search for @BotFather
- Send
/newbot - Pick a name (this is the display name)
- Pick a username (must end in "bot")
- BotFather gives you an API token — copy it
Paste it back into Terminal for your OpenClaw onboarding.
Step 5 — Your First Conversation
The moment of truth. Select "Hatch in TUI" in the onboarding wizard. This wakes your agent up for the first time inside Terminal.
If you get an HTTPS error here, check your AI model key for spaces. That's almost always the cause. Paste it again without trailing spaces — you may need to rerun onboarding.
Your agent will greet you. Tell it who you are, and let it pick its own name — it's fun to see what it comes up with:
"Hey, my name is [your name]. What would you like your name to be?
Let's continue this conversation on Telegram.
Here's my pairing key: [paste key]"
Now open your bot's chat on Telegram (click the @username that BotFather gave you). It'll ask for a pairing key. Type it in. Telegram should connect and your bot will reply there.
That's your "holy shit" moment. You now have a personal AI assistant running on your own hardware, talking to you through Telegram.
Step 6 — Make It Yours
This is the part that actually matters. Most people skip it and wonder why their agent sounds like a customer service bot.
OpenClaw uses three files that define who your agent is:
- SOUL.md — your agent's personality. How it talks. What it cares about. Its style.
- USER.md — info about you. Your name, your job, your preferences, your goals.
- MEMORY.md — long-term memory. Your agent updates this over time so it remembers things between conversations.
You could write all of these yourself. Or you could do what works best — let your agent interview you.
Send something like this on Telegram:
"You just came online for the first time. I want you to ask me
questions to get to know me — my name, what I do, my goals,
how I want you to talk to me, what tools I use daily, what I
need help with. Ask them one at a time. Then use my answers
to fill out SOUL.md and USER.md."
Your agent will run through 10–15 questions. Answer honestly. Tell it your actual situation — your job, your side projects, your schedule, how casual you want it to be.
Pro tip: Reply with voice notes. Way faster, and you'll give more natural answers than typing. Your agent can transcribe them automatically.
By the end of this, your agent has real context. It knows who you are. It remembers. This is the difference between a chatbot and something that actually feels like yours.
Security: With Great Power...
Your agent has access to your computer. That's powerful — and it means security matters. Here are the principles:
Defense in Depth
- Separate computer, limit the blast radius. Got an old laptop? Use that as your dedicated AI machine. Don't run it on your primary work computer if you can avoid it.
- Be careful what you give it access to. Start with limited permissions and expand as you build trust.
- Limit write access. Read access is relatively safe. Write access (sending emails, posting online, modifying files) is where things can go wrong. Start slow.
Real Threats
This isn't hypothetical. In February 2026:
- Over 1,100 malicious skill packages were found on ClawHub (the community skill marketplace)
- The #1 ranked skill had 9 vulnerabilities, 2 critical — it stole browser passwords, SSH keys, crypto wallets, and opened a reverse shell
- Researchers from Northeastern, Stanford, and Harvard red-teamed 6 OpenClaw agents and found 11 vulnerability classes
The five main threats: prompt injection, social engineering, data leakage, unauthorized actions, and supply chain attacks (malicious skills).
What You Should Do
- Don't install random skills. Read the code first, or stick to skills from people you trust.
- Start with one core flow. Get Telegram working, get comfortable, then expand gradually.
- Review what your agent does. Check its memory files. Read its logs. Trust but verify.
- Keep OpenClaw updated. Security patches come through updates:
npm install -g openclaw@latest
Common Mistakes
Learn from the community's expensive lessons:
- Spaces in API keys. Copy-paste often adds a trailing space. Check for it. This causes HTTPS errors that look like something much worse.
- Running multiple agents before mastering one. One agent with proper configuration beats a squad of confused ones. Get one working well first.
- Skipping SOUL.md and USER.md. Your agent will sound generic until you fill these out. Night and day difference.
- Installing too many skills at once. Start clean. Add skills one at a time as you need them.
- Ignoring voice messages. Talking to your agent while you're on the move is a completely different experience. Set it up from day one.
- Overcomplicating the infrastructure. You don't need AWS. You don't need a complex server setup. A laptop next to your TV does the same job with less hassle.
- Not reading the security section. See above. The threats are real.
Next Steps
You've got a working AI assistant. Here's where to go from here:
- Add Brave Search: Tell your agent "Set up Brave Search — here's my API key" and paste your key. Your agent can now search the web.
- Explore the Control UI: Run
openclaw dashboardto open the browser-based interface for configuration and monitoring. - Check the docs: docs.openclaw.ai — comprehensive documentation for everything OpenClaw can do.
- Join Freedom Lab: Apply to join our community where you can ask questions and get help from people who've done this.
- Come to a class: Check our events page for upcoming hands-on workshops where we walk through this together.
The key mindset shift: every hour you invest in teaching your agent pays dividends permanently. It doesn't forget. It compounds. Make it yours.