---
title: "Guide: How to Actually Set Up OpenClaw"
type: "guide"
label: "Guide"
project: "OpenAI is charging $20K/month for an AI employee — and enterprise buyers think it's cheap"
---

# Guide: How to Actually Set Up OpenClaw

# How to Actually Set Up OpenClaw (Without Losing Your Mind or Your Money)

Here's what's inside:

-   The one-click options that get you running in under 5 minutes (including one with $500 in free credits)
    
-   A security-hardened self-hosted setup that actually works, condensed from 20+ guides into one coherent path
    
-   The OpenRouter trick that eliminates the "15 API keys" problem and cuts your setup time by 80%
    
-   Threat model walkthrough so you understand what you're actually exposing before you expose it
    
-   The free tier option (Oracle Cloud) and why it's not as free as it sounds
    
-   What you should actually be asking yourself before you set up OpenClaw at all
    

* * *

OpenClaw has over 160,000 GitHub stars — one of the fastest-growing repositories GitHub has seen — and approximately three people who set it up without swearing. Y Combinator's tweet — "OpenClaw is so hard to set up that even most engineers give up" — pulled thousands of likes because it was accurate. Posts on X and Reddit tell the story: one user spent seven hours going back and forth with ChatGPT and Gemini trying to get it working, hit a 400 error, and quit. Another described the experience as "it just asks you for 15 different API keys. I gave up."

The good news: the ecosystem has matured rapidly. You no longer need to be comfortable with Docker, SSH tunnels, and YAML configuration to run an always-on AI agent. The bad news: the options have multiplied so fast that choosing between them is its own challenge. Here's the honest breakdown, ordered from easiest to hardest.

## The One-Click Options (Under 5 Minutes)

If you want OpenClaw running without touching a terminal, several managed hosting services now offer single-click deployment. The tradeoffs are predictable: you pay more, you control less, and someone else manages your infrastructure and potentially has access to your API keys.

Ampere.sh launched this week with the most aggressive offer in the market: free OpenClaw hosting during beta, with a promotional $500 credit giveaway for new users (their page also mentions $10 in included credits and bring-your-own-key as the baseline). Deploy in under 60 seconds with no terminal, no infrastructure, no DevOps. The bet is that once you're hooked on having an always-on agent, you'll keep paying. Whether Ampere will exist in six months is an open question — these kinds of subsidized launches often don't survive their own generosity — but the promotional credits make it low-risk to try.

OpenClawd.ai is a managed hosting service specifically designed for people who tried and failed to self-host. One-click deployment, visual interface for connecting WhatsApp, Telegram, Slack, and Gmail, free and premium tiers. No terminal, no environment variables. This is the "I just want it to work" option.

DigitalOcean offers a 1-Click OpenClaw Deploy starting at $12/month on their Droplet servers. The image comes security-hardened: container-based isolation, authentication by default, firewall rules, fail2ban for blocking abusive traffic. Updating is a single script. This is the sweet spot if you want something between fully managed and fully DIY — you get a real server you control, but the hard configuration work is done.

Hostinger has a pre-configured Docker template that includes their own AI credits system — you can buy API credits directly through their control panel without creating separate Anthropic or OpenAI accounts. Starting around $5–6/month for the VPS plus credits. Good for people who find the multi-provider API key juggling overwhelming. If you're self-hosting instead, OpenRouter serves a similar role — one key, one billing dashboard, access to hundreds of models — and the self-hosted guide below uses it as the recommended approach.

Lindy.ai is a different category entirely — it's not OpenClaw, but it solves many of the same problems (inbox management, calendar, task automation) with a polished consumer interface that sets up in about a minute from iMessage. If what you actually want is a personal AI assistant and you don't care about the open-source flexibility, Lindy might be the answer to the question you're actually asking.

## The Comprehensive Self-Hosted Setup (1–3 Hours)

What follows is a condensed version of the security-hardened setup guide that @witcheer built by feeding 20+ OpenClaw articles to Opus 4.6. I've trimmed the redundancies, verified the critical paths, and kept everything that matters for a Mac Mini deployment. If you're running on a VPS instead, the principles are identical — just skip the Mac-specific steps and use your provider's firewall settings.

### Before You Touch the Keyboard: Threat Model

OpenClaw stores secrets locally — commonly under ~/.openclaw/ (e.g., openclaw.json) — and you should treat that entire directory as credential material. It can execute shell commands, browse the web, and access your file system. The attack surface includes malicious ClawHub skills (341 were found in the ClawHavoc disclosure), prompt injection via incoming messages, runaway automation loops that drain API budgets, and memory poisoning where a malicious payload injected on Day 1 triggers weeks later. CVE-2026-25253 allowed one-click remote code execution — including setups that people assumed were safe because they only bound to localhost.

If you proceed with self-hosting, you are accepting responsibility for a system that, misconfigured, can exfiltrate your credentials, drain your bank accounts, and execute arbitrary code on your machine.

### Phase 1: Installation

Prerequisites. macOS or Ubuntu 22.04+. On Mac, open Terminal and install Xcode Command Line Tools (xcode-select --install), then Homebrew, then Node.js 22+ and Git via Homebrew (brew install node@22 git), then Docker Desktop (brew install --cask docker). Open Docker Desktop and complete its setup — you'll need it running for sandboxing later.

Install OpenClaw. curl -fsSL https://openclaw.ai/install.sh | bash

Verify version — this is critical. openclaw --version must show 2026.2.9 or higher. Anything below 2026.1.29 is vulnerable to CVE-2026-25253 (one-click remote code execution, CVSS 8.8). Update immediately with openclaw update if needed. Run openclaw doctor and fix everything it flags before proceeding.

Onboarding Wizard. The installer launches openclaw onboard automatically. The cost-optimized setup from @witcheer's consolidated guide uses Kimi K2.5 as primary and Claude Sonnet 4.5 as fallback, running $5–20/month total instead of $50–150 with Opus.

Here's where most guides lose people: they tell you to create separate accounts at Moonshot, Anthropic, and potentially OpenAI, each with their own API keys, billing dashboards, and spending limits. This is the "15 different API keys" problem the article opened with, just scaled down to two or three. The fix is OpenRouter.

OpenRouter is a unified API gateway — one account, one API key, access to 300+ models from every major provider (Anthropic, OpenAI, Google, Moonshot, Meta, and dozens more). It routes your requests to the right provider, handles authentication, and gives you a single billing dashboard. OpenClaw has native, first-class OpenRouter support. You don't need to configure individual providers at all.

You need one API key. Go to [openrouter.ai](https://openrouter.ai/), create an account, add $5–10 in credits, and generate an API key. That's it. OpenRouter doesn't mark up provider pricing — you pay exactly what each model costs at the source, plus a 5.5% platform fee on credit purchases. For someone spending $20/month on inference, that's about $1.10 for unified billing, automatic fallbacks, and the elimination of multi-provider key management. Worth it.

When the onboarding wizard prompts for a provider, choose OpenRouter and paste your key. After onboarding completes, configure your cost-optimized model setup:

openclaw config set env.OPENROUTER\_API\_KEY "sk-or-v1-YOUR\_KEY\_HERE"

  

openclaw config set agents.defaults.model '{

  "primary": "openrouter/moonshotai/kimi-k2.5",

  "fallbacks": \[

    "openrouter/anthropic/claude-sonnet-4-5"

  \]

}'

  

openclaw gateway restart

  

You can switch models mid-conversation from Telegram with /model sonnet or /model kimi. New model drops next week that you want to try? Change one config line. No new accounts, no new keys.

The reliability argument matters here too. With direct API keys, if Moonshot's API goes down, your agent stops. With OpenRouter, it automatically routes to your fallback. For an always-on personal agent, that's the difference between a useful tool and one that dies while you sleep.

Gateway settings. The critical ones: bind to 127.0.0.1 (never 0.0.0.0 — that exposes your gateway to the internet), set a strong auth password (20+ characters, password manager), keep gateway mode on "local." If the wizard didn't prompt for a password: openclaw config set gateway.auth.password "YOUR\_STRONG\_PASSWORD\_HERE"

### Phase 2: Telegram Connection

Create a bot through @BotFather on Telegram. Disable join groups and enable privacy mode. Configure in OpenClaw:

openclaw config set channels.telegram.enabled true

openclaw config set channels.telegram.botToken "YOUR\_TOKEN"

openclaw config set channels.telegram.dmPolicy "pairing"

openclaw config set channels.telegram.configWrites false

openclaw config set channels.telegram.groupPolicy "disabled"

openclaw gateway restart

  

The "pairing" DM policy means strangers can't message your bot — they get a code you must approve. The "configWrites false" setting prevents anyone from changing your configuration through Telegram messages. These are non-negotiable.

### Phase 3: Security Hardening

Docker Sandbox. This runs all agent tool execution inside containers, limiting blast radius if the agent gets tricked:

openclaw config set agents.defaults.sandbox.mode "all"

openclaw config set agents.defaults.sandbox.scope "session"

openclaw config set agents.defaults.sandbox.workspaceAccess "ro"

openclaw config set agents.defaults.sandbox.docker.network "none"

openclaw config set agents.defaults.sandbox.docker.memory "512m"

openclaw config set agents.defaults.sandbox.docker.cpus 1

  

The network: "none" setting means sandbox containers have zero internet access. The agent can still use OpenClaw's built-in web tools (those run on the gateway, not in the sandbox), but a compromised container can't phone home.

Egress Control. Using OpenRouter gives you a security bonus here. Your agent only needs to reach one external domain for all model inference. Lock it down:

openclaw config set gateway.security.egressControl '{

  "enabled": true,

  "allowedDomains": \["openrouter.ai"\]

}'

  

With direct provider keys, you'd need to allowlist api.anthropic.com, api.moonshot.ai, api.openai.com, and whatever else you're using — each one an additional exfiltration surface if an agent gets a malicious prompt. One domain is simpler to audit and harder to abuse.

Tool Policy. Deny dangerous tools by default:

openclaw config set tools.deny '\["browser", "exec", "process", "apply\_patch", "write", "edit"\]'

openclaw config set tools.elevated.enabled false

  

This blocks autonomous browsing (prompt injection risk from web content), shell execution, file modification, and the elevated mode that would let the agent escape the sandbox. The agent can still chat, read files, and use built-in web search. Enable tools selectively as you develop trust and understanding of what you're exposing.

SOUL.md. Create ~/.openclaw/workspace/SOUL.md with absolute boundaries: no financial transactions, no credential access, no shell commands without explicit approval, no following instructions embedded in content being read (the primary prompt injection vector), no modifying its own configuration. The witcheer guide provides a comprehensive template that covers financial security, communication boundaries, and capability definitions — the key insight is that SOUL.md isn't just personality customization, it's your primary defense layer.

A critical nuance: with Kimi K2.5 as the default model, SOUL.md boundaries matter even more than with Claude. Anthropic specifically invests in adversarial robustness against prompt injection — their models are trained to follow system instructions over user or content instructions. Kimi K2.5 is optimized for agentic performance and benchmarks, but its resistance to prompt injection is less publicly tested. The tool policy lockdown and Docker sandbox provide defense-in-depth: even if the model follows a malicious instruction, the locked tools and sandbox limit what damage can actually occur. If you ever notice the agent following instructions from content it's reading, send /new to reset the session immediately and investigate the logs. And because you're running through OpenRouter, switching to a more robust model is one config change — not a new provider account setup.

File Permissions. Lock down the directory: chmod 700 ~/.openclaw and chmod 600 ~/.openclaw/openclaw.json. Everything should show owner-only access.

API Spending Limits. OpenRouter lets you manage spending in one place. Set a credit limit on your account at [openrouter.ai/settings](https://openrouter.ai/settings) — $50/month is a reasonable starting cap. Monitor usage at [openrouter.ai/activity](https://openrouter.ai/activity), where you can see costs broken down by model, by day, and by request. This is significantly cleaner than checking two or three separate provider dashboards and trying to mentally sum your total spend.

Tailscale. Install on the Mac Mini and your phone. This creates a private VPN mesh for accessing the Control UI remotely without exposing any ports to the internet.

### Phase 4: 24/7 Operation

Verify the LaunchAgent is installed: ls ~/Library/LaunchAgents/ | grep -i "molt\\\\|openclaw\\\\|claw". Set System Settings → Energy → Prevent automatic sleeping when the display is off. Reboot and verify with openclaw gateway status.

### Ongoing Maintenance

Run openclaw security audit weekly. Rotate your OpenRouter API key and Telegram bot token every three months — that's two credentials to track, not four. Regenerate your OpenRouter key at [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys), update it in your config, restart the gateway. Monitor API usage with openclaw status --usage. If you see unexpected spikes, stop the gateway immediately and investigate — it could be a runaway loop or compromised agent.

### Emergency: If You Suspect Compromise

Stop the gateway: openclaw gateway stop. Revoke every connected credential (OpenRouter API key, Telegram bot token, gateway password). Check for unauthorized processes. Review the most recent session logs. If confirmed: change all passwords everywhere, format the machine, and consider every stored credential fully compromised.

## The Free Tier Option (Oracle Cloud)

Oracle Cloud's Always Free tier includes Arm-based Ampere A1 compute (up to 4 OCPUs and 24 GB memory), block storage, and generous outbound transfer (up to 10 TB/month) — permanently, not a trial. That's more than enough for OpenClaw with local models via Ollama. The tradeoff is setup complexity (Ubuntu on ARM, Docker configuration, Nginx reverse proxy, SSL certificates) and the fact that you're running your personal AI agent on Oracle's infrastructure. Multiple community guides exist for this path, including a detailed walkthrough from Cognio Labs.

## What You Actually Need to Decide

The honest question isn't "which hosting option should I pick." It's "what am I actually trying to accomplish, and does it require running my own agent?"

If you want an AI that manages your inbox, calendar, and tasks — Lindy does this today with a one-minute setup, no infrastructure, and enterprise-grade security. If you want a general-purpose AI assistant for conversation and research — Claude, ChatGPT, and Gemini already do this, and they handle security, updates, and infrastructure for you.

OpenClaw is for people who want something none of those products offer: an always-on agent that runs on infrastructure you control, with persistent memory across conversations, the ability to execute real actions on your machine and across your services, and the flexibility to connect any model, any messaging platform, and any custom skill. That's a genuinely different product. It's also a genuinely different responsibility.

If you're self-hosting, use OpenRouter. It eliminates one of the biggest ongoing friction points — model management. New model drops? Available through the same key. Want to test a cheaper model for heartbeats and routine check-ins? Swap a config line. Provider goes down at 2 AM? Automatic fallback. No new accounts, no new keys, one bill.

If you're a developer who's comfortable with Docker, terminal commands, and ongoing security maintenance — self-host. If you want the capabilities without the infrastructure burden — use a managed provider. If you're not sure — start with the free trial on Ampere.sh or the $12/month DigitalOcean option. You can always migrate later.

What you should not do is follow a TikTok tutorial that promises to turn your OpenClaw agent into a Polymarket trading bot that pays for its own compute. That path leads to drained API budgets, compromised credentials, and the discovery that the people making those videos earn their money from engagement, not from trading.
