Skip to content

Commit e8d13a7

Browse files
docs: add OPENCODE_DATA_DIR
1 parent e21026a commit e8d13a7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/web/src/content/docs/troubleshooting.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ opencode stores session data and other application data on disk at:
2828
- **macOS/Linux**: `~/.local/share/opencode/`
2929
- **Windows**: `%USERPROFILE%\.local\share\opencode`
3030

31+
You can override this location using the `OPENCODE_DATA_DIR` environment variable:
32+
33+
```bash
34+
export OPENCODE_DATA_DIR=/path/to/custom/opencode/storage-directory
35+
opencode
36+
```
37+
38+
This will store all opencode data (sessions, auth, logs, etc.) in the specified directory.
39+
3140
This directory contains:
3241

3342
- `auth.json` - Authentication data like API keys, OAuth tokens

0 commit comments

Comments
 (0)