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

# v0.16.5 Upgrade Instructions

> [!WARNING]
>
> These instructions are applicable to both **mainnet** and **testnet**. Deployment dates will be communicated via official channels.

## Upgrade notes

No breaking changes to `node.toml` config. This is a rolling upgrade on top of v0.16.4.

> [!WARNING]
>
> **`--triedb-path` must name the triedb device itself** (for example `/dev/triedb`), not a directory containing it. This applies to `monad-bft` and `monad-rpc`. Earlier releases accepted a directory holding a single database file; this release refuses one at startup.
>
> The packaged systemd units already pass `/dev/triedb`, so **no action is needed on a standard install**. If you run `monad-bft` or `monad-rpc` from a custom unit, a systemd drop-in that overrides `ExecStart`, or a container, check the flag before upgrading.

> [!NOTE]
>
> The packaged units now export triedb update and compaction counters as Prometheus gauges. `monad-execution` writes them to `--db-stats-file` and `monad-bft` reads them from `--triedb-stats-path`. Both flags are off by default; the packaged units set both to `/home/monad/monad-bft/triedb-stats`. If you override `ExecStart`, set **both flags to the same path, or neither**. A mismatch is silent: the gauges just stop updating.

> [!NOTE]
>
> **Growing the triedb device (optional).** This release adds `monad-mpt --grow`, which takes up the space after `/dev/triedb` is extended in place. The order matters:
>
> 1. Upgrade to this release and start the node once. This records the device's current size, which `--grow` needs.
> 2. Stop `monad-bft`, `monad-execution` and `monad-rpc`.
> 3. Extend the device in place, for example with `lvextend`, or by growing the RAID array and then the partition `/dev/triedb` points at.
> 4. Run `monad-mpt --storage /dev/triedb --grow` and confirm the prompt.
> 5. Start the services.
>
> A device extended before step 1 is refused, and nothing is written. Return it to its previous size, or use `--archive` and `--restore` instead. If `--grow` is interrupted, run the same command again.

## 1. SSH into the node as `root` user

## 2. Check `--triedb-path` (custom deployments only)

```bash theme={null}
systemctl cat monad-bft monad-rpc | grep -- '--triedb-path'
```

Every match should name a block device such as `/dev/triedb`. If one names a directory, change it to the device before continuing.

## 3. Stop services

```bash theme={null}
sudo systemctl stop monad-bft monad-execution monad-rpc
```

## 4. Upgrade monad package

> [!WARNING]
>
> If you encounter issues with the GPG signature (e.g. signatures were invalid), please renew the keys with the command below.

```bash theme={null}
curl -fsSL https://pkg.category.xyz/keys/public-key.asc \
  | gpg --dearmor --yes -o /etc/apt/keyrings/category-labs.gpg
```

```bash theme={null}
sudo apt update && sudo apt install --reinstall monad=0.16.5 -y --allow-downgrades --allow-change-held-packages
sudo apt-mark hold monad
```

> [!WARNING]
>
> The `apt-mark hold monad` command prevents the monad package from being upgraded automatically by `apt-get upgrade`. Without it, unattended system upgrades can install a newer version of monad that has not been approved for your network, causing version mismatch issues.

## 5. Start services and verify

```bash theme={null}
sudo systemctl daemon-reload
sudo systemctl start monad-bft monad-execution monad-rpc
sudo systemctl status monad-bft monad-execution monad-rpc --no-pager -l
```

All services should show `Active: active (running)`. Confirm the node rejoins and advances blocks.

## 6. Verify the correct version is running

```bash theme={null}
monad-rpc -V
```

Expected output:

```json theme={null}
monad-rpc {"commit":"33d9d5c0314eff8c6409a810b9dbf1b6381c6b5c","tag":"v0.16.5","branch":"","modified":true}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.