#how to update docker image
1 messages · Page 1 of 1 (latest)
If your OpenClaw is running in Docker, updating the image is usually safe as long as your data is on a volume / bind mount (so it lives on the host, not inside the container).
1) First: confirm where the data is stored (this is the “keep my data” part)
In your docker-compose.yml (or the template Hostinger generated), look for mounts like:
/home/node/.openclaw(config, auth, tokens, sessions, etc.)/home/node/.openclaw/workspace(agent workspace)
These should be mapped to either:
- a host folder (bind mount), or
- a named Docker volume
If they’re not mounted, then updating/recreating the container can wipe state.
If you paste your docker-compose.yml here (please redact any tokens/keys), I can tell you if it’s set up correctly.
2) The actual update (Docker Compose)
SSH into the server, go to the folder that has docker-compose.yml, then:
docker compose pull
docker compose up -d
docker compose logs -f openclaw-gateway
That:
- downloads the new image
- recreates the container(s)
- keeps volumes
- starts the new version
Important: do not run docker compose down -v (the -v deletes volumes).
3) If your template builds locally from a git checkout (less common on “templates”)
Then updates are:
git pull
docker compose build
docker compose up -d
4) Quick safety backup (recommended)
Before updating, back up whatever host folder/volume you’re using for .openclaw.
If you’re using bind mounts to a folder like ./openclaw-config:
tar -czf openclaw-backup.tar.gz ./openclaw-config ./openclaw-workspace