---
title: "af vault"
description: "Manage the vault that protects the cluster's keys"
---

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

# af vault

<!-- Generated by tools/gen-reference.mjs from `af vault --help`. Change the help text in crates/atoll-forge-cli/src/main.rs, then run `npm run gen:reference`. -->

The cluster's key-encryption key is held only in memory, protected by recovery keys that people hold. A server node that restarts while no other node of its cluster is running stays sealed until enough recovery key holders unseal it.

## Usage

```text
af vault [OPTIONS] <COMMAND>
```

## Commands

| Command | What it does |
| --- | --- |
| [`key`](#af-vault-key) | Create your recovery key and write its public part |
| [`status`](#af-vault-status) | Show whether the node is sealed, and the progress of unsealing it |
| [`unseal`](#af-vault-unseal) | Give your share to unseal a sealed node |
| [`rekey`](#af-vault-rekey) | Change who holds recovery keys, and how many are needed to unseal |
| [`rotate`](#af-vault-rotate) | Request rotation of the cluster's key |
| [`key-status`](#af-vault-key-status) | List the terms of the cluster's keyring |

## Options

- `--recovery-key <RECOVERY_KEY>`

  Path to your recovery key

  Defaults to `atoll-forge/recovery.key` in your configuration directory (`$XDG_CONFIG_HOME`, or `~/.config`).

  Environment variable: `AF_RECOVERY_KEY`

## Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## Examples

```sh
af vault status
af vault rotate --reason "the yearly rotation"
```

## af vault key {#af-vault-key}

Create your recovery key and write its public part

Creates your recovery key if you don't have one yet, and writes its public part next to it with a `.pub` extension. Give that file to the operator for the cluster's first start (`af-server --recovery-key`) or for a rekey (`af vault rekey start --holder`). Prints the key's fingerprint and the path of the `.pub` file.

### Usage

```text
af vault key [OPTIONS]
```

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af vault status {#af-vault-status}

Show whether the node is sealed, and the progress of unsealing it

### Usage

```text
af vault status [OPTIONS]
```

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af vault unseal {#af-vault-unseal}

Give your share to unseal a sealed node

Decrypts, on this machine, the node's share of the cluster's key that is sealed to your recovery key, and gives it to the node. The node unseals once enough holders have given their shares.

### Usage

```text
af vault unseal [OPTIONS]
```

### Options

- `--reset`

  Discard the shares given so far, then give yours

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af vault rekey {#af-vault-rekey}

Change who holds recovery keys, and how many are needed to unseal

A platform administrator starts a rekey naming the new holders; enough of the current holders then each give their share to complete it. Requires you to be signed in.

### Usage

```text
af vault rekey [OPTIONS] <COMMAND>
```

### Commands

| Command | What it does |
| --- | --- |
| [`start`](#af-vault-rekey-start) | Start a rekey to new recovery key holders |
| [`give`](#af-vault-rekey-give) | Give your share to the rekey in progress |
| [`cancel`](#af-vault-rekey-cancel) | Cancel the rekey in progress |
| [`status`](#af-vault-rekey-status) | Show the rekey in progress, if any |

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af vault rekey start {#af-vault-rekey-start}

Start a rekey to new recovery key holders

Names the new holders and how many of them are needed to unseal the cluster. Prints the rekey's nonce, which the current holders need in order to give their shares.

### Usage

```text
af vault rekey start [OPTIONS] --holder <HOLDERS> --threshold <THRESHOLD>
```

### Options

- `--holder <HOLDERS>`

  Public recovery key file of a new holder, as written by `af vault key`; repeat for each holder

- `--threshold <THRESHOLD>`

  Number of the new holders needed to unseal the cluster

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af vault rekey give {#af-vault-rekey-give}

Give your share to the rekey in progress

Decrypts your current share on this machine and gives it to the rekey that --nonce identifies.

### Usage

```text
af vault rekey give [OPTIONS] --nonce <NONCE>
```

### Options

- `--nonce <NONCE>`

  Nonce of the rekey, as printed by `af vault rekey start`

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af vault rekey cancel {#af-vault-rekey-cancel}

Cancel the rekey in progress

### Usage

```text
af vault rekey cancel [OPTIONS] --nonce <NONCE>
```

### Options

- `--nonce <NONCE>`

  Nonce of the rekey, as printed by `af vault rekey start`

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af vault rekey status {#af-vault-rekey-status}

Show the rekey in progress, if any

### Usage

```text
af vault rekey status [OPTIONS]
```

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af vault rotate {#af-vault-rotate}

Request rotation of the cluster's key

Adds a new term to the cluster's keyring, which encrypts from then on; every earlier term can still decrypt what it encrypted. A platform administrator requests the rotation, and another platform administrator approves it unless you are the only one.

### Usage

```text
af vault rotate [OPTIONS]
```

### Options

- `--reason <REASON>`

  Reason for the request, recorded with it

  Default: `""`

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af vault key-status {#af-vault-key-status}

List the terms of the cluster's keyring

Shows when each term was installed and how many keys it has sealed.

### Usage

```text
af vault key-status [OPTIONS]
```

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

Source: https://docs.forge.workreef.dev/reference/af/vault/index.mdx
