---
title: "oz0-node join"
description: "Join a cluster."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0-node/join"
---
# oz0-node join

> Join a cluster.

For: Operators and developers looking up a command.

Join a cluster. The node creates its key locally (it never leaves the machine) and checks the server against the CA hash in the join token or --ca-hash before it sends anything. With a valid token it is accepted at once; without one it waits until an operator runs `oz0 node accept`.

## Usage

```bash
oz0-node join [flags]
```

## Flags

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

<tbody>
  <tr>
    <td>
      <code>
        --ca-hash
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      cluster CA hash (sha256:...) to join without a token and wait for approval
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --name
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        host name
      </code>
    </td>
    
    <td>
      display name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --region
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the region this node belongs to, such as eu; the join fails unless --server is an edge of that region (default: the region of the edge it joins through). A node works only through its own region's edges
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --server
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      edge address, for example <code>
        https://edge.example.com:7443
      </code>
      
       (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --token-file
      </code>
    </td>
    
    <td>
      file
    </td>
    
    <td>
      
    </td>
    
    <td>
      a file (- for stdin) holding the join token from oz0 token create (or set OZ0_JOIN_TOKEN); a token never goes on the command line, where every user of the machine can read it
    </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>
        --data-dir
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        ~/.local/share/orchestrator-zero-node
      </code>
    </td>
    
    <td>
      where the node keeps its identity, uv, Python, runtimes and state
    </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-node` commands](https://docs.oz0.ai/reference/cli/oz0-node) and the [global flags](https://docs.oz0.ai/reference/cli/oz0-node#global-flags).


## Sitemap

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