Lesson 873 of 2116
Deploying OpenClaw: Local Box, Home Server, Or VPS
OpenClaw can live on your laptop, on a Pi in your closet, or on a $5 VPS. The choice shapes uptime, latency, and how much you trust the host. Pick deliberately. It loads souls (long-lived agent personas), schedules heartbeats (periodic ticks where each soul wakes up and considers what to do), and exposes skills (capabilities it can call).
Lesson map
What this lesson covers
Learning path
The main moves in order
- 1Three places OpenClaw runs
- 2deployment topology
- 3Docker
- 4persistent volumes
Concept cluster
Terms to connect while reading
Section 1
Three places OpenClaw runs
OpenClaw is a long-running runtime, not a script you invoke and forget. It loads souls (long-lived agent personas), schedules heartbeats (periodic ticks where each soul wakes up and considers what to do), and exposes skills (capabilities it can call). All three need a home that stays on. The realistic options are your laptop, a home server, and a small VPS — each with different trade-offs.
Compare the options
| Host | Best for | Trade-off |
|---|---|---|
| Laptop | Solo dev, dev loop, daily-only souls | Sleep / shut lid kills heartbeats |
| Home server (Mac mini, NUC, Pi) | 24/7 souls, local-only data, low latency to your network | You become the sysadmin; power and network outages are your problem |
| Small VPS ($5-20/mo, e.g. Hetzner, DO) | Public-facing souls, cron-shaped work, you're not always at the keyboard | Provider can read disk; latency to home network; egress costs |
| Both: home + VPS (federated) | Sensitive data stays home, public skills run remote | Now you have two boxes to operate (covered in lesson 4) |
The Docker option
OpenClaw ships a reference Dockerfile and a docker-compose.yml. Container-first deployment is the right default for any host that's not your dev laptop — it gives you reproducible installs, easy upgrades, and clean rollbacks when a release breaks something. The compose file declares the OpenClaw process, an Ollama sidecar (optional), and the volumes that hold the soul state.
A two-service compose file for a home box. `restart: unless-stopped` is what makes souls survive a power blip.
# docker-compose.yml — minimal home-server deployment
services:
openclaw:
image: ghcr.io/openclaw/openclaw:latest
restart: unless-stopped
ports:
- "8081:8081" # mission-control web UI, bound to LAN only
volumes:
- ./data/souls:/var/openclaw/souls # soul state: long-term memory
- ./data/audit:/var/openclaw/audit # audit log: every action, every tick
- ./config:/etc/openclaw:ro # config: read-only mount
environment:
- OPENCLAW_BACKEND=ollama
- OPENCLAW_OLLAMA_URL=http://ollama:11434
- OPENCLAW_LOG_LEVEL=info
depends_on:
- ollama
ollama:
image: ollama/ollama:latest
restart: unless-stopped
volumes:
- ./data/ollama:/root/.ollama # downloaded models (big)
# No ports exposed — only OpenClaw talks to it.Persistent volume layout
OpenClaw splits state into four directories. Mount them outside the container so an `image pull` and restart never erases anything important. The split exists for a reason — different directories have different backup and rotation policies.
- /var/openclaw/souls — durable: each soul's long-term memory, scheduled heartbeats, skill bindings. Back this up. Lose this and your souls forget who they are.
- /var/openclaw/audit — append-only: every heartbeat, every skill call, every approval gate decision. Rotate monthly; do not delete the current month.
- /var/openclaw/cache — disposable: tool-call results, model responses, anything regeneratable. Safe to wipe between releases.
- /etc/openclaw — config: soul definitions, skill registry, secrets references (NOT secrets themselves). Version-control this directory.
Restart-resilience for souls
A soul is a long-running agent — and long-running things crash. OpenClaw's design assumes restarts are routine, not exceptional. Souls write checkpoint state after each heartbeat; on boot, the runtime replays from the last checkpoint and the next scheduled tick fires on time. Your job is to make sure the host actually restarts the OpenClaw process when it falls over.
- 1Use `restart: unless-stopped` (Docker) or `Restart=always` (systemd) so a crash auto-recovers.
- 2Set a heartbeat watchdog: if a soul hasn't ticked in 2x its interval, log a warning. Lesson 2 covers this.
- 3Test it deliberately — once a quarter, kill -9 the container and time how long until souls resume.
- 4Keep migrations idempotent: a soul on version N reading a checkpoint from version N-1 must not corrupt itself.
- 5On VPS, set the host to auto-reboot on kernel update (e.g. `unattended-upgrades` on Debian) and confirm souls come back.
The host-trust question
OpenClaw can read whatever you let it read. If it lives on a VPS, the provider can technically read your soul memory and audit logs. For a hobby weather-summary soul that's fine. For a soul that has access to your email or your bank exports, it's not. Match the data sensitivity to the host trust level — a calendar-summary soul on a $5 VPS is reasonable; an inbox-triage soul there is reckless. Lesson 3 has the full security model.
Key terms in this lesson
The big idea: OpenClaw's home shapes everything that follows. Pick your host on data sensitivity and uptime needs, mount volumes outside the container, and prove restart-resilience before you trust a soul with anything that matters.
End-of-lesson quiz
Check what stuck
15 questions · Score saves to your progress.
Tutor
Curious about “Deploying OpenClaw: Local Box, Home Server, Or VPS”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Creators · 9 min
What Perplexity Is: Search-Augmented LLM, Not A Chatbot
Perplexity is built around the idea that every answer should cite its sources. Treating it like ChatGPT misses the point — and the reliability gap that comes with it.
Creators · 10 min
Spaces: Building Team Knowledge Bases In Perplexity
Spaces are Perplexity's project containers — system prompts, files, and shared chat history. They turn the search engine into a research workspace.
Creators · 10 min
Comet Browser: What It Does That Atlas And Operator Don't
Comet is Perplexity's full browser with a research-native sidebar and an action-capable agent. It plays differently than ChatGPT Atlas or Operator — and the differences matter.
