# Docker says configuration is missing after restart

**URL:** <https://community.openclaw.ai/t/docker-says-configuration-is-missing-after-restart/24>\
**Category:** Troubleshooting\
**Tags:** configuration, containers, docker, persistence, troubleshooting\
**Created:** [September 10, 2026, 4:23pm UTC](https://community.openclaw.ai/t/docker-says-configuration-is-missing-after-restart/24 "2026-09-10T16:23:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArchivedMember](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@ArchivedMember](https://community.openclaw.ai/u/ArchivedMember)\
**Post date:** [September 10, 2026, 4:23pm UTC](https://community.openclaw.ai/t/docker-says-configuration-is-missing-after-restart/24/1 "2026-09-10T16:23:26Z")

</div>

> **Adapted community discussion:** Paraphrased and condensed from an anonymized public OpenClaw Discord support conversation from August 2026. Technical guidance was reviewed for OpenClaw 2026.9.3.

I am writing a Compose file for the Gateway with a non-default UID and GID. Each instance should have its own persistent host directory, owned by that UID and GID. My current file mounts state under `/home/.openclaw`, exposes port 3000, makes the root filesystem read-only, and passes `gateway.mode=local` as an environment entry. What needs to change?

---

<div class="post-metadata">

**Author:** ![OpenClawSupport](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@OpenClawSupport](https://community.openclaw.ai/u/OpenClawSupport)\
**Post date:** [September 14, 2026, 8:44pm UTC](https://community.openclaw.ai/t/docker-says-configuration-is-missing-after-restart/24/2 "2026-09-14T20:44:39Z")

</div>

The main problem is the container path. Mount a unique absolute host directory at `/home/node/.openclaw`, set `HOME` to `/home/node`, and use the same state/config paths inside that directory. Expose the Gateway on port `18789`, and create the host directories with ownership matching the container UID and GID before startup.

`gateway.mode` is an OpenClaw config key, not a normal environment variable. Set it through the CLI inside the one-off Compose container, then start the service:

```bash
docker compose run --rm --no-deps --entrypoint node openclaw-gateway \
  dist/index.js config set gateway.mode local
docker compose up -d

```

A fully internal Docker network also blocks outbound provider access, so keep outbound networking available. If the root filesystem stays read-only, make sure every required writable path is a volume or temporary filesystem.

---

<div class="post-metadata">

**Author:** ![ArchivedMember](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@ArchivedMember](https://community.openclaw.ai/u/ArchivedMember)\
**Post date:** [September 14, 2026, 8:44pm UTC](https://community.openclaw.ai/t/docker-says-configuration-is-missing-after-restart/24/3 "2026-09-14T20:44:39Z")

</div>

After bringing it up, the Gateway logs say `Missing config` and ask me to run setup or set `gateway.mode=local`.

---

<div class="post-metadata">

**Author:** ![OpenClawSupport](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@OpenClawSupport](https://community.openclaw.ai/u/OpenClawSupport)\
**Post date:** [September 14, 2026, 8:44pm UTC](https://community.openclaw.ai/t/docker-says-configuration-is-missing-after-restart/24/4 "2026-09-14T20:44:39Z")

</div>

That means the Gateway still cannot read a persistent `openclaw.json`. Confirm that `/home/node/.openclaw` is backed by the intended host directory, then run onboarding through the same Compose service:

```bash
docker compose run --rm --no-deps --entrypoint node openclaw-gateway \
  dist/index.js onboard --mode local --no-install-daemon

docker compose up -d openclaw-gateway

```

If the message returns after another restart, inspect the mount target and ownership again. `--allow-unconfigured` is useful for temporary diagnosis, but it should not replace persistent state initialization.
