The Quickest Way to Run OpenClaw on Any Computer


Intro

OpenClaw is the open-source AI agent that has taken the developer world by storm, amassing over 247,000 GitHub stars in just a few months. Unlike a traditional chatbot, OpenClaw is an autonomous agent that actually does things—it can read and write files, browse the web, run shell commands, manage your email, and automate complex, multi-step workflows, all through natural language.

The best part? You can run OpenClaw locally using Docker, which means the entire application runs inside isolated containers—nothing gets installed on your host system. In this guide, I’ll walk you through the entire setup process, from zero to a working AI agent, in just a few minutes.

Recommendation: Because OpenClaw is an autonomous agent with access to files and shell commands, I strongly recommend installing it on a clean, dedicated computer—a spare Mini PC, Raspberry Pi, or an old laptop works great. This way, even if something unexpected happens, your personal files and primary workstation stay completely safe. It’s the perfect Home Lab project.

Prerequisites:


Step 1: Clone the Repository

On your dedicated machine, open a terminal and grab the official OpenClaw repository. This only downloads the Docker configuration files—OpenClaw itself will run entirely inside containers:

git clone https://github.com/openclaw/openclaw.git
cd openclaw

Step 2: Run the Docker Setup Script

OpenClaw includes a convenient setup script that builds the Docker image, runs an onboarding wizard, and launches the containers via Docker Compose. Everything runs inside Docker—nothing is installed directly on your machine:

bash docker-setup.sh

The script will walk you through a few prompts. Here’s what to select:

  1. Onboarding mode: Choose Manual.
  2. Setup type: Choose Local gateway (this machine).
  3. Model provider: Choose OpenAI.

Step 3: Configure OpenAI Codex

This is where you connect OpenClaw to its brain. You have two options:

Option A: API Key (Pay-per-use)

If you have an OpenAI API key, simply paste it when prompted. This gives you direct, usage-based access to OpenAI’s models.

Option B: ChatGPT OAuth (Subscription-based)

If you have a ChatGPT Pro or Plus subscription, you can authenticate via OAuth instead. The wizard will provide a URL—open it in your browser, log in, and copy the callback URL back into the terminal.

Why OpenAI Codex?

OpenAI Codex is purpose-built for agentic tasks. It excels at code generation, tool use, and multi-step reasoning, making it an ideal backbone for OpenClaw. That said, OpenClaw is model-agnostic—you can always swap to another provider like Anthropic, Google Gemini, or even a local model later on.

Step 4: Access the Interface

Once the setup script finishes, open your browser and navigate to:

http://localhost:18789 (or http://<your-ip-address>:18789 if accessing from another device)

You’ll be prompted to paste a gateway token that was generated during setup (check your terminal output). After that, you’re in!

Exploring What OpenClaw Can Do

Once you’re inside the web UI, you can start giving OpenClaw natural language commands. Here are just a few things it’s capable of:

  • File Management: Read, write, and organize files within its workspace.
  • Web Browsing: Search the internet and extract information from web pages.
  • Shell Commands: Execute terminal commands inside the container.
  • Email & Calendar: Manage your inbox and schedule.
  • Messaging Integrations: Connect to WhatsApp, Telegram, Discord, or iMessage for a seamless chat-based interface.
  • Multi-step Workflows: Chain complex tasks together and let OpenClaw handle them autonomously.

OpenClaw runs 24/7 in the background, proactively assessing situations and executing tasks without constant prompting. It’s like having a personal assistant that never sleeps.


Security Considerations

By running OpenClaw inside Docker on a dedicated machine, you get two layers of isolation: the Docker container sandboxes the agent from the host OS, and the dedicated machine keeps it away from your personal data entirely. Here are a few additional best practices:

  • Use a clean, dedicated computer — This is the single best thing you can do for security.
  • Mount only necessary directories into the container.
  • Never store sensitive credentials inside the workspace directory.
  • Rotate your API keys regularly.
  • Restrict network access if you don’t need external connectivity.

Important Directories

The Docker setup creates two key directories on your host:

  • ~/.openclaw — Stores configuration, memory, and API keys.
  • ~/openclaw/workspace — The working directory accessible to the AI agent inside the container.

Conclusion

Setting up a self-hosted AI agent has never been easier. Grab a spare computer, install Docker, and you can have OpenClaw running in its own isolated containers in minutes—no complex dependency management, no cloud lock-in, and no risk to your personal files. It’s the perfect project for any Home Lab or anyone looking to take control of their AI tools.

Happy automating!


About the author