> For the complete documentation index, see [llms.txt](https://agstakingco.gitbook.io/eth-2-0-key-generation-ubuntu-live-usb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agstakingco.gitbook.io/eth-2-0-key-generation-ubuntu-live-usb/master.md).

# Eth 2.0 Key Generation: Ubuntu Live USB

This guide demonstrates how to safely generate Eth 2.0 validator keys using Ubuntu live boot from USB.

{% hint style="info" %}
The process to create mainnet and testnet keys is identical, but the keys are NOT interchangeable. Be sure to practice everything on testnet prior to depositing on mainnet.
{% endhint %}

## DISCLAIMER - FOR EDUCATIONAL PURPOSES ONLY

{% hint style="danger" %}
Ethereum 2.0 is experimental software. Staking is inherently risky. Generating keys is risky.\
I am not an expert. I am documenting my process in order to learn and hopefully help others.

### There is no guarantee this guide will function for mainnet deposits

{% endhint %}

## Summary

1. [Download `eth2.0-deposit-cli` key generator](/eth-2-0-key-generation-ubuntu-live-usb/master.md#step-1-download-eth-2-0-deposit-cli-key-generator)
2. [Download Ubuntu 20.04](/eth-2-0-key-generation-ubuntu-live-usb/master.md#step-2-download-ubuntu)
3. [Burn Ubuntu ISO Image to USB](/eth-2-0-key-generation-ubuntu-live-usb/master.md#step-3-burn-ubuntu-iso-image-to-usb)
4. [Disconnect Internet](/eth-2-0-key-generation-ubuntu-live-usb/master.md#step-4-disconnect-internet)
5. [Boot into Ubuntu USB](/eth-2-0-key-generation-ubuntu-live-usb/master.md#step-5-boot-into-ubuntu-usb)
6. [Generate Eth 2.0 Keys](/eth-2-0-key-generation-ubuntu-live-usb/master.md#step-6-eth-2-0-key-generation)
7. [Safely store `mnemonic seed` (24 words)](/eth-2-0-key-generation-ubuntu-live-usb/master.md#step-7-mnemonic-seed)
8. [Save `deposit_date` and `validator_keystore`](/eth-2-0-key-generation-ubuntu-live-usb/master.md#step-8-deposit_data-and-keystore-files)

You will need 2 USB sticks and a PC running either Linux, Windows, or macOS.

## Step 1 - **Download `eth2.0-deposit-cli` Key Generator**

{% hint style="danger" %}
Please be sure you are using the official Ethereum Foundation GitHub account.
{% endhint %}

### Visit <https://github.com/ethereum/eth2.0-deposit-cli/releases/>

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-McNNuhQyu1W6nGNqeEp%2F-McNPHzFkSh2no4WHdbK%2Fimage.png?alt=media\&token=9eccacb2-6116-4a39-8ce8-123439c16ad2)

{% hint style="info" %}
Select the file ending in `linux-amd64.tar.gz` , then choose "Save". Once complete, the file (aka tarball) should appear in your Downloads folder.
{% endhint %}

### Copy the `eth2deposit-cli` tarball to the USB:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMQmNsMyYuxKVPT7S-D%2F-MMQn6_y7upntfjOdjUF%2Fimage.png?alt=media\&token=cdc7a65e-18ce-4faf-b186-65da888eca42)

{% hint style="info" %}
Eject the USB with the tarball and insert the 2nd USB to be used for Ubuntu.
{% endhint %}

## Step 2 - Download Ubuntu

### Visit <http://www.releases.ubuntu.com/20.04/> and download the desktop image:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQMw5V_LBkgRXAIpwt%2Fimage.png?alt=media\&token=33a4c42c-db89-4f73-bd09-cbf5795e1490)

## Step 3 - Burn Ubuntu ISO image to USB

{% hint style="warning" %}
If you're running Windows or Mac, you can follow the guides found here: [Windows](https://ubuntu.com/tutorials/create-a-usb-stick-on-windows#1-overview) || [Mac](https://ubuntu.com/tutorials/create-a-usb-stick-on-macos#1-overview)&#x20;
{% endhint %}

### Ubuntu Desktop - Click the<img src="https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQ6J1_UtjSKQ9IjBKK%2Fimage.png?alt=media&amp;token=488784ff-0a64-47b1-9832-b8d661939258" alt="" data-size="line">icon and search "startup disk creator"  :

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQ6Qi_sssq9UGhrku5%2Fimage.png?alt=media\&token=009d535d-ba57-47c2-aa13-d11808a515b3)

### Choose the Ubuntu ISO and **Make Startup Disk:**

{% hint style="danger" %}
**The USB will be completely wiped, be sure to back up any important data!**
{% endhint %}

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQ6yY4Nvf1TmHZR7MF%2Fimage.png?alt=media\&token=336fe450-4699-4381-a7d1-51044666f5bd)

### Installation Complete:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQ779vk8y0fnVgqa6-%2Fimage.png?alt=media\&token=564c4ded-af46-4f2d-bc67-5c856ddfba5e)

## Step 4 - Disconnect Internet

{% hint style="danger" %}

### **DISCONNECT INTERNET || aka AIR-GAP**

Physically unplug all modems, routers, and Ethernet cables. Make sure you never turn on WIFI or any networking capabilities. It should be impossible to connect to the internet.
{% endhint %}

## **Step 5 -** Boot into Ubuntu Live USB

### Ubuntu USB Startup Process:

1. Begin with the computer powered down
2. Plug the Ubuntu live USB into the computer
3. Start the computer and continually press **`F-12`** to enter one-time boot menu
4. Choose the Ubuntu live USB from the boot menu

{% hint style="info" %}
Tapping **F-12** or **F-10** at computer startup is the standard method to enter the one-time boot menu. If that doesn't work you can search "one-time boot menu" for your computer model.

If nothing is working, you may need to use **F-2** and enter the BIOS to allow booting from USB.
{% endhint %}

If successful, the Ubuntu live USB will pull up the GRUB menu. It may automatically continue, otherwise select the first option by hitting `ENTER`

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQ8E6juRxAyVMe9qnc%2Fimage.png?alt=media\&token=c5ff672e-c912-41e0-87cb-8bb153a409d5)

### Select `Try Ubuntu`:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQ8pb4Hig6LgN8kelL%2Fimage.png?alt=media\&token=03253b7f-67e3-44df-b717-d466a9644ce9)

{% hint style="info" %}
Once you click `Try Ubuntu`, the Ubuntu 20.04 desktop will begin to load.
{% endhint %}

### Turn Off WiFi and Bluetooth:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQ9mV512i0hvbUgWMi%2FScreenshot%20from%202020-11-18%2009-53-22.png?alt=media\&token=a64bf8fa-20d4-474e-b46f-678e14c84efc)

### Plug in 2nd USB and double click the `eth2deposit-cli` tarball:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQAcrdEvHdNde_wUVJ%2FScreenshot%20from%202020-11-18%2009-58-31.png?alt=media\&token=1f43ec18-7064-4847-8207-808c04fccb64)

### Click `Extract` in the upper left corner:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQB0ei2-ZTkKAN5B9_%2FScreenshot%20from%202020-11-18%2009-58-43.png?alt=media\&token=475bfda7-e5b1-46b0-bf13-7dcfa961bf31)

### Click `Home` towards the upper left, then click the green `Extract`&#x20;

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQAqL7MH91oFGprTIJ%2FScreenshot%20from%202020-11-18%2009-58-55.png?alt=media\&token=9f1699af-0065-481c-8f04-746b1f5726a9)

### Navigate to the `Home` Folder:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQCXkswBN8qlj-6kTN%2FScreenshot%20from%202020-11-18%2010-01-18.png?alt=media\&token=ab21fc84-ce2e-4580-ad4f-7da033e0ed21)

### Rename the folder to `eth2.0-deposit-cli`

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQCnn0Y4fIzl4JJYn4%2FScreenshot%20from%202020-11-18%2010-01-41.png?alt=media\&token=0610b6ab-b531-4276-9de9-12dd47a040c5)

## Step 6 - Eth 2.0 Key Generation

### Open new terminal window using `Ctrl + Alt + T`

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQDBRQGg0gHMomcUlY%2FScreenshot%20from%202020-11-18%2009-57-48.png?alt=media\&token=f86b092b-ebe1-4a96-b1c7-131042cb0336)

### Change directory to eth2.0-deposit-cli folder:

```
cd eth2.0-deposit-cli
```

### Run `./deposit new-mnemonic`:

```
./deposit new-mnemonic
```

{% hint style="info" %}
You will be asked to provide the following responses:

1. Please choose your mnemonic language:
2. Please choose how many validators you wish to run:
3. Please choose mainnet or testnet:
4. Type a password to secure your validator
5. Repeat password for confirmation
   {% endhint %}

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQHqO8d_1o6cISWjjL%2Fimage.png?alt=media\&token=0c6c3d55-e276-4629-b8e9-46a68feae048)

## Step 7 - Mnemonic Seed

{% hint style="danger" %}

### **If you lose the mnemonic seed, your stake is lost forever.**

The 24 word mnemonic seed is necessary to withdraw your staked Eth. Without the seed, you will be unable to transfer/withdraw and your Eth will be lost forever.
{% endhint %}

### After confirming the password, you'll be given a mnemonic seed phrase:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQDMMqhY68mONB-gaQ%2FScreenshot%20from%202020-11-18%2010-03-17.png?alt=media\&token=ac41254d-3571-40b8-bb25-8144d870ecda)

### Write down the mnemonic, then reenter it to ensure it's correct:

{% hint style="info" %}
A few things to keep in mind regarding the 24-word mnemonic phrase:

* Make sure you use durable paper and permanent pen
* Store in a waterproof, fireproof bag inside a safe
* A bank security box is helpful in preventing the [$5 wrench attack](https://xkcd.com/538/)
* Minimum of 2 copies in 2 different locations
* You can split a copy 12/12 and give to trusted family/friends
  {% endhint %}

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQHhW8YecIjzf0uqvX%2FScreenshot%20from%202020-11-18%2010-03-31.png?alt=media\&token=d1916463-0f86-460c-a01d-f36b72086338)

{% hint style="info" %}
Once you correctly re-enter the mnemonic, your `validator_keys` will be created.
{% endhint %}

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQJ5oaYAE7Poigrd2G%2FScreenshot%20from%202020-11-18%2010-03-47.png?alt=media\&token=1309b1ae-1652-4eb1-9ea0-d14dcc8f681d)

## Step 8 - `deposit_data` and `keystore` files

{% hint style="danger" %}
**Files can be found at:**`/home/YOURUSERNAME/eth2.0-deposit-cli/validator_keys`

* **`deposit_data-[timestamp].json`**
  * contains data used to register your validator on the Eth2 launchpad
* **`keystore -[timestamp].json`**
  * validator keystore file protected by password (aka validator signing key)

### **If you lose the mnemonic seed, your stake is lost forever.**

{% endhint %}

### **Navigate to `/home/eth2.0-deposit-cli/validator_keys`:**

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQJe0tBXLwTLcZycSD%2FScreenshot%20from%202020-11-18%2010-04-16.png?alt=media\&token=4741364d-e26f-469e-aa43-e3a182e7c3d9)

{% hint style="info" %}
The "pubkey" is the validator public key and should be the same in both files.
{% endhint %}

### `Deposit_data` file contents:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQJpu4bSB1Z3RaQ_8Z%2FScreenshot%20from%202020-11-18%2010-05-27.png?alt=media\&token=64747cc2-d5bc-43a6-b806-fb9514ede697)

### `Keystore` file contents:

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQKRpVR5XxIgc4QGFT%2FScreenshot%20from%202020-11-18%2010-05-37.png?alt=media\&token=0c09c395-33f0-43bb-93b0-5a5c4578bd61)

## Copy `deposit_data` and `keystore` files to external USB:

{% hint style="info" %}
You can always use your mnemonic seed to generate a new keystore file if necessary.
{% endhint %}

![](https://3780740280-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMPsvIEM2fJY_8ygWws%2F-MMPszNJWo-dQi12WvUR%2F-MMQKjW4fjuJzm9_gDaw%2FScreenshot%20from%202020-11-18%2010-07-19.png?alt=media\&token=b8f7dd90-5d2f-45d4-84ae-1cdc801902d7)

{% hint style="success" %}
Congratulations, you successfully created your Eth 2.0 validator keys!

Close Ubuntu, store the seed, and transfer `deposit_data` and `keystore` to your main PC.
{% endhint %}

### Learn how to run a testnet validator: [Pyrmont || Lighthouse Eth2 Staking Guide](https://app.gitbook.com/@agstakingco/s/pyrmont-lighthouse-eth-2-0-staking-guide/)
