Persistent OpenClaw: docker-compose with Surviving Volumes
Advanced · 30 minutes · 5 tasks, checked automatically · 100 points
In this advanced deployment lab you will wire OpenClaw into a production-grade docker-compose stack that mounts a named volume at /root/.openclaw. When the container is torn down and rebuilt, every skill, session log, and gateway configuration must survive intact. You will install OpenClaw, bootstrap the gateway, register a skill, confirm the volume binding, then destroy and recreate the stack to prove persistence — all without touching a paid LLM provider.
What you’ll learn
- Install OpenClaw globally inside the toolbox and verify the CLI is available
- Author a docker-compose.yml that mounts a named volume to /root/.openclaw and points the gateway at the local Ollama sandbox
- Bootstrap the OpenClaw gateway, register a custom skill, and confirm both the config file and the skill manifest are written inside the volume
- Prove persistence by destroying the compose stack, recreating it, and asserting the skill and session data are still present
How this lab works
- Start the lab: One click starts a sandbox with a local model and the agent’s toolbox: no API key and no token bill.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work inspects the agent, its config and its output, and says what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: Locally, against a model on your computer: no API key, no tokens
- Model: qwen2.5:3b
- Open source: github.com/openclaw/openclaw
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop (or Podman / Rancher Desktop) installed and running
- A model sandbox started in the Agent Playground
Topics: openclaw, docker-compose, persistent-volume, deployment, gateway, skills, ollama, qwen2.5, local-llm
Create a free account to start this lab.
Keep going
- Run the Hermes Gateway as a Persistent Service with Request Logging and Clean Shutdown
- Dual-Surface Agent Control: CLI and Web Gateway with Hermes
- Schedule a LangGraph Morning Briefing Agent
- Serve MCP over Streamable HTTP and Connect a Remote Client
- Route a CrewAI Agent Through Your Own OpenAI-Compatible Gateway
- Lock OpenClaw Down: Pairing Approval, Per-Skill Permission Scoping, and Shell Command Allowlisting