docs: mention OPENCLAW_HOME in install and getting started (#12091) (thanks @sebslight)

This commit is contained in:
Sebastian
2026-02-08 16:06:14 -05:00
parent 04359545a7
commit ac90fad24b
3 changed files with 20 additions and 0 deletions

View File

@@ -163,6 +163,14 @@ openclaw status # gateway status
openclaw dashboard # open the browser UI
```
If you need custom runtime paths, use:
- `OPENCLAW_HOME` for home-directory based internal paths
- `OPENCLAW_STATE_DIR` for mutable state location
- `OPENCLAW_CONFIG_PATH` for config file location
See [Environment vars](/help/environment) for precedence and full details.
## Troubleshooting: `openclaw` not found
<Accordion title="PATH diagnosis and fix">

View File

@@ -64,7 +64,9 @@ defaults write bot.molt.mac openclaw.nixMode -bool true
### Config + state paths
OpenClaw reads JSON5 config from `OPENCLAW_CONFIG_PATH` and stores mutable data in `OPENCLAW_STATE_DIR`.
When needed, you can also set `OPENCLAW_HOME` to control the base home directory used for internal path resolution.
- `OPENCLAW_HOME` (default precedence: `HOME` / `USERPROFILE` / `os.homedir()`)
- `OPENCLAW_STATE_DIR` (default: `~/.openclaw`)
- `OPENCLAW_CONFIG_PATH` (default: `$OPENCLAW_STATE_DIR/openclaw.json`)

View File

@@ -96,6 +96,16 @@ If the Control UI loads, your Gateway is ready for use.
</Accordion>
</AccordionGroup>
## Useful environment variables
If you run OpenClaw as a service account or want custom config/state locations:
- `OPENCLAW_HOME` sets the home directory used for internal path resolution.
- `OPENCLAW_STATE_DIR` overrides the state directory.
- `OPENCLAW_CONFIG_PATH` overrides the config file path.
Full environment variable reference: [Environment vars](/help/environment).
## Go deeper
<Columns>