---
title: "oz0 token create"
description: "Create a join token; nodes that use it are accepted without approval, into its tenant only."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0/token/create"
---
# oz0 token create

> Create a join token; nodes that use it are accepted without approval, into its tenant only.

For: Operators and developers looking up a command.

Create a join token; nodes that use it are accepted without approval, into its tenant only.

A token is bounded: by default it admits one node and lasts 24 hours. --max-uses takes 1 to 1000 and --ttl at most 720h (30 days); 0 is refused, since a token is never unlimited and never lasts forever.

## Usage

```bash
oz0 token create [flags]
```

## Flags

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

<tbody>
  <tr>
    <td>
      <code>
        --description
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      what the token is for
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --json
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      print JSON instead of a table
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --label
      </code>
    </td>
    
    <td>
      stringArray
    </td>
    
    <td>
      
    </td>
    
    <td>
      label for joining nodes, key=value; repeatable
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --max-uses
      </code>
    </td>
    
    <td>
      uint32
    </td>
    
    <td>
      <code>
        1
      </code>
    </td>
    
    <td>
      how many nodes may join with it, 1 to 1000; a token is never unlimited
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tenant
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        default
      </code>
    </td>
    
    <td>
      tenant the nodes join
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --ttl
      </code>
    </td>
    
    <td>
      duration
    </td>
    
    <td>
      <code>
        24h0m0s
      </code>
    </td>
    
    <td>
      how long the token is valid, at most 720h (30 days); a token never lasts forever
    </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.
