https://github.com/ozbillwang/openclaw-in-docker
Run OpenClaw (MoltBot, ClawdBot) Safely with Docker: A Practical Guide for Beginners
https://github.com/ozbillwang/openclaw-in-docker
ai ai-agents best-practices docker openclaw tutorials
Last synced: about 9 hours ago
JSON representation
Run OpenClaw (MoltBot, ClawdBot) Safely with Docker: A Practical Guide for Beginners
- Host: GitHub
- URL: https://github.com/ozbillwang/openclaw-in-docker
- Owner: ozbillwang
- Created: 2026-02-15T01:02:33.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2026-04-04T01:38:30.000Z (3 months ago)
- Last Synced: 2026-05-24T00:02:53.269Z (about 1 month ago)
- Topics: ai, ai-agents, best-practices, docker, openclaw, tutorials
- Language: Shell
- Homepage: https://medium.com/p/bf75c4eb1887
- Size: 10.7 KB
- Stars: 61
- Watchers: 1
- Forks: 21
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-openclaw-resources - OpenClaw in Docker (ozbillwang) - Practical beginner guide to running OpenClaw safely with Docker. (Open Source Projects / Hosting Platforms)
README
# OpenClaw in Docker (Beginner-Friendly)
This guide helps you run OpenClaw quickly and safely with Docker.
## 0) Quick Environment Check
Before You Start, make sure your machine has:
* [Docker installed](https://docs.docker.com/get-started/introduction/get-docker-desktop/)
* Bash v4+ (For example, MacOS with bash v3 only, you need upgrade with command
```
brew install bash
```
## 1) Clone this repository (HTTPS)
Use HTTPS so you don’t need to configure SSH or `git://`.
```bash
git clone https://github.com/ozbillwang/openclaw-in-docker.git
cd openclaw-in-docker
```
## 2) Set the OpenClaw Docker image
Default:
```bash
export OPENCLAW_IMAGE="alpine/openclaw:latest"
```
> Note: recently, `latest` has had issues for some users, no models you can choice.
> If you hit problems, switch to:
```bash
export OPENCLAW_IMAGE="alpine/openclaw:main"
```
## 3) Run the setup script
```bash
./docker-setup.sh
```
This script will:
* pull openclaw gateway image
* Launch an onboarding wizard
* Start the gateway via Docker Compose
* Generate a gateway token and store it in .env
---
### 4) Upgrade OpenClaw
When a new version is released, pull the latest image and restart the service:
```
docker pull alpine/openclaw:latest
docker-compose down
docker-compose up -d
```
No worried, the configuration file ( `~/.openclaw/openclaw.json`) will not be affected. However, it’s good practice to back it up and store it in a safe location before upgrading.
## Onboarding screenshots (for beginners)
You can use the onboarding screenshots from this blog post:
- [Run OpenClaw (MoltBot, ClawdBot) Safely with Docker: A Practical Guide for Beginners](https://medium.com/p/94112a9b57be)
- [Running OpenClaw with a Local LLM on a Mac mini (No API Cost)](https://medium.com/p/fb3857f73e0b)
---
## Quick troubleshooting
- If startup fails with `latest`, switch to `main` and rerun setup.
- Make sure Docker is running before executing `./docker-setup.sh`.
- Re-run the script after changing `OPENCLAW_IMAGE`.
- Reguarly backup `~/.openclaw/openclaw.json` on your host server, before upgrade or re-install