---
title: "oz0 secret expiry"
description: "Set when a secret should be rotated: a date (2026-12-31), a period (90d, 12w) or none."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0/secret/expiry"
---
# oz0 secret expiry

> Set when a secret should be rotated: a date (2026-12-31), a period (90d, 12w) or none.

For: Operators and developers looking up a command.

Set when a secret should be rotated: a date (2026-12-31), a period (90d, 12w) or none.

A period counts from the value's last set, and every set moves it on. Reminders go out before the date (oz0 secret
reminders), and a secret past it is a finding of oz0 doctor (secret_overdue). The secret keeps working: its provider
decides when a key stops. The value, its version and its age stay as they are; the change is audited (secret.expiry).

## Usage

```bash
oz0 secret expiry <NAME> <date|duration|none> [flags]
```

## 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>
  
  <tr>
    <td>
      <code>
        --tenant
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        default
      </code>
    </td>
    
    <td>
      tenant
    </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.
