Devlin Trace
8 min readFeb 25, 2018

ChainLink Alpha Node in AWS: A Beginner’s Guide

Part 1: AWS Configuration

Part 2.0: Installing ChainLink Alpha Node Software — Ubuntu

Part 2.1: Installing ChainLink Alpha Node Software — Amazon Linux (pending)

Part 3: Configuring Development Environment (pending)

Image courtesy of https://github.com/smartcontractkit

========================================

DISCLAIMER:

This guide is, in no way, intended to be an official source of documentation on this subject matter. While I do hold some ChainLink tokens, I am not affiliated with the project or the team in any formal or informal manner other than my possession of the LINK tokens themselves.

========================================

This guide is intended for people who have little to no prior working knowledge of Linux/AWS/anything, but are still interested in getting a working node for ChainLink’s alpha release. I am aware that there are some options/settings that could be addressed in this guide (VPC, ELBs, ASGs, etc.), but in a poor attempt at making this a bit shorter (this thing is loooooong), I’ve decided to exclude it for at least the first version.

Full disclosure: If you are even relatively familiar with AWS and/or Linux, this guide will be quite (very) verbose. If you’re looking for a more efficient guide, I recommend Thomas’ official guide he made in video format.

We’ll need a few things before we start:

  • Amazon AWS account (this is free for the sake of following this guide, but once mainnet launches, you’ll want to move away from t2.micro instances)
  • Programs to allow SSH access to your AWS instance (Virtual Machine) such as PuTTY + PuTTYgen for Windows users or Terminal for Mac/Linux users

Once you have created an AWS account, and downloaded PuTTY (if applicable), we’ll login to AWS and get started.

Click on, ‘Services’ and then ‘EC2’ (located under ‘Compute’)

For best practices, let’s get our ‘Security Groups’ set up first.

This is located to the left of the page under, ‘Network & Security

We’ll go ahead and click on ‘Create Security Group’ located on the top left

We’ll want to give this security group a name that is applicable to its access control. In this first example, we’ll simply allow inbound SSH from our current public IP address.

Once we have given the security group a name, go ahead and click on ‘Add Rule

Under Type, we’ll select ‘SSH’ (port 22). Under Source, we’ll select ‘My IP’. For the Description, name it something that is applicable such as, ‘Home Public IP’. Then click on ‘Create

Just like that, you’ve created a rule that states, ‘Allow inbound connections over port 22, from <your public IP> to whatever instance I apply this rule to’

Let’s create an instance and apply this rule to it.

While still on the EC2 Service page, up towards the top left, you’ll see ‘Instances’ under ‘Instances’ Click on this, then click on ‘Launch Instance

In this example, we’ll use Ubuntu 16.04. Once you locate this, go ahead and click, ‘Select

Go ahead make sure that you have the t2.micro selected; this is the free tier. Next we’ll click, ‘Next: Configure Instance Details

On the next page, we’ll want to be sure we assign this instance a public IP address to allow us to connect to it. Make sure it is set to ‘Enable’. For this guide, we’ll leave everything else set to default values. Click on, ‘Next: Add Storage’.

We’re not going to be messing too much with this next page since this guide is for people getting their feet wet. Just change the size of your root volume to ‘20GiB’ and click on ‘Next: Add Tags

On this next page, you can add tags to your instances and/or volumes. This is a bit more complicated than this guide is set out to be, but we’ll mess with it since we’re here. Go ahead and click ‘Add another tag’set the key to ‘Name’ and value to whatever you’d like the name to be. In this guide I named it ‘ChainLink-Alpha-Test’.

After you’ve set the Name of your Instance, go ahead and click on ‘Next: Configure Security Group

On this next page, we’ll be applying the security group that we created.

Click on ‘Select and existing security group

We’ll go ahead and check the box next to the Security Group we created. If you’re following this guide verbatim, it should be named ‘SSH-Access-home’. Next, click on ‘Review and Launch

On this page, you can review your settings that you made. Go ahead and click on ‘Launch

A pop-up window will appear asking you to create a key pair.

This part is very important. This is how you will authenticate with your instance when trying to connect via SSH. Because this is important and this guide is geared towards a beginner, I’ll include the directions detailing on how to utilize the keys, but if you’d like to know more about what it is that we’re actually doing, I recommend you look at these links.

If you already know how to do this stuff, I highly recommend you move past this part. Just scroll until you see a picture of a cute baby chicken (I’d say cute chick, but I wanted to provide accurate expectations).

On this page, go ahead and select ‘Create a new key pair’ if it’s not already selected. We’ll name this key pair (in example I named it ‘AWS-ChainLink-Alpha-Test’) and then click on ‘Download Key Pair’.

We should have downloaded a .pem file. If you’re following verbatim, the file name will be AWS-Chainlink-alpha-Test.pem. Please save this in a directory that is not your downloads folder — somewhere you won’t forget.

We will now open a program called ‘PuTTYgen’. Once you have this open, you should be presented with a window similar to the one pictured below.

Within this application window, we will want to click on File > Load Private Key

This will open a Windows Explorer window. Navigate to the location where you placed the .pem file we just downloaded.

Change the file type to ‘All Files (*.*)’ and then select the .pem file then click ‘Open

A window will pop-up confirming the import of the key. Go ahead and click ‘OK

In this next window, we’ll see some options…

…We’ll ignore these options/settings (I know some of you who know about key pairs are reading this part anyway and want me to explain the password part, but this will be secure enough for an alpha test that you’ll probably be turning off in a couple hours anyway) for now. If you’re interested in these settings, read the links I referenced before.

Don’t worry about the different options here, because there’re those buttons that say ‘Save Public Key’ and ‘Save Private Key’. Click on ‘Save Private Key’. Save this in a secure location that you won’t forget. If you lose/delete this, you won’t be able to connect to any instances using this key pair.

Click yes to confirm the lack of password. Save this in a place you won’t forget/delete it.

Go ahead and close PuTTYgen.

Now that you have the key, we’re able to connect to the instance that we just made.

Image courtesy of https://www.mailorderpoultry.com

Alrighty; Now that we have your key sorted, let’s make sure that your instance state is showing as ‘Running’ on the EC2 page in AWS.

If it is, go ahead and click on it to highlight it and then in the lower right hand corner, you’ll see ‘Public DNS(IPv4)’. Next to this, is the publicly available DNS name of your instance. Copy this to your clipboard (highlight, right-click, copy)

Now that we have the public DNS name, we’ll open up PuTTY, not PuTTYgen.

Once we have PuTTY open, we’ll enter the connection settings then save them for future use.

For the ‘Host Name (or IP Address)’ field, we enter:

ubuntu@<your public DNS name>

Leave the port set to the default value (22).

Under ‘Saved Sessions’ go ahead and give this a name. In this example I named it the same as my EC2 instance.

Next, we’ll be selecting the private key that we generated to authenticate with the server.

In the left-hand pane, Expand ‘SSH’ then click on ‘Auth’. A new set of options will be provided to you. Leave these settings to their defaults; go ahead and click on ‘Browse

Navigate to where you saved the private key, and select it. We’ll go ahead and save this session now that we have selected our private key for auth (so we don’t have to do this every time we want to connect to the instance).

Scroll up in the left hand pane of PuTTY until you see ‘Session’ at the top. Click this, then go ahead and click ‘Save’.

Now, click ‘Open’ Accept the use of the key, and you should now have a shell terminal to your Ubuntu box.

Now that we have shell access to our machine, we’ll continue on to the next part of the guide.

Part 2.0: Installing ChainLink Alpha Node Software — Ubuntu