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

# capsule update

> Check for and install the latest Capsule CLI release.

## How updates work

The Capsule daemon auto-updates itself. When a new release is published, the backend notifies every connected daemon over the existing SSE connection. The daemon downloads the new binary, verifies its SHA-256 checksum, replaces itself in place, and exits cleanly — systemd restarts it automatically with the new version. No manual action is required.

`capsule update` is the **manual fallback** for cases where the daemon is not running, the auto-update did not apply, or you want to update immediately without waiting for the SSE signal.

***

## Usage

```bash theme={null}
sudo capsule update
```

The Capsule binary lives at `/usr/local/bin/capsule`, which is root-owned, so root access is required to replace it.

## When to run this manually

| Situation                                        | Why                                              |
| ------------------------------------------------ | ------------------------------------------------ |
| The daemon is not installed or not running       | Auto-update only works when the daemon is active |
| You want to apply an update immediately          | Rather than waiting for the next SSE signal      |
| After a Capsule release that fixes a bug you hit | Confirms you're on the right version             |

## What it does

`sudo capsule update` checks the Capsule release server for a newer version of the CLI. If one is available, it downloads the binary for your platform, verifies the SHA-256 checksum, and atomically replaces the current binary in place.

If you are already on the latest version:

```
Already up to date (v1.2.0).
```

If an update is available:

```
Updated to v1.2.0 — restart the service to apply: sudo systemctl restart capsule
```

## After a manual update

Restart the service so the new binary takes effect:

```bash theme={null}
sudo systemctl restart capsule
```

This only applies when you ran `sudo capsule update` yourself. When the daemon auto-updates, it exits cleanly and systemd restarts it automatically — you do not need to do anything.

## Notes

* The update is atomic — if the download or checksum verification fails, the existing binary is left untouched
* `capsule update` works even on a fresh install with no license key configured yet — checking for and downloading a new release doesn't require authentication
* Auto-update is safe during active backups — the running process stays in memory until it exits cleanly, so in-flight backups complete before the restart
