---
title: "oz0 server dist pull"
description: "Mirror a release into the dist directory the edge serves."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0/server/dist/pull"
---
# oz0 server dist pull

> Mirror a release into the dist directory the edge serves.

For: Operators and developers looking up a command.

Mirror a release into the dist directory the edge serves. URL is where a release's dist folder is served: manifest.json, manifest.json.sig and the files they name. --from takes it from a folder on this machine instead: an offline folder, whose dist/ holds the release, or a dist folder.

The release's signature must be by a key this server binary trusts, and every file must match its digest; the toolchain nodes install before their runtime comes along, each file checked against toolchain.json; the manifest goes in place last, so nodes see the new release whole or not at all. Then `node upgrade --binary` moves nodes to it.

It keeps to a release channel: the release's signed channel must be one the cluster follows (the cluster's, with the database; else the folder's), and on the same channel it never mirrors an older node version over a newer one. --switch-channel and --allow-older, each with --reason, are the explicit acts; with the database a switch moves the cluster's channel too, and both are recorded in the audit log.

## Usage

```bash
oz0 server dist pull [URL] [flags]
```

## Flags

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

<tbody>
  <tr>
    <td>
      <code>
        --allow-older
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      mirror a release older than the one the folder serves on the same channel; needs --reason
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --channel
      </code>
    </td>
    
    <td>
      channel
    </td>
    
    <td>
      <code>
        the cluster's, with the database; else the dist folder's, or stable
      </code>
    </td>
    
    <td>
      the release channel to keep to: stable, preview or lts-&lt;major>.&lt;minor>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --data-dir
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        ~/.local/share/orchestrator-zero
      </code>
    </td>
    
    <td>
      server data directory
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --db-file
      </code>
    </td>
    
    <td>
      file
    </td>
    
    <td>
      
    </td>
    
    <td>
      a file (- for stdin) holding the PostgreSQL URL of the management database, such as postgres://oz0:PASSWORD@db:5432/oz0 (or set OZ0_DB); the URL can carry a password, so it never goes on the command line
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --dev
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      a dev server's data directory (--data-dir) instead of a cluster's database
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --dist-dir
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        the dist folder next to this binary's folder
      </code>
    </td>
    
    <td>
      the edge's dist directory
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --from
      </code>
    </td>
    
    <td>
      folder
    </td>
    
    <td>
      
    </td>
    
    <td>
      a folder on this machine to take the release from: an offline folder or a dist folder, instead of a URL
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --reason
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      why, for --switch-channel and --allow-older (in the audit log with the database)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --switch-channel
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      move to --channel from the channel the cluster (or the folder) follows; needs --reason, and with the database sets the cluster's channel, audited
    </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.
