Create an Amazon AWS EC2 Ubuntu VPS

Posted by David Harding, Justin O'Brien

Create an Amazon AWS EC2 Ubuntu VPS

This tutorial will help you create a Virtual Private Server (VPS) using Amazon Web Service's (AWS) Elastic Compute Cloud (EC2) so that you can install 21 and run your Bitcoin-payable services in the cloud.

Note: as of this writing, Amazon provides 750 free hours a month of hosting on their platform for certain services.

Creating an account

Begin by going to the Amazon Create an account page.

New account

Enter your email address and click Sign in using our secure server. This will take you to a registration page:

Enter email

Enter your name, email address, and a secure password:

Enter personal information

Choose a personal account and fill in the rest of your address information:

Enter other address information

Enter your billing information. Note that this account shouldn't be charged if you use the free plan:

Enter billing information

Provide Amazon with your phone number for identity verification:

Enter phone number

When they call you, they will provide you with a pin number to enter:

Enter pin number

After verifictaion, you can click the Continue button to proceed to the next step:

Click continue button

They will offer you several support options to choose from. The Basic plan is free:

Choose basic plan

After this step, you will have finished the basic setup for your AWS account. Next we will create an ECS VPS.

Creating an ECS VPS

If you just finished creating an account, Amazon should provide you with an option to Sign in to the Console:

Sign in to the console

If you're logging back in, you can choose this option from top menu on the AWS home page:

Login button

On the first page of the console, in the Compute section, choose EC2:

Choose EC2

On the second page of the console, click the Launch Instance button:

Click Launch Instance

This will prompt you to choose an image. We recommend the default Ubuntu image, "Ubuntu Server 14.04 LTS (HVM), SSD Volume Type - ami-9abea4fb". Click the select button to its right:

Select Ubuntu

This will give you an option to choose system details (how much performance you have). On the free tier, we suggest using the recommended system of t2.micro. Click Review and Launch at the bottom right to continue:

Review and launch

You will now be given a chance to review the details for your Virtual Private Server (VPS), after which you should click Launch:

launch

Amazon will ask you to select an SSH key pair:

Select an SSH keypair

If this is the first instance you're creating, you don't have a keypair, so you should choose to Create a new key pair:

Create a key pair

This will prompt you to name your key pair and then Download the Key Pair to your computer:

Download the key pair

You want to save the key pair to your computer:

Save the key pair

We'll use the downloaded file in a moment. Next you want to click Launch Instance on the same screen. This will take you to another page where you can click the automatically-generated identification number of your VPS in order to view its details:

Launch instance

As of this writing, this displays a warning the first time you run it. You can click the x in the top-right corner in order to bypass.

Click the x

To proceed, you will need the Public DNS address for your VPS, so copy it into your clipboard.

Public DNS address

For the final step (logging into your server), the instructions differ slightly by platform:

Linux

Use your package manager to install openssh-client; for example, on Debian or Ubuntu you can run the following command:

sudo apt-get install openssh-client

After it is installed, run the following command replacing Downloads/two1.pem with the location of the key file you downloaded earlier and replacing ec2-52-40-243-238.us-west-2.compute.amazonaws.com with the public DNS address you copied into your clipboard earlier:

ssh -i Downloads/two1.pem ec2-52-40-243-238.us-west-2.compute.amazonaws.com

A warning message will be displayed. Type yes to confirm that you've read it:

Confirm that you read the warning

After that, you will be logged into your VPS:

Logged in

From here, you can continue to the Introduction to 21 to install and begin using 21.

Mac OS X {#osx}

Open Finder and start the terminal:

Finder

Run the following command to change the permissions on the .pem file you downloaded with the SSH key, replaing Downloads/two1.pem with the name of the file you downloaded:

chmod 0400 Downloads/two1.pem

Run the following command replacing Downloads/two1.pem with the location of the key file you downloaded earlier and replacing ec2-52-40-243-238.us-west-2.compute.amazonaws.com with the public DNS address you copied into your clipboard earlier:

ssh -i Downloads/two1.pem ec2-52-40-243-238.us-west-2.compute.amazonaws.com

A warning message will be displayed. Type yes to confirm that you've read it:

Warning message

After that, you will be logged into your VPS:

Logged in

From here, you can continue to the Introduction to 21 to install and begin using 21.

Windows

Begin by downloading PuTTY, an ssh client for Windows.

Start PuTTY and fill in the public DNS address you copied into your clipboard earlier:

Enter DNS address

Then go to the Connection->Data section and choose the login username of ubuntu

Data category

Then go to the SSH->Auth section and click the Browse button. Choose the .pem file you downloaded earlier:

Enter key

Then go to the SSH section and enter the username ubuntu.

Username

Finally, return to the main screen and click the Open button to open your session.

From here, you can continue to the Introduction to 21 to install and begin using 21.