---
title: "state in config.yaml"
url: https://devlanes.run/docs/reference/config/user/state/
description: "Reference for the state key in ~/.devlanes/config.yaml."
---

# state in config.yaml

A top-level key of [`~/.devlanes/config.yaml`](/docs/reference/config/user/).

## `state`

Type: mapping.

Size budget for the daemon's database; past it, the oldest metrics and history are deleted before their retention ends.

```yaml devlanes-user
state:
  max_size: 512MiB
```

### `state.max_size`

Type: [byte size](/docs/reference/config/#byte-sizes). Default: `512MiB`.

Size the database (`state.db` with its WAL and shared-memory files) should stay under; defaults to `512MiB` and must be above zero. When it is larger, the cleanup deletes the oldest metric samples first, then the oldest history (finished runs, log index entries, remote boxes), even before their retention ends. Lanes, ports and running units are never deleted, so the file can stay above the budget.

```yaml devlanes-user
state:
  max_size: 512MiB
```
