Deploying an Ethereum node on the cloud

Let’s play around with Mr. Ethereum! For this section, we will need to use a Virtual Machine to deploy your Ethereum node. You can follow along (it’s a fantastic way to learn) or just read it. If you get stuck for some reason, please don’t hesitate to reach out to me and ask for help!

This section will have a lot of screenshots from the command line so that it is easier to follow along and check what is actually being done.

There are two main options: to deploy an Ubuntu Virtual Machine using Oracle VM VirtualBox (it’s free to use), or you can use one of the major cloud providers – AWS, Google Cloud, Azure, Alibaba Cloud or IBM – to deploy an Ubuntu virtual machine. The second option is probably easier, more flexible and faster. Ubuntu is just a Linux operating system, just like Windows or macOS but it’s really easy to use for this case.

Going back to deploying you Ubuntu VM, if you deploy a Virtual Machine on your laptop, it may consume a lot of resources from your computer and make it very slow. For this reason, deploying on the cloud is probably the best option. The course's purpose is not to teach how to deploy a virtual machine, but there is a lot of content online, or alternatively, you can ping me a message on LinkedIn, and I will reply as fast as possible.

A third alternative would be to eventually do it directly from your computer, but it’s indeed safer if you connect from an isolated Virtual Machine which you can basically use as a playground. Also, suppose you connect with your personal computer. In that case, you will be exposing your IP to the Ethereum network and being a computer dealing with crypto, you become a honeypot for hackers.

Okay, let’s get our Ubuntu machine ready on AWS!

I’m going to leave you here a quick step by step to deploy an Ubuntu VM on AWS. It’s really simple. Just follow the steps below.

  1. Assuming that you have an AWS account (it takes 3 minutes to open) go to the AWS console and search for EC2

  2. Once your AWS account is ready, navigate to services and select EC2

  3. Click instances à Launch instances

  4. Choose AMI: scroll down until you find the first “Ubuntu Server” option. Click select

https://img-a.udemycdn.com/redactor/raw/article_lecture/2021-03-29_17-35-54-18786236dc6706fdeee380ffcc039d5d.PNG?ohIuVROwvr8kLDMa1QfmSgR_fxFyN8XR707yuskQITeZTISESkRiKVHyQFk7WEjLdJ_XU90iLxmv2outOUevXc_wImcHyL7bolY8vZ5ZmqzkdNeuh7w83dRCOgtQxIERlZDAy0OJM3QdsATCVbFm8JkgbhIMYuDi2yNJYyV-0l7OIQL7S_GZ8u9QQlTbqaALsdcqbw

  1. Select the instance type. Whatever is the free tier may be ok to play around for a bit but note that the instance on the “free tier” may become slow when running an Ethereum node. If that’s the case, the alternative may be selecting a t2.large or t2.xlarge and stop the instance whenever you are not using it to avoid incurring additional costs. Click next

  2. Configure instance details. You can leave most of it as it is. In “auto-assign public IP” select “enable”. To save some money, you can also click “request spot instance”. Spot instances may allow you to save around 50% of the cost, but note AWS may terminate the instances if the spot price increases. You should not use a spot instance if you are running a production blockchain.

https://img-a.udemycdn.com/redactor/raw/article_lecture/2021-03-29_17-36-42-4b6a2722cabacd00cb6af4bee862d4b0.PNG?XLVDQLhyAxlJDv5Gq2Xre37aZ4hjubq9crT_fxOqQgDqaMrEZJHvfqWjSC4_t7x3n6RoynNEYUgJ1ai33DdUATn1UrV0m0P1DJr2Arf4OitvGn77myLC36xxQ4g4kv_z6bs-3wctQd7TQklDPm6vdUxbEasCD7pJy9yOXyZz_GbazNy9xjAMep62qLd6cBgKWoVpbw

  1. Add storage. We will need some storage for our node. To play around, 200GB to 300GB of general-purpose SDD should be enough. Click next

  2. Tags. You can name your Ethereum node here. Type “Name” in the key field and “Ethereum node” in the Value field.

  3. Configure security groups: make sure SSH port 22 is open to the IP range 0.0.0.0/0. This means that it is open to the world. Make sure you remove this once the playground is finished. Click review and launch

  4. Select a key pair that you already use or create and download a new key pair