Rocket Pool Smart Nodes on AWS
By: Jake Pospischil
Tags: AWS, Ethereum, Proof Of Stake, Rocketpool, Blockchain

If you don’t have hardware at home to run a node, try this guide for setting up a node quickly on AWS

This guide is for a previous Rocket Pool beta. View the guide for the currently running beta here.

Introduction

In this article, we’ll look at setting up a server on AWS to run a Smart Node on the Rocket Pool network. Smart Nodes can deposit into Rocket Pool to have an equivalent amount of user deposits matched with theirs, and then stake on the Ethereum 2.0 Beacon Chain to earn rewards. They earn rewards on their own deposit, plus a percentage of the rewards earned by deposits assigned to them.

This guide assumes that you have access to a Unix terminal (such as the MacOS terminal, or the Ubuntu terminal provided by the Windows Subsystem for Linux) and are familiar enough with it to connect to a remote server over SSH.

Getting Started

First up, you’ll need to sign up to AWS if you haven’t already. Once you’re logged in, you’ll see a screen with a navigation panel on the left looking something like this:

Use the drop-down in the toolbar at the top of the screen to select the geographic region you want your server in. Each region has its own separate servers, so you’ll want to get this right before continuing:

Next, click Instances in the navigation panel on the left. You should see a notice like this in the instance list (unless you have launched any in your chosen region previously):

Creating an AWS Instance

Let’s go ahead and click the Launch Instance button to set up a server! You’ll see a list of Amazon Machine Images to choose from — this determines the Operating System of the server, as well as some other software on it. Select Ubuntu Server 18.04 LTS (HVM) — the Smart Node software stack is only officially supported on Ubuntu at this stage.

Next, choose an Instance Type. The list of available options will display the number of CPU cores and amount of RAM each type has available. To run a Smart Node, you’ll need at least a t2.medium. Select this type, or one with more resources if you like, then click the Next button.

Now we’ll configure the Instance Details. There’s no need to modify anything here, simply leave the default values and move on.

Next up, we’ll Add Storage to the instance. Storage volumes are managed separately from your server, and can be swapped in and out if need be. The storage created in this step will be automatically added to your server though. Leave the default size (8GiB) and volume type (general purpose SSD) as these will easily meet our requirements.

We don’t need to add any Tags to our instance, so you can skip the next step.

Now we’ll configure the Security Group for the server. Security groups list firewall rules which determine which IP addresses can access your server, and over which ports. Leave the “Create a new security group” option selected, and enter a name and description for it, like “Smart Node” and “Smart Node Group”. Remove any existing rules in the table and add the following ones:

Type : SSH, Source : My IP

: SSH, : My IP Type : Custom TCP, Port Range : 30303, Source : Anywhere

: Custom TCP, : 30303, : Anywhere Type: Custom UDP, Port Range: 30303, Source: Anywhere

This will allow you to remotely connect to your server, and will allow the Ethereum client running on it to be discovered and connected to by peers. You should end up with a table like this:

Finally, review your instance details and click Launch. You’ll be prompted to generate a key pair for connecting to your server. Select “Create a new key pair” and enter a name for it like “Smart Node Key”, then click Download Key Pair. Never share this file with anyone, and keep it secure, as it’s used to access your server remotely. Let’s put it somewhere safe, like under the .ssh folder in your user path, e.g. ~/.ssh/certificates . Then, set the file mode to make sure other users on your machine can’t access it:

chmod 600 ~/.ssh/certificates/SmartNodeKey.pem

If you’re using Windows, you can set permissions (Read & Execute) to the owner and it will work the same as above.

Now back in the AWS console, click Launch Instance to create your server! You’ll see a notice with a View Instances button to return to the list.

Once you’re back at the instance list, you’ll see it appear with some details next to it. Give it a name like “Smart Node” by clicking the edit icon in the empty Name field:

Creating an Elastic IP

Now, you’ll want to create an Elastic IP Address for your server to make sure that you can always access it at the same address. Otherwise, it might change if you need to restart it, which is inconvenient. Click Elastic IPs under “Network and Security” in the navigation panel, then select Allocate new address. Click through the prompts to create the elastic IP address and return to the list.

Next, select the address in the list and click the Actions button above it, and choose Associate address. Leave the resource type on Instance, and select your new Smart Node instance from the drop-down list. Click Associate to finish and return to the list. You’ll now see your instance ID under the Instance column, and can click it to return to the instance list and view it!

Connecting to Your AWS Instance

Now we’ll connect to your new server and start working on it! Take note of the IP address for your server under the IPv4 Public IP column. Open your terminal and enter:

ssh ubuntu@XXX.XXX.XXX.XXX -i ~/.ssh/certificates/SmartNodeKey.pem

where XXX.XXX.XXX.XXX is the server’s public IP address. Accept any warnings about the authenticity of the host you’re connecting to by typing yes .

Note that on some systems, you will be able to streamline this process by adding an entry to the file ~/.ssh/config :

Host XXX.XXX.XXX.XXX

User ubuntu

IdentityFile /Users/XXXXX/.ssh/certificates/ SmartNodeKey .pem

This should allow you to connect simply by entering:

ssh XXX.XXX.XXX.XXX

If you like, you can streamline this even further by modifying your operating system’s hosts file and adding a hostname for your Smart Node server’s IP address.

Setting Up Your Smart Node

We’re finally ready to set up a Smart Node and get started with Rocket Pool! Head over to the Node Operator’s Guide for installation and setup instructions.

Make sure that you’re connected to your Smart Node server while you’re working, otherwise you’ll be running commands on your own computer!

Cleaning Up

Once the beta has finished and you’re all done with your AWS instance, you can clean up everything you created during this guide:

Navigate to Instances and select your Smart Node instance. Click the Actions button above the list, and select Instance State > Terminate. Click Release attached Elastic IPs and select your IP address to remove it too. Finally, click Yes, Terminate. Navigate to Security Groups and select your Smart Node group. Click the Actions button above the list, and select Delete Security Group. Finally, confirm the deletion.

That’s it! Your storage volume should have been automatically deleted so there’s no need to remove it manually. The instance will still appear in your list for a short time, but will no longer incur any charges.