OpenClaw operations guide

OpenClaw Docker config keeps resetting: check persistent mounts

Short answer. Verify which Docker Compose paths hold OpenClaw config and workspace state, diagnose permission errors, and test persistence across container replacement. Use this for the Docker Compose Gateway when an upgrade, recreation or change of launch directory makes OpenClaw look like a fresh install.

Last updated · Published

By CWYN · Reviewed November 17, 2026 · Check command help for your installed version before changing a running system

Use this for the Docker Compose Gateway when an upgrade, recreation or change of launch directory makes OpenClaw look like a fresh install. Start by inspecting the running container and preserving the previous storage.

1. Identify the running Compose project

Use docker compose ps -a from the directory and with the project options you normally deploy with. Compare the container, project and image with the last known working launch. If the container is missing, inspect the project list with docker compose ls before creating anything new. A different project name can select different named volumes.

2. Inspect the actual host-to-container mounts

Use docker inspect --format "{{json .Mounts}}" <container> to limit output to mount metadata. Compare the sources, destinations and write mode with the intended deployment. The standard setup mounts OPENCLAW_CONFIG_DIR at /home/node/.openclaw and the workspace separately beneath it. A missing child mount can change which workspace the agent sees. Check any explicit path overrides on your deployment. See the Docker storage reference.

3. Distinguish a missing mount from access denied

Check that the expected source exists on the Docker host. In a healthy container you can use docker compose exec openclaw-gateway id to identify the runtime user. If the Gateway exits, read the first startup error privately and check host ownership and mount mode for the reported path against the configured runtime user. A deliberately read-only config mount can be valid alongside writable state. Use the permissions section of the Compose operations reference before changing ownership. Keep permission changes scoped to the confirmed OpenClaw paths.

4. Rehearse replacement with disposable state

Use a separate Compose project with distinct host directories, ports and credentials, with customer channels and jobs disabled. Put a harmless marker file in its mounted workspace. Record the config’s presence and the mount sources, then recreate only that test Gateway using the same image and mounts. Confirm the original marker is visible and the test Gateway loads the expected config.

5. Restore the intended mount mapping and verify it

After backing up the affected state, correct the live Compose source or ownership that the checks identified. Compare the effective mounts again and verify a known workspace file and expected settings from the running Gateway. Keep the prior storage until checks pass. If the change fails, stop the affected container and restore the recorded mount mapping against the preserved state.

Get your free CWYN Score to choose your next setup improvement.

Next steps

Check workspace files on the persistent mount

The OpenClaw Complete Setup Pack ($14.95) is an optional paid kit whose installation README lists where each starter file belongs and how to verify the change.
Kit details as of Nov 18, 2026