Files
openclaw/docs/install/docker-vm-runtime.md
Ehsan 5de4090666 docs(install): fix gog/goplaces release URLs in docker-vm-runtime example
The Gmail CLI lives at github.com/steipete/gogcli (with the `cli` suffix),
not steipete/gog. The repo currently referenced returns 404, so the
example Dockerfile fails when users try to bake the binary into their
image.

Both gogcli and goplaces use goreleaser-style versioned asset names
(`<name>_<version>_<os>_<arch>.tar.gz`), so `latest/download/<name>_Linux_x86_64.tar.gz`
never resolves either. Pinning to a specific release tag and using the
correct asset name pattern.

The gogcli tarball ships its binary as `gog` alongside LICENSE/README, so
extract to /tmp and move just the binary into /usr/local/bin to keep the
image clean.

wacli is left unchanged for now — its repo isn't publicly accessible from
the network paths I tested, so I can't verify the correct URL without
guessing.
2026-04-26 15:30:00 +03:00

5.3 KiB

summary, read_when, title
summary read_when title
Shared Docker VM runtime steps for long-lived OpenClaw Gateway hosts
You are deploying OpenClaw on a cloud VM with Docker
You need the shared binary bake, persistence, and update flow
Docker VM runtime

Shared runtime steps for VM-based Docker installs such as GCP, Hetzner, and similar VPS providers.

Bake required binaries into the image

Installing binaries inside a running container is a trap. Anything installed at runtime will be lost on restart.

All external binaries required by skills must be installed at image build time.

The examples below show three common binaries only:

  • gog (from gogcli) for Gmail access
  • goplaces for Google Places
  • wacli for WhatsApp

These are examples, not a complete list. You may install as many binaries as needed using the same pattern.

If you add new skills later that depend on additional binaries, you must:

  1. Update the Dockerfile
  2. Rebuild the image
  3. Restart the containers

Example Dockerfile

FROM node:24-bookworm

RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/*

# Example binary 1: Gmail CLI (gogcli — installs as `gog`)
ARG GOGCLI_VERSION=0.13.0
RUN curl -L https://github.com/steipete/gogcli/releases/download/v${GOGCLI_VERSION}/gogcli_${GOGCLI_VERSION}_linux_amd64.tar.gz \
  | tar -xz -C /tmp \
  && mv /tmp/gog /usr/local/bin/gog \
  && chmod +x /usr/local/bin/gog

# Example binary 2: Google Places CLI
ARG GOPLACES_VERSION=0.3.0
RUN curl -L https://github.com/steipete/goplaces/releases/download/v${GOPLACES_VERSION}/goplaces_${GOPLACES_VERSION}_linux_amd64.tar.gz \
  | tar -xz -C /tmp \
  && mv /tmp/goplaces /usr/local/bin/goplaces \
  && chmod +x /usr/local/bin/goplaces

# Example binary 3: WhatsApp CLI
RUN curl -L https://github.com/steipete/wacli/releases/latest/download/wacli_Linux_x86_64.tar.gz \
  | tar -xz -C /usr/local/bin && chmod +x /usr/local/bin/wacli

# Add more binaries below using the same pattern

WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
COPY ui/package.json ./ui/package.json
COPY scripts ./scripts

RUN corepack enable
RUN pnpm install --frozen-lockfile

COPY . .
RUN pnpm build
RUN pnpm ui:install
RUN pnpm ui:build

ENV NODE_ENV=production

CMD ["node","dist/index.js"]
The download URLs above are for x86_64 (amd64). For ARM-based VMs (e.g. Hetzner ARM, GCP Tau T2A), replace `linux_amd64` with `linux_arm64` in the gogcli and goplaces URLs (and check the appropriate ARM64 variant for any additional tools from each tool's release page).

Build and launch

docker compose build
docker compose up -d openclaw-gateway

If build fails with Killed or exit code 137 during pnpm install --frozen-lockfile, the VM is out of memory. Use a larger machine class before retrying.

Verify binaries:

docker compose exec openclaw-gateway which gog
docker compose exec openclaw-gateway which goplaces
docker compose exec openclaw-gateway which wacli

Expected output:

/usr/local/bin/gog
/usr/local/bin/goplaces
/usr/local/bin/wacli

Verify Gateway:

docker compose logs -f openclaw-gateway

Expected output:

[gateway] listening on ws://0.0.0.0:18789

What persists where

OpenClaw runs in Docker, but Docker is not the source of truth. All long-lived state must survive restarts, rebuilds, and reboots.

Component Location Persistence mechanism Notes
Gateway config /home/node/.openclaw/ Host volume mount Includes openclaw.json, .env
Model auth profiles /home/node/.openclaw/agents/ Host volume mount agents/<agentId>/agent/auth-profiles.json (OAuth, API keys)
Skill configs /home/node/.openclaw/skills/ Host volume mount Skill-level state
Agent workspace /home/node/.openclaw/workspace/ Host volume mount Code and agent artifacts
WhatsApp session /home/node/.openclaw/ Host volume mount Preserves QR login
Gmail keyring /home/node/.openclaw/ Host volume + password Requires GOG_KEYRING_PASSWORD
External binaries /usr/local/bin/ Docker image Must be baked at build time
Node runtime Container filesystem Docker image Rebuilt every image build
OS packages Container filesystem Docker image Do not install at runtime
Docker container Ephemeral Restartable Safe to destroy

Updates

To update OpenClaw on the VM:

git pull
docker compose build
docker compose up -d