The default configuration path is ~/.openclaw/openclaw.json, but profiles and environment overrides can change it. Ask the CLI which file it is using:
openclaw config fileMake one change at a time
- Create and verify a private backup before meaningful changes.
- Use
openclaw configurefor targeted setup or the Control UI's configuration tools. - Validate the result and follow any restart instruction actually returned.
- Test the affected workflow before changing anything else.
openclaw config validate
openclaw gateway statusAdvanced users can edit the documented JSON5 configuration, but must use the installed schema and validate it. Do not paste a complete replacement config just to change one setting. Do not print the whole config into a chat: legacy files can contain plaintext secrets.
Back up more than one file
A copy of the config alone does not capture credentials, sessions, databases, workspaces, or external services. See chapter 19 for verified backups. Keep backups outside any public website or repository.
Recovery
If validation fails, read the field-level error and undo the specific change. Onboarding is not a universal “repair everything” button. Review openclaw doctor findings before applying fixes, and preserve the current state before restoring older data.