github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/operator/keygen.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: operator keygen'
     4  description: >
     5    The `operator keygen` command generates an encryption key that can be used for
     6    Nomad server's gossip traffic encryption. The keygen command uses a
     7    cryptographically strong pseudo-random number generator to generate the key.
     8  ---
     9  
    10  # Command: operator keygen
    11  
    12  ~> **Warning:** This command is deprecated and will be removed in
    13     Nomad 1.5.0. Use the `nomad operator gossip keyring generate`
    14     subcommand instead.
    15  
    16  The `operator keygen` command generates an encryption key that can be used for
    17  Nomad server's gossip traffic encryption. The keygen command uses a
    18  cryptographically strong pseudo-random number generator to generate the key.
    19  
    20  The resulting key is encoded in the [RFC4648] "URL and filename safe" base64
    21  alphabet. If you use another tool such as OpenSSL to generate the gossip key,
    22  you should pipe the input through the `base64(1)` command to ensure it is
    23  safely encoded. For example: `openssl rand 32 | base64`
    24  
    25  ## Usage
    26  
    27  ```plaintext
    28  nomad operator keygen
    29  ```
    30  
    31  ## Example
    32  
    33  ```shell-session
    34  $ nomad operator keygen
    35  6RhfKFZ5uYEaU6RgWzx69ssLcpiIkvnEZs5KBOQxvxA=
    36  ```
    37  
    38  [rfc4648]: https://tools.ietf.org/html/rfc4648#section-5