← Back to tutorials

Build Your First Private AI Assistant with OpenClaw in 5 Minutes

A Complete Tutorial from Installation to Your First Conversation

Build Your First Private AI Assistant with OpenClaw in 5 Minutes

OpenClaw is an open-source personal AI assistant/agent framework: it runs on your own machine, connects to the model of your choice (cloud API or local model), and uses tools to actually execute tasks—read/write files, search the web, run commands—not just chat. This guide gets you up and running from scratch, and explains the right way to use a "private assistant" along with security boundaries.

1. Prerequisites

  • System: macOS / Linux / Windows (WSL2)
  • Choose one: Docker (easiest) or Node.js 18+
  • A model source: any mainstream cloud API key, or local Ollama (fully offline)
  • 2. Launch (Docker Recommended)

    bash
    docker pull openclaw/openclaw:latest
    docker run -d --name openclaw \
      -p 3000:3000 \
      -v ~/openclaw-data:/data \
      -e LLM_API_KEY=YourKey \
      openclaw/openclaw:latest
    

    Open localhost:3000 to enter the configuration wizard: select model provider, authorize tool scope (start with only file reading and web search—see security section below), set working directory. The exact image name and environment variables depend on the official README—open-source projects iterate quickly; this article describes the general form.

    To connect local Ollama: point the model endpoint to http://host.docker.internal:11434, select a local model—data never leaves your machine, which is the core value of open-source self-hosted assistants compared to cloud-based ones.

    3. Your First Truly Useful Tasks

    The right way to use a private assistant is not for chit-chat, but to give it context from your machine + executable tools:

  • File Manager: "Archive PDFs in the download folder by year into ~/Documents/Invoices/"—it lists the plan, you confirm, then it executes.
  • Local Knowledge Q&A: Authorize your notes/project docs directory, "What were the payment terms we discussed with the supplier last time?"
  • Daily Brief: Scheduled task—fetch your RSS feeds/web pages, generate a morning brief saved to your notes directory.
  • Light Automation: "Every Friday, compile this week's git commit log into a weekly report draft."
  • These tasks share common traits: repetitive, clear output, reversible errors—the sweet spot for agents. For designing complex multi-step tasks, refer to Agent State Machine Pattern.

    4. Security Boundaries (Essential for Self-Hosted Assistants)

    Giving AI execution power is a double-edged sword. Three rules:

  • Start with least privilege: Only enable read-only tools first (read files, search). Once comfortable, gradually enable write/execute—don't give full shell access on day one.
  • Confirm dangerous actions: Keep delete, overwrite, and external-send operations in "show plan first, human confirms before execution" mode (Approval Gate Pattern).
  • Isolate working directory: Limit the assistant's writable scope to a dedicated directory; don't hand over your entire home directory. Store API keys in environment variables or a secret manager, not plaintext in config files.
  • 5. How It Compares to ChatGPT/Manus

    OpenClaw (Self-hosted Open Source)Cloud Assistant/Agent

    DataAll localVia service provider Capability ceilingDepends on the model you connectVendor flagship models Local operationsNative strengthLimited ConvenienceRequires self-maintenanceOut-of-the-box

    Practical conclusion: Use self-hosted assistants for tasks involving local files and private data; use cloud assistants for general Q&A and heavy lifting—they complement, not replace each other. For a broader view of the agent ecosystem, see Manus vs AutoGPT vs OpenClaw.

    FAQ

    Q: How powerful does my machine need to be? If using a cloud API, even a Raspberry Pi is enough; for running local 7B-14B models, 16-32GB RAM is recommended.

    Q: What's the difference from using Ollama directly? Ollama only handles model inference; OpenClaw adds tool execution, memory, and scheduled tasks—the difference between "can work" and "can chat."

    Q: Will upgrading lose data? No, if the data volume is mounted at ~/openclaw-data; back up as usual before upgrading.


    *Last updated: June 2026. Installation details are subject to the OpenClaw official repository README.*

    Also available in 中文.

    Build Your First Private AI Assistant with OpenClaw in 5 Minutes | AI Skill Navigation | AI Skill Navigation