read

The NEM team would like to thank Malek for contributing this blog.

Introduction

This guide will cover the basic setup of an Amazon AWS account including sign up, creation and configuration of an EC2 instance.

Note: This article follows the basic structure of the Guide How to Setup an Azure account for a NEM Supernode written by Patrick. It would also be useful to familiarize yourself with the original tutorial and forum topic on how to set up a Supernode, or the other tutorials on how to configure a regular node on Windows, Mac, or Ubuntu.

To create an Amazon AWS account, you need:
- e-mail address
- credit card
- phone number

To follow this guide, you will need these additional software downloads.
- putty.exe for SSH connection
- puttygen.exe to create keys for login
- pageant.exe to load the created keys

Key creation

Before we start with Amazon AWS, let's create our login keys with puttygen.exe.
puttygen 1. Start puttygen.exe. Choose RSA and 2048 bits from the bottom.
2. Click on "Generate"
3. Choose a "Key comment" (for example: name of your node)
4. Choose a "Key passphrase" and confirm it
5. Save the public key & private key files
6. Close puttygen

Signup

Open the Amazon AWS signup website and click "Create an AWS Account".

Start Choose "I am a new user," and enter your e-mail address.
e-mail and password

Type your e-mail address again and enter your password.

e-mail and password Enter your contact information and agree to the terms of service.
contact information

Enter your payment information.
payment information

Enter the security check characters and your telephone number. After pressing the button "call me now" you will see a code and receive a phone call. Enter this code on your telephone's keyboard.
identity verification

After entering the right code, you will see this screen.
verification complete

Select a support plan. For expample "basic".
verification complete

Before logging in the first time, wait until the "Welcome to Amazon Web Services" email arrives.
wait for confirmation email

First log in

Click on the link "Getting Started Resources" in the email you received.
getting started You can also use this link https://console.aws.amazon.com/

Click on "Sign in to the Console".

sign in to the console

Enter your email and password.

login

Importing a Public Key

Select "EC2" in the "AWS Services" box.
aws services overview

Select "Key Pairs" in the "Network & Security" Section.
network & security

Select "Import Key Pair".
import key pair

Select your public key file (created in the begin of this guide with puttygen).
select key pair file

Define a key pair name and press "Import".
import the public key

Launch an EC2 Instance

Move to the "EC2 Dashboard" and press "Launch Instance".
launch instance

Go to "AWS Marketplace", search for "Debian" and select it from the list.

Choose an Amazon Machine Image AMI

Choose "Debian GNU/Linux 8 (Jessie)" and click create.
debian 8

Choose an instance type. For operating a Supernode, we recommend using at least a "t2.small" instance. To continue, click on "configure instance details".
instance type

Use the default settings and click on "add storage."
instance details

Use the default settings and click on "add tags".
add storage

Click to "add a name tag".
name tag

Enter your desired server name in the value column. E.g. "Supernode"
To go on click "Configure Security Group"
server name

Add the following rules:
Type: Custom TCP, Port Range: 7890, Source: Anywhere (for NIS)
Type: Custom TCP; Port Range 7880, Source: Anywhere (for servant)
Type: Custom TCP, Port Range 7778, Source: Anywhere (for light wallets)

Notice: For security reasons, you may restrict SSH access by entering your IP-address instead of 0.0.0.0/0 in the first row.

configure security group

Now select the key pair you have uploaded in the "importing a public key" section of this guide and click on the checkbox to acknowledge that you have access to the private key file (you already created the private key in puttygen in the first section of this guide). Finally, click on "Launch Instance"!
select an existing key pair

After launching, you will see a screen indicating the launch status. Click on "View Instances".
launch status

Write down the Public DNS. E.g. ec2-XX-XX-X-XXX.us-east-2.compute.amazonaws.com
public dns

Connecting to your new EC2 Instance

After setting up the instance, we will try to connect to our server.

Start pageant.exe and open "View Keys" from the tray icon.

pageant

Click on "Add Key" and select your saved private key (.ppk) you created earlier with puttygen. After the key is loaded, you can minimize pageant to tray (but don't shut it down, it needs to run in the background).

Start putty.exe.

pageant

Start putty and navigate to "Connection - SSH - Auth". Browse for your private key file (.ppk).

putty auth key

Navigate to "Connection - Data" and input "admin" in the auto-login username field.

putty data

Go to "Session" and enter your instance Public DNS (E.g. ec2-XX-XX-X-XXX.us-east-2.compute.amazonaws.com, not your instance IP-address) in the "host name" field. Save the session (optional) and click "Open".

putty host name A console will open. A username and password are not needed, it will automatically load your username from putty and your key from pageant!

Root access

By default, the user root is deactivated. To activate, log in as a standard user.
Type the following in the console:

sudo su -  

Set a root password with:

passwd  

After setting a password, the root user is activated. To login to your EC2 instance you will still need the standard user (with RSA-key login), but as soon as you are logged in, you can change to root with:

su  

Install Supernode

The EC2 instance is now ready for installation.
For the Installation, we will use Paul's guide (click here), since it has covered everything.

There is one value which you have to change: From section 1.3 change:

Java -Xms768M -Xmx768M  

to:

Java -Xms1024M -Xmx1024M  

Other than that you can follow the guide, and your supernode will be set up correctly!

Blog Logo

A Nember


Published


Image

NEM

Official Blog of NEM/XEM

Back to Overview