Problem Statement
Currently openclaw.json is stored in /sandbox/.openclaw/, which lives in the container writable layer. This means every pod restart wipes the config, requiring manual re-application via kubectl exec each time.
The PVC at /sandbox/.openclaw-data/ survives pod restarts — all agent workspaces, credentials, and memory already live there. The config file should too.
Without a fix, users must maintain a separate restore script that re-applies the full config after every restart, which is error-prone and defeats the purpose of a persistent setup.
Proposed Design
Respect an OPENCLAW_CONFIG_PATH environment variable (similar to the existing --profile flag) that lets users redirect where openclaw.json is read from and written to.
In NemoClaw, the gateway startup command in nemoclaw-start.sh would set:
OPENCLAW_CONFIG_PATH=/sandbox/.openclaw-data/openclaw.json \
gosu gateway openclaw gateway run
This way the config lives on the PVC and survives pod restarts with zero manual intervention.
The existing --profile mechanism already isolates OPENCLAW_STATE_DIR and OPENCLAW_CONFIG_PATH — exposing OPENCLAW_CONFIG_PATH as a standalone env var (or ensuring NemoClaw sets it) is a minimal change with high impact.
Alternatives Considered
Symlink /sandbox/.openclaw/openclaw.json → PVC path: The symlink itself lives in the container writable layer and disappears on pod restart — doesn't solve the problem.
Copy config to PVC on every restart via init container: Works but requires orchestration changes and still needs the config to be seeded somewhere.
Use --profile flag: Creates a full isolated state dir, which is overkill if only the config path needs to be redirected. Also not easily injectable into the existing NemoClaw startup flow.
Category
enhancement: feature
Checklist
Problem Statement
Currently
openclaw.jsonis stored in/sandbox/.openclaw/, which lives in the container writable layer. This means every pod restart wipes the config, requiring manual re-application viakubectl execeach time.The PVC at
/sandbox/.openclaw-data/survives pod restarts — all agent workspaces, credentials, and memory already live there. The config file should too.Without a fix, users must maintain a separate restore script that re-applies the full config after every restart, which is error-prone and defeats the purpose of a persistent setup.
Proposed Design
Respect an
OPENCLAW_CONFIG_PATHenvironment variable (similar to the existing--profileflag) that lets users redirect whereopenclaw.jsonis read from and written to.In NemoClaw, the gateway startup command in
nemoclaw-start.shwould set:This way the config lives on the PVC and survives pod restarts with zero manual intervention.
The existing
--profilemechanism already isolatesOPENCLAW_STATE_DIRandOPENCLAW_CONFIG_PATH— exposingOPENCLAW_CONFIG_PATHas a standalone env var (or ensuring NemoClaw sets it) is a minimal change with high impact.Alternatives Considered
Symlink
/sandbox/.openclaw/openclaw.json→ PVC path: The symlink itself lives in the container writable layer and disappears on pod restart — doesn't solve the problem.Copy config to PVC on every restart via init container: Works but requires orchestration changes and still needs the config to be seeded somewhere.
Use
--profileflag: Creates a full isolated state dir, which is overkill if only the config path needs to be redirected. Also not easily injectable into the existing NemoClaw startup flow.Category
enhancement: feature
Checklist