Will OpenClaw Compose preserve the right paths?
Use Docker Compose v2 and the OpenClaw release's setup script, then inspect the resolved mounts for both Gateway state and workspace before testing replacement on a disposable instance.
Choose the setup path before onboarding
On a Docker Compose v2 host, use the setup script shipped with the chosen OpenClaw release. A prebuilt image avoids the local source build, which the guide says requires at least 6 GB RAM. For an offline staging host, load the image in advance and use the documented offline setup option. That mode checks for the configured image locally and disables implicit Compose pulls and builds. If you enable Docker-backed sandboxing, the setup also checks the required sandbox images, so a loaded Gateway image alone is an incomplete offline bundle. Record the image reference, whether sandboxing is enabled, and the result of each prerequisite check in the release notes for the deployment. An early missing-image error tells you what to fix before investigating provider credentials or onboarding state.
Docker - OpenClawWalk each durable path back to its storage
Take the effective state and workspace directories from the deployment you are testing. For each path, find the deepest matching container mount target, then record its backing source and write mode. This matters when a writable parent contains a nested read-only mount. A bind mount points to a host path, while a named volume uses Docker-managed storage. A bind source that exists on one daemon host still needs corresponding data when you move to another. On a disposable Compose project, put different harmless markers in the two effective directories, record the container identity, and replace the container while retaining its storage. Verify a changed identity and reread both markers. If only one disappears, start with that directory's effective mount, backing source, and permissions instead of repeating onboarding.
Bind mounts | Docker DocsPrepare Compose on the actual host
Docker Desktop includes Compose, Docker Engine, and the Docker CLI. Use it for a Mac workstation trial. On an Ubuntu VPS with Docker Engine and the Docker CLI, install the Compose plugin using Docker's Linux instructions. Check that Compose v2 is available on the machine that will actually run the Gateway before fetching the OpenClaw repository.
If you use Portainer, first establish a working baseline with the upstream setup flow on a disposable host. Then check that the Portainer stack uses the same image, environment, and host storage paths. Validate those paths on the Docker host where the container runs. A stack that starts with a fresh configuration when you expected the baseline state needs a storage check before you connect a channel.
Overview of installing Docker Compose | Docker DocsUse the release's own setup script
Get the official openclaw/openclaw repository and work from its root. The script path documented for this layout is scripts/docker/setup.sh. For a connected deployment, follow the script invocation documented for your checkout. The supplied OpenClaw guide shows export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest" for selecting a prebuilt image. Its offline example loads the image locally first and invokes ./scripts/docker/setup.sh --offline to validate the local image and suppress implicit pulls and builds.
The documented flow includes environment synchronization, permission fixes, onboarding, Gateway configuration synchronization, and Compose startup. During onboarding, set a test model credential and configure one test channel using the instructions for your release. Confirm that the Gateway starts and an authorized sender receives a reply. If a script or setting is missing, check that the instructions match your checkout.
Docker - OpenClawRecreate the container as a storage test
A Docker bind mount makes a host file or directory available inside a container. Before using OpenClaw with real data, record the effective host paths for configuration and workspace and confirm that the service can read and write the paths it needs. Keep a protected copy of the deployment configuration and persistent data before testing an image change.
For an illustrative rehearsal, use /srv/openclaw-pilot/config and /srv/openclaw-pilot/workspace as your chosen host paths, a disposable bot identity, and a file named recovery-check.txt containing pilot-17. Confirm that the running Gateway can read the marker. Replace the test container while preserving both mounts. The pilot passes when the marker is still readable and the same authorized test sender receives a reply without repeating onboarding. Inspect mount paths and ownership if either check fails.
Bind mounts | Docker DocsCheck the Ubuntu port from both sides
Docker's Ubuntu installation guide warns that published container ports can bypass ufw or firewalld rules. For the first test, keep the Gateway reachable from the host or through your intended private access route. Review the port mapping in the actual Compose configuration and use Docker's documented firewall controls if your deployment requires access beyond the host.
Check reachability from two places. An authorized operator should be able to open the Gateway through the intended route, and a test client outside that route should fail to connect when public access is prohibited. If the external client connects despite a restrictive host firewall, inspect Docker's published port and applicable packet-filter rules before changing Gateway authentication. Repeat both checks after an update that changes the Compose configuration.
Install Docker Engine on Ubuntu | Docker Docs