> ## Documentation Index
> Fetch the complete documentation index at: https://www.landbase.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Config file locations

> Where landbase-cli stores credentials, sessions, and platform config — and what is safe to inspect, edit, or delete.

# Config file locations

landbase-cli stores its state in `~/.landbase/`. This page documents each file, what it contains, and what happens if you delete it.

***

## Directory overview

```
~/.landbase/
├── config.json        # Legacy API key (lbk_*) storage
├── sessions.json      # Session label → UUID mappings
└── platform.json      # Platform OAuth session (lbs_*)
```

All files are created on first use. If they do not exist, landbase-cli creates them automatically.

***

## config.json

Stores the legacy API key set via `landbase-cli auth login --key`.

```json theme={null}
{
  "apiKey": "lbk_your_api_key_here"
}
```

**Permissions:** `0600` (readable only by your user)

**Safe to delete?** Yes. You will be prompted to re-authenticate the next time you run a command that requires auth.

**Safe to edit?** You can update `apiKey` directly if you need to rotate a key without running `auth login --key`.

***

## sessions.json

Maps human-readable session labels to their server-side UUIDs.

```json theme={null}
{
  "uk-saas": "ses_abc123xyz",
  "acme-research": "ses_def456uvw"
}
```

**Permissions:** `0600`

**Safe to delete?** Yes. You will lose the label → UUID mappings, which means `--session=uk-saas` will start a fresh session. The prior sessions still exist on the Landbase backend (accessible by UUID) but you will no longer be able to reference them by label.

**Safe to edit?** Yes. You can rename labels or remove stale entries. Do not change the UUID values — they are set by the server and must match what the backend has on record.

***

## platform.json

Stores the platform OAuth session token and account information.

```json theme={null}
{
  "accessToken": "lbs_...",
  "expiresAt": "2026-09-05T10:00:00Z",
  "accountId": "acc_abc123",
  "deviceName": "Austin's MacBook Pro"
}
```

**Permissions:** `0600`

**Safe to delete?** Yes. You will be logged out and will need to run `landbase-cli auth login` again.

**Safe to edit?** Not recommended. The token is issued by the OAuth server and cannot be manually constructed.

***

## Override the config directory

If you need to store config in a different location (for example, to isolate credentials per project), set:

```bash theme={null}
export LANDBASE_CONFIG_DIR=/path/to/custom/dir
```

landbase-cli will read and write all config files from this directory instead of `~/.landbase/`.

***

## Related

* [environment variables reference](/docs/reference/env-vars) — `LANDBASE_CONFIG_DIR`
* [How to troubleshoot authentication](/docs/how-to/troubleshoot-auth)
* [Platform mode vs. legacy mode](/docs/explanation/platform-vs-legacy)
