-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: support OPENCLAW_CONFIG_PATH to persist openclaw.json on PVC #1174
Copy link
Copy link
Open
Labels
Integration: OpenClawSupport for OpenClawSupport for OpenClawNemoClaw CLIUse this label to identify issues with the NemoClaw command-line interface (CLI).Use this label to identify issues with the NemoClaw command-line interface (CLI).enhancementNew feature or requestNew feature or requestenhancement: featureUse this label to identify requests for new capabilities in NemoClaw.Use this label to identify requests for new capabilities in NemoClaw.enhancement: integrationPRs or issues proposing integration of a third-party product or service into NemoClaw.PRs or issues proposing integration of a third-party product or service into NemoClaw.
Metadata
Metadata
Assignees
Labels
Integration: OpenClawSupport for OpenClawSupport for OpenClawNemoClaw CLIUse this label to identify issues with the NemoClaw command-line interface (CLI).Use this label to identify issues with the NemoClaw command-line interface (CLI).enhancementNew feature or requestNew feature or requestenhancement: featureUse this label to identify requests for new capabilities in NemoClaw.Use this label to identify requests for new capabilities in NemoClaw.enhancement: integrationPRs or issues proposing integration of a third-party product or service into NemoClaw.PRs or issues proposing integration of a third-party product or service into NemoClaw.
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