Installing Docker

Install Docker and Docker Compose on your Raspberry Pi.

By Kevin McAleer,    2 Minutes


Installing Docker

Docker is the foundation for running OpenClaw safely and cleanly. Let’s install it.

Step 1: Install Docker

Run this command on your Pi:

curl -fsSL https://get.docker.com | sh

This official script:

  • Detects your Pi’s architecture (ARM)
  • Downloads the right Docker version
  • Installs Docker
  • Sets up the daemon

Takes about 2-5 minutes. Let it finish.

Step 2: Add Your User to Docker Group

By default, you need sudo to run Docker commands. To avoid this:

sudo usermod -aG docker kev

(Replace kev with your username)

Step 3: Log Out and Back In

The group change requires a fresh login:

exit

Then SSH back in:

Step 4: Verify Docker Installation

docker run hello-world

Expected output:

Hello from Docker!
This message shows that your installation appears to be working correctly.

If you see this, Docker is working!

Step 5: Install Docker Compose

Check if it’s already installed:

docker-compose --version

If not installed, install it:

sudo apt install docker-compose -y

Verify:

docker-compose --version

You should see:

Docker Compose version v1.29.2

(Version number may differ)

Step 6: Enable Docker Daemon on Boot

So Docker starts automatically when your Pi boots:

sudo systemctl enable docker
sudo systemctl start docker

Verify it’s running:

sudo systemctl status docker

You should see:

● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)

Troubleshooting

Permission Denied Errors

If you still get permission errors after adding your user to the docker group:

# Re-login completely
exit
ssh [email protected]

# Or start a fresh shell
newgrp docker

Out of Memory During Installation

On Pi with 2GB RAM, installation might struggle. If it hangs:

  1. Interrupt it (Ctrl+C)
  2. Create a swap file:
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
  1. Try again:
curl -fsSL https://get.docker.com | sh

Container Runtime Information

Check your setup:

docker info

Look for:

  • Containers: (should be 1 from hello-world test)
  • Memory: (total system memory)
  • Storage Driver: overlay2 (preferred)

You’re Ready!

Docker is installed and ready. Next, we’ll set up Docker Compose to run OpenClaw.


< Previous Next >

You can use the arrows  ← β†’ on your keyboard to navigate between lessons.


What are you looking for?
Watch Videos Get Ideas Learn Something Read a Review Read the Blog Search
... Z Z z