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

# Updates

> Update Data Relay Link safely while preserving identity, trust, and persistent public ports.

# Updates

Data Relay Link separates **project updates** from **upstream Data Relay Link binary updates**.

## Update decision flow

```mermaid theme={null}
flowchart TD
    A[Need to update?] --> B[Run update project --check]
    B --> C{Project update available?}
    C -->|Yes| D[Create backup when change risk warrants it]
    D --> E[update project]
    E --> F[show status + doctor + test service]
    C -->|No| G{Checking upstream Data Relay Link?}
    G -->|Yes| H[show upstream / update relay-engine --check]
    H --> I[Only pinned/tested Data Relay Link is accepted]
```

## Project update

Check first:

```bash theme={null}
sudo drlink update project --check
```

Then update:

```bash theme={null}
sudo drlink update project
```

A normal supported project update is designed to preserve:

* CLIENT ID and client management identity
* project private CA
* Data Relay Link token
* registry state
* enrollment state where applicable
* service definitions
* persistent public service-port reservations

```mermaid theme={null}
flowchart LR
    OLD[Installed project] -->|verified update| NEW[Updated project]
    STATE[Identity / CA / token / registry / ports] -->|preserved| NEW
```

A normal update is **not** a re-enrollment operation.

## Stable release vs development `main`

| Channel                  | Meaning                          | Recommended use                      |
| ------------------------ | -------------------------------- | ------------------------------------ |
| **v2.2.1 immutable tag** | current published stable         | field/normal installation            |
| **main**                 | mutable development/docs channel | intentional development/testing only |

Do not copy a development-only command into stable field documentation unless the operator explicitly opted into development behavior.

## Data Relay Link binary update

```bash theme={null}
sudo drlink show upstream
sudo drlink update relay-engine --check
```

`show upstream` is informational. Data Relay Link does **not** automatically install the newest upstream Data Relay Link release. The current stable release remains pinned to the qualified version, **v0.71.0**.

```mermaid theme={null}
flowchart LR
    U[Newest upstream Data Relay Link] -. informational .-> C[show upstream]
    P[Pinned/tested Data Relay Link 0.71.0] --> A[Allowed normal update path]
```

## Same-version refreshes

Update decisions are not based only on the visible project version string. Verified release metadata and bundle SHA256 can distinguish changed builds even when the project version text is unchanged.

## After any update

```bash theme={null}
sudo drlink show version
sudo drlink show status
sudo drlink doctor
```

Then test at least one representative published service through its public endpoint.

<Warning>
  Do not manually replace the bundled relay-server/client runtimes with arbitrary newer upstream binaries just because `show upstream` reports one. The tested/pinned relay-engine policy is part of release safety.
</Warning>
