What Is Docker and Why
Docker is like a shipping container for software — everything the app needs is packed inside, so it runs the same on every computer. Docker packages software into containers — self-contained environments with everything the software needs. OpenClaw runs inside a Docker container, which means:
- Installation is one command, not a hundred
- Updates are clean — pull the new image, restart
- If something breaks, you delete the container and start fresh without affecting the rest of your server
- The OpenClaw team tests everything in Docker, so it's the most reliable way to run it
Install Docker
SSH into your server:
ssh claw@YOUR_SERVER_IP
Run Docker's official install script:
curl -fsSL https://get.docker.com | sudo sh
Add your user to the Docker group so you don't need sudo for every Docker command:
sudo usermod -aG docker claw
Log out and back in for the group change to take effect. Type exit to disconnect from your server, then reconnect:
exit
ssh claw@YOUR_SERVER_IP
This is needed so your user picks up the new Docker permissions.
Verify Docker is working:
docker --version
docker run hello-world
You should see a message that says "Hello from Docker!" — that means it's working. The command also prints a wall of explanatory text after that line, which you can ignore.
Install Docker Compose
Docker Compose lets you manage multi-container setups with a simple config file. It usually comes bundled with Docker now, but verify:
docker compose version
If it's not found, install it:
sudo apt install docker-compose-plugin -y
Create the OpenClaw Directory
Set up where OpenClaw will live:
mkdir -p ~/openclaw
cd ~/openclaw
This is where your OpenClaw configuration and data will be stored.
When You're Done
- Docker installed and running
docker run hello-worldoutputs success message- Docker Compose installed
- User
clawis in the docker group (no sudo needed) ~/openclawdirectory created