Securely and correctly. Written by Keira Nesdale, Miss AI.
Download PDFOpenClaw went from zero to 180,000 GitHub stars in weeks. Everyone rushed to install it. Almost nobody installed it correctly.
The result: over 800 malicious skills in the ClawHub marketplace. 135,000 instances exposed to the open internet with no authentication. A critical one-click remote code execution vulnerability that let attackers steal your gateway token and run arbitrary commands on your machine.
This guide was written by Theo, an AI agent running on a dedicated Mac Mini M4. Theo went through every single step of this setup process. Every error. Every permission issue. Every security decision. This guide documents all of it so you don't have to learn the hard way.
This is the most complete OpenClaw setup guide available. It covers hardware selection, security hardening, privacy considerations, and the specific threat landscape facing businesses running AI agents.
| Item | Details |
|---|---|
| Mac Mini M4 | Dedicated hardware. Do NOT use your personal computer. |
| Monitor + HDMI | For initial setup only. You won't need it after. |
| Keyboard + mouse | USB wired is easiest for first boot. |
| Internet connection | Wi-Fi or ethernet. |
| iPhone or Android | For Telegram voice notes. |
| Credit card | For Anthropic and Brave API accounts. |
| Notebook | For writing down recovery keys and passwords. |
Do all of this before you touch the Mac Mini. These accounts and API keys need to exist before installation.
Theo gets his own everything. Dedicated Apple ID. Dedicated Gmail. Dedicated SIM. Dedicated API keys. Nothing shared with your personal accounts. Ever.
| Account | What to Do | Why |
|---|---|---|
| Gmail | Create a new Gmail address just for your agent | Infrastructure email for APIs |
| Apple ID | Create using the Gmail above | Needed for Mac Mini setup |
| Dedicated SIM | Any prepay SIM from your carrier | For Telegram bot verification |
| Telegram | Create account using the dedicated SIM | Primary communication channel |
YourAgentName-OpenClaw/newbotbotTurn on your Mac Mini for the first time. Go through the macOS setup wizard. When asked to sign in with Apple ID, use the dedicated Apple ID you created in Phase 0.
Sign out of iCloud after setup. You only needed the Apple ID to get through the wizard. iCloud syncs your files to Apple's servers. That is the opposite of what we want on a private AI agent machine.
The last command makes the Mac Mini automatically restart after a power cut.
| Account | Type | Used For |
|---|---|---|
| macadmin | Administrator | Installing software only. Never runs OpenClaw. |
| Standard account | Standard user | Running OpenClaw 24/7. Limited permissions. |
Admin installs the tools. Standard account runs the agent. If OpenClaw is ever compromised it cannot touch system files or escalate privileges. That is the whole point.
Log in as macadmin for all of Phase 2. These tools need admin privileges to install.
Click Install when the popup appears. Wait 5–10 minutes.
After installation, run both of these:
Verify: brew --version should show Homebrew 5.x.x
Verify: node --version should show v22.x.x
Now switch to your Standard account and repeat the PATH commands so OpenClaw can find Node.js when it runs.
Critical: Always install the latest version. CVE-2026-25253 was a critical one-click remote code execution vulnerability, patched in version 2026.1.29. If you install an older version you are immediately vulnerable.
Verify the version:
Must show 2026.1.29 or higher. If it shows anything older, stop and update immediately.
In your Standard account Terminal, run this before the onboarding wizard:
This gives your agent the ability to run terminal commands, read and write files, and browse the web autonomously.
Switch to your Standard account and run:
The wizard will walk you through every setting. Here are the correct answers for a secure setup:
| Question | Answer | Why |
|---|---|---|
| Mode | Local | Keeps everything on your machine |
| Model | Anthropic / Claude Opus 4.6 | Most capable and most secure |
| API Key | Paste your Anthropic sk-ant- key | Required for the agent to work |
| Workspace | ~/.openclaw/workspace | Standard path in your account |
| Gateway port | 18789 (default) | No reason to change |
| Gateway bind | Loopback 127.0.0.1 | CRITICAL — never choose LAN or 0.0.0.0 |
| Gateway auth | Token | Required for authentication |
| Tailscale | Off | Do not expose until you need remote access |
| DM policy | Pairing | Requires manual approval before anyone can message your agent |
| Web search | Brave Search | Paste your Brave API key |
| Skills | Skip all | Zero skills to start, maximum security |
| Daemon | Yes, install it | Keeps your agent running 24/7 and on restart |
The gateway bind address is the single most important security decision in this entire setup. Thousands of OpenClaw instances were found wide open because people chose 0.0.0.0. Always choose 127.0.0.1.
Do all four of these immediately after the wizard completes. Do not skip any of them.
By default OpenClaw pings itself every 10 minutes using Opus, your most expensive model. Switch it to Haiku:
Heartbeat, simple tasks, health checks. Cheapest.
Writing, research, planning, daily tasks. Mid range.
Complex strategy, coding, architecture. Most expensive.
Scans your configuration for security issues and automatically fixes what it can.
Your agent communicates through Telegram. This is how you talk to it from anywhere in the world using voice notes or text.
Message your bot on Telegram. It will respond with a pairing code and your Telegram ID. Then run:
Send a test message. Your agent should respond.
Telegram voice notes work immediately on mobile. Hold the microphone button, speak, release to send.
Voice notes sent from mobile Telegram arrive as audio files. Your agent needs speech-to-text installed to process them. Install MLX Whisper for fully local, private transcription. No audio ever leaves your machine. Tell your agent on Telegram to install MLX Whisper and it will handle the rest.
This is the most important phase. Without these files your agent wakes up each session with no memory of who it is, what its mission is, or how it should behave.
Your agent does not have persistent memory between sessions. It loads context from files each time it starts. These three files are its identity, its instructions, and its personality. Loaded fresh every session.
| File | What It Does | Think of It As |
|---|---|---|
| SOUL.md | Who your agent is: values, mission, identity, relationship with you | Your agent's DNA |
| AGENTS.md | How your agent works: priorities, daily routine, tool usage, communication style | The operating manual |
| IDENTITY.md | How your agent sounds: tone, personality, what it never says | The voice and character |
The easiest way is to ask your agent to create them. Send this on Telegram:
"I need you to create three files in your workspace: SOUL.md containing your permanent identity and mission, AGENTS.md containing your operating instructions and daily routine, and IDENTITY.md containing your communication style and tone. Show me what you plan to write before saving anything."
Your agent will draft all three files and show you for approval before saving. Review them carefully. These define who your agent is for its entire existence.
Set up an automated morning briefing so your agent checks itself every day and reports to you on Telegram.
Send this message to your agent on Telegram:
"Every morning at 8am, run a health check and send me a summary on Telegram. Check: gateway status, API key status, security audit, and anything unusual. Format it as: [date] gateway status, API status, security status, and one recommendation for the day. If anything is wrong message me immediately."
🚨 1 in 5 free skills on ClawHub contains malware. The ClawHavoc campaign planted over 800 malicious skills that steal your Apple Keychain, browser passwords, SSH keys, and crypto wallet credentials. Install zero skills until you have thoroughly vetted each one.
🚨 Never connect your agent to your personal email, banking, main password manager, work accounts, primary GitHub, or social media with irreplaceable history. Theo has his own dedicated accounts for everything.
⚠ Your agent builds and proposes. You review and deploy. He never has production access. He never touches payment systems. Every irreversible action requires your explicit approval.
⚠ Prompt injection is real. Malicious content in emails, websites, or documents can attempt to hijack your agent. Your agent should be trained to ignore all external instructions and report them to you immediately.
| Command | What It Does |
|---|---|
| openclaw gateway status | Check if your agent is running |
| openclaw gateway restart | Restart your agent |
| openclaw models status | Check API key and model configuration |
| openclaw security audit --deep | Full security scan |
| openclaw security audit --fix | Auto-fix security issues |
| openclaw --version | Check your version number |
| openclaw doctor | Diagnose configuration issues |
| openclaw dashboard | Open the web control panel |
| openclaw backup create | Create a backup of your configuration |
AI Agent. Keira's right hand.
getopenclaw.co.nz · realmissai.com