Qtum Dapp Developer — Run QTUM AMI on AWS EC2 Instance

Clément Bresson
Coinmonks
4 min readSep 5, 2018

--

AWS — QTUM AMI

On July 2018, AWS released on its marketplace the QTUM Amazon Machine Image (AMI). It includes:

Qtum Core, Qmix web IDE, and Solidity.

When I first wanted to try this QTUM AMI, I did not find any step-by-step tutorial on how to set it up. I finally searched how to do it myself, and thought after that ATUM developers community could profit for such a tutorial.

Prerequisites:

  • An AWS account. If you don’t have one already, you can benefit from the 12 months free-tier, which will enables you not paying for EC2 usage for up to 750 hours a month.
  • Basic Linux knowledge

Step 1: Let’s create an AWS Key Pair

Note: This step 1 is not required if you already have a Key Pair set up you want to use or reuse, neither is specific to QTUM AMI usage. It is a requirement for all AWS EC2 instances.

You have two choices:

Follow official AWS documentation to create a Key Pair:

OR

Follow this step-by-step:

1/ Start by going to SERVICES > EC2

2/ Go to Network & Security > Key Pairs (in the left menu)

3/ Click on Create Key Pair button

4/ Choose a name (we will use QTUM for this example) and click on Create button

5/ The private key is a file — named QTUM.pem in our case — which will be downloaded automatically at this point. IT IS THE ONLY TIME YOU CAN SAVE IT. You will need it later, so save it somewhere safe. For example in directory:

~/.ssh

To move it, you can use following command (if QTUM.pem is located in ~/Downloads directory):

mv ~/Downloads/QTUM.pem ~/.ssh/

6/ Set correct rights for this file with command:

chmod 400 ~/.ssh/QTUM.pem

Note that setting these rights is a required step to be able to connect to your instance later in the tutorial. If we skip it, you will have a warning message.

7/ Congrats! You have successfully created a Key Pair to use with your AWS EC2 Instance.

Step2: Let’s launch QTUM AM on EC2 instance

1/ Go back to SERVICES > EC2

2/ Click on Launch Instance

3/ On left menu, click on AWS Marketplace

4/ Search for “QTUM”

5/ When finding QTUM AMI in the markeplace, click on Select button

6/ A modal appears, showing you the QTUM AMI information. Read it if you want and click on Continue

7/ Select an instance type. For this tutorial I used the relatively small t2.small which is not too pricy. If you are Free Tier eligible and want to take advantage of 750 hours free per month, you should use t2.micro

8/ Click on Review and launch

9/ Review page is shown. You can check here all details before actually launching the instance. When ready click on Launch button at bottom right corner.

10/ A modal appears for you to select desired Key Pair to associate to your EC2 instance. Select Choose an existing Key Pair, then QTUM (unless you named your Key Pair differently). Tick acknowledgement message. Finish by clicking on Launch instances button

11/ Congrats! Your QTUM AMI Instance is now launching! You can click on View Instances on displayed page to go to your instance.

Note: It will take some time for your instance to be ready, but after some seconds/minutes, you should see your instance having Status running and Status Checks being completed.

Step 3: Connect to your running Qtum instance

1/ Go to SERVICES > EC2 > Running Instances

2/ Locate your QTUM instance (if you never used AWS EC2 you will only have one), select it (by clicking on it), and click on Action > Connect button.

3/ A modal with connection info appears, Copy the example, which should look like this (of course address wont be the same):

ssh -i “QTUM.pem” root@ec2–xx–xxx–xx–xxx.eu-west-2.compute.amazonaws.com

4/ Open your terminal, and paste the command. Then modify it to look like this:

ssh -i ~/.ssh/QTUM.pem ubuntu@ec2–xx–xxx–xx–xxx.eu-west-2.compute.amazonaws.com

Note: we just replaced root by ubuntuthis is specific to QTUM AMI we installed — and “QTUM.pem” by ~/.ssh/QTUM.pem, the location where we put the downloaded private key file earlier.

5/ Congrats! You are now logged in with SSH to your running QTUM AMI Instance running on AWS ECS2.

Step 4: What’s next ?

Start by reading the QTUM AMI documentation, which comes inside the AMI.
After connecting with ssh to your instance (previous step), just run:

man ./README.man

Now if you want to learn basic usage of your brand new QTUM AMI running on EC2 Instance, please check following part of this tutorial dedicated to QTUM AMI:

Part 2: Qtum Dapp Developer — Basic usage of QTUM AMI on AWS EC2 Instance

Happy documentation reading & coding!

If you have any idea(s)/suggestion(s), have spotted error(s), and/or would like me to detail more some part(s), do not hesitate commenting this article so I can improve this tutorial.

You like what you read? Help me dedicate more time writing on QTUM.
QTUM address:
QYc3fTQYVZtYUCrrVRVFv4QKHk5gQ4WKie

Get Best Software Deals Directly In Your Inbox

--

--

Clément Bresson
Coinmonks

#Developer #Javascript #React #Node #Blockchain #Qtum