Question :
How to install OpenClaw in Docker?
Applicable to :
VPS / Dedicated Server.
Answer :
It is possible to install OpenClaw as a Docker. Let's install by using Ubuntu 24 Plain OS.
Make sure your Ubuntu 24 is upgraded to latest version first.
apt update; apt upgrade -y
Install Docker as well.
apt-get install ca-certificates curl -y
Add docker official GPG key
sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc
Now add repository to apt sources.
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOFLet's update the repository.
apt update
Install Docker engine.
apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
Now install docker OpenClaw using official image provided.
git clone https://github.com/openclaw/openclaw.git cd openclaw export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest ./scripts/docker/setup.sh
Let's wait while server install OpenClaw, this may take few minutes to complete. There are some various question will be asked in the first initials.
- Yes
- QuickStart
Select Model/auth provider :
You can use OpenRouter if you need a free one. And then paste the API key from OpenRouter.
Select default model : Keep current.
Now Select Channel, where the input and output belong to. Most people would choose Telegram Bot. If you choose Telegram bot, you need to configure the API first. If you already had the API key, then just paste in.
And then it will ask for search engine, you may choose Skip for now.
Some skills will be installed after this. This may take times.
If you are using Telegram Bot, you need to auth the bot from the OpenClaw interface first before the bot can respond to you.
docker exec <your_docker_id> openclaw pairing approve telegram <unique_code_from_telegram>
Okay everything has been settled, and you are ready to use your self hosted bot from Telegram Bot.