These resources are written by Freedom Lab members. Join our Freedom Lab server to be a part of the community and receive support directly.

ResourcesSetting Up OpenClaw

Setting Up OpenClaw: Your AI, Your Machine, Your Rules

Tutorial AI Privacy Open-source Self-hosting

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:

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:

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:

  1. 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.
  2. A Telegram account — free. This is how you'll talk to your agent.
  3. 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:

💎 Best option for effectiveness + cost efficiency: A Claude subscription token gives you access to the most capable model at a flat monthly rate. Just keep in mind the trade-off — Anthropic's terms of service don't explicitly allow using the token outside their platform.

🔀 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.

Our recommendation: Start with a cheap model through OpenRouter to get everything set up and working. Once you're comfortable, upgrade to Claude or GPT for better quality. If privacy is your top priority, go fully local with Ollama from the start.

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:

  1. Your AI model key — API key from whichever provider you chose above
  2. Brave Search API key (free) — lets your agent search the web. Sign up at brave.com/search/api. Takes two minutes.
  3. 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:

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:

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:

  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Pick a name (this is the display name)
  4. Pick a username (must end in "bot")
  5. 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:

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

Real Threats

This isn't hypothetical. In February 2026:

The five main threats: prompt injection, social engineering, data leakage, unauthorized actions, and supply chain attacks (malicious skills).

What You Should Do

Common Mistakes

Learn from the community's expensive lessons:

  1. Spaces in API keys. Copy-paste often adds a trailing space. Check for it. This causes HTTPS errors that look like something much worse.
  2. Running multiple agents before mastering one. One agent with proper configuration beats a squad of confused ones. Get one working well first.
  3. Skipping SOUL.md and USER.md. Your agent will sound generic until you fill these out. Night and day difference.
  4. Installing too many skills at once. Start clean. Add skills one at a time as you need them.
  5. Ignoring voice messages. Talking to your agent while you're on the move is a completely different experience. Set it up from day one.
  6. 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.
  7. 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:

The key mindset shift: every hour you invest in teaching your agent pays dividends permanently. It doesn't forget. It compounds. Make it yours.