Lesson 7 of 21

Install Docker

Monthly cost: $0 (Docker is free and open source) Expected time: ~10 minutes

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:

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

Further Reading