> For the complete documentation index, see [llms.txt](https://launchnodes.gitbook.io/csm-with-staking-ui/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://launchnodes.gitbook.io/csm-with-staking-ui/deploying-a-validator-node-via-staking-ui.md).

# Deploying a validator node via Staking UI

### Step 1: AWS

**Setting up your instance**

1. Visit the [Prysmatic Validator node](https://aws.amazon.com/marketplace/pp/prodview-7sl6kijlqwbk6) and click **View Purchase Options**
2. Scroll down and click on **Subscribe**

{% hint style="info" %}
In the upcoming steps, you will initiate the creation of a CloudFormation stack. This process will provision the following AWS resources:

* ECS Cluster
* EC2 Instance
* IAM Role with Required Permissions
* SNS Topic Subscription

**IAM Role Purpose (stakinguiinstancerole):**

This IAM role is created to support the operation of the staking UI container within your AWS environment. It is assumed by the ECS container instance and provides the necessary permissions for:

* `AmazonEC2ContainerServiceforEC2Role:` This managed policy enables the ECS container instance to interact with the Amazon ECS control plane, register with a cluster, and pull container images.
* `AWSMarketplaceMeteringRegisterUsage:` This managed policy allows usage reporting to AWS Marketplace for metered billing and product entitlement.

The role is essential for allowing the containerised staking UI application to run and report usage correctly.

As part of the stack creation, you will be asked to provide your email address for subscribing to an **SNS topic**. This enables alerting capabilities within your AWS account.

> **Note:** <mark style="color:green;">**Your email address will be used only within your AWS environment for alert notifications. It will not be visible to or shared with the vendor.**</mark>
> {% endhint %}

3. Navigate to AWS Console (click on your account name in the top right corner and select **Your AWS Console**) and look up **CloudFormation.** Alternatively, **click** [**here**](https://console.aws.amazon.com/cloudformation/) to go directly to CloudFormation.
4. In CloudFormation, click **Create Stack** and insert the below link in the Amazon S3 URL field. Click **Next.**

```
https://stakingui-test.s3.us-west-2.amazonaws.com/CSM_cft.json
```

5. On the Specify stack details page:
   1. Type in the Stack name (it can be any name)
   2. Under Instance type select t2.small (this instance can run up to 2 nodes)
   3. Under CustomIP type in your current IP address. If you cannot find it, you can look it up online by searching for *my IP address.* Click **Next.**
   4. Enter your email ID for SNS topic subscription to get alerts.
   5. Create a One-Time-Passcode. It will be required on first login. It must be 8-32 characters, only letters and numbers.

{% hint style="info" %}
You will receive an email with the subject **AWS Notification - Subscription Confirmation** to the email ID that you have provided for SNS topic subscriptio&#x6E;**.** Click on the <mark style="color:green;">**confirm subscription**</mark> link.&#x20;
{% endhint %}

6. Skip the next page and click **Next**
7. Scroll down the next page and tick the **'I acknowledge...'** box. Click **Submit**
8. Your AWS instance is now being deployed. Wait until the status of your instance on the left hand side changes from CREATE\_IN\_PROGRESS to CREATE\_COMPLETE. Whilst you wait, click on the **refresh button** a few times to update the status. Please note that you do not have to wait for all processes to be completed in the right-hand side Events window, Just the left-hand side.&#x20;
9. Now, go to **Outputs** tab and click on the **IP link** to launch Lido CSM UI on your instance

**Video Walkthrough:**

{% embed url="<https://drive.google.com/file/d/17LygrpXjc-nuNgf3VzfWLg0TuJCMko7d/view?usp=sharing>" %}

### Step 2: Staking UI

**Deploying a new validator node**

1. The Lido CSM UI should open in the new tab of the browser you are using. We recommend using Google Chrome as it works with the Metamask wallet extension
2. Close the SSL Certificate pop up and click on Start the node process set up.
3. You’ll be asked for a **one-time passcode**.&#x20;

{% hint style="info" %}
This is the passcode you created earlier when you set up the system using the CloudFormation stack.
{% endhint %}

4. After entering the passcode, you’ll have to **create a new password**.&#x20;
5. Once you've created your new password, the system will ask you to log in.
6. After you log in, Select your infra as "Deploy on Public Cloud".&#x20;
7. Read the pop-up message, check the acknowledgement box and click "Continue".&#x20;
8. Now, click the **“Create new validator keys”** button. Then click the **“Create”** button.
9. **Copy and save your recovery phrase** and click Next.

{% hint style="info" %}
Make sure you save your recovery phrase/mnemonics safely. It is one of the most important component for your validator node. If you loose your mnemonics, you might loose access to your validator keys.
{% endhint %}

5. Under the Recovery Phrase Check window insert the missing recovery phrase words to check that you have them saved correctly. Click Next
6. In the next window, select the number of validator nodes you are looking to spin up, type in a validator node password, insert **Lido withdrawal vault address** and click Next.&#x20;

{% hint style="info" %}
Make sure you keep your validator node password safe.&#x20;
{% endhint %}

<mark style="color:red;">**Note: Once the withdrawal address is provided, it cannot be changed. Make sure you double check the wallet address that you are providing.**</mark>

**Testnet(Hoodi) Withdrawal Address:**

```
0x4473dCDDbf77679A643BdB654dbd86D67F8d32f2
```

{% hint style="warning" %} <mark style="color:orange;">The above addresses are as per CSM official document, when we curated these steps. Please double check</mark> <mark style="color:blue;">**Withdrawal Vault address**</mark> <mark style="color:orange;">on the official Lido website before proceeding.</mark>&#x20;

<mark style="color:orange;">For reference -</mark>&#x20;

* Hoodi - <https://docs.lido.fi/deployed-contracts/hoodi>
  {% endhint %}

7. Your keys have now been created and **you need to save a copy of them locally.** An original copy is automatically saved on your instance
8. Click through the next window
9. Create a new Validator wallet password and click Create.

{% hint style="info" %}
Make sure you save these password(s) safely. You will need them in if and when you decide to&#x20;

Please make sure you save following carefully while accessing the UI.

* Mnemonics,
* Validator key password,
* Validator key files,
* Wallet password,
* UI login password \
  (Please note that if you lose the password ,you will have rebuild the UI from the beginning after deletion of existing resources to make sure the validator is offline before rebuilding the UI)
  {% endhint %}

10. When prompted to provide the fee recipient address, provide the CSM Fee recipient address.

**Testnet (Hoodi) fee recipient address:**

```
0x9b108015fe433F173696Af3Aa0CF7CDb3E104258
```

{% hint style="warning" %} <mark style="color:orange;">The above addresses are as per CSM official document, when we curated these steps. Please double check</mark> <mark style="color:blue;">**Execution Layer Rewards Vault address**</mark> <mark style="color:orange;">on the official Lido website before proceeding.</mark>

<mark style="color:orange;">For reference -</mark>&#x20;

* Hoodi - <https://docs.lido.fi/deployed-contracts/hoodi>
  {% endhint %}

11. It’s now time to start your node. Click on Start Validator and wait for the node to spin up as per instructions on the page. Proceed to the next step
12. This is the last step of the Lido CSM UI. You now need to go to CSM Portal and upload your deposit data file and submit a bond (as described in **Step 3** below).

{% hint style="info" %}
We recommend using 2FA for security purposes. To set up 2FA follow these instructions - <https://launchnodes.gitbook.io/csm-with-staking-ui/set-up-two-factor-authentication-2fa>
{% endhint %}

**Video Walkthrough:**

{% embed url="<https://drive.google.com/file/d/1Hc_FgtFWj706H4hrW7ufFk5MEHJvh2Dz/view?usp=sharing>" %}

### Step 3: Joining CSM

1. Go to <https://csm.testnet.fi/> and connect your wallet.&#x20;
2. Click on "Become a Node Operator"&#x20;
3. Select the wallet of your choice to upload a bond.
4. Upload your deposit-data.json file. This file would have been generated in the Key Generation step.
5. The Bond ETH amount will be calculated automatically based on the number of keys and the bond curve.&#x20;
6. Click Submit.&#x20;
7. Once you process the transaction on your wallet and deposit the required bond amount, wait for your CSM validator keys to be deposited with 32ETH through the protocol and make sure your node remains online in the meantime.&#x20;

**Video Walkthrough:**

{% embed url="<https://drive.google.com/file/d/1KReZro3Mh3pt6pcDGEyk4EqhdcgOTlui/view>" %}
