---
title: "oz0 index certify"
description: "Usage and flags for oz0 index certify."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0/index/certify"
---
# oz0 index certify

> Usage and flags for oz0 index certify.

For: Operators and developers looking up a command.

Sign a certificate with the root key (--root, a key file) saying that the online key (a public key in base64, or its key file) may sign the index named --index until --valid has passed. Run it where the root key is, offline; the certificate goes with the online key to whatever signs the index. A new certificate replaces an expired or lost online key without a new root.

## Usage

```bash
oz0 index certify <online-key> [flags]
```

## Flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --index
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the name of the index the key may sign, as its index.json names itself
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --out
      </code>
      
       (<code>
        -o
      </code>
      
      )
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      write the certificate here instead of to standard output
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --root
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the root key's file
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --valid
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        90d
      </code>
    </td>
    
    <td>
      how long the certificate is valid, such as 90d or 2160h
    </td>
  </tr>
</tbody>
</table>

## Inherited flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --context
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        $OZ0_CONTEXT or &lt;config dir>/orchestrator-zero/context.json
      </code>
    </td>
    
    <td>
      CLI context file written by server init
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --log-level
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        info
      </code>
    </td>
    
    <td>
      log level: debug, info, warn or error
    </td>
  </tr>
</tbody>
</table>

See [all `oz0` commands](https://docs.oz0.ai/reference/cli/oz0) and the [global flags](https://docs.oz0.ai/reference/cli/oz0#global-flags).


## Sitemap

See the full [sitemap](https://docs.oz0.ai/sitemap.md) for all pages.
