github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/commands/operator/keygen.mdx (about)

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