Amazon AWS Ethereum Cloud Mining Tutorial-12 Step Guide to Generating ETC!
How do you mine ETC fast and on the cloud?
The answer is Amazon AWS!
Creating an Ubuntu Linux virtual machine on AWS EC2 (Amazon Web Services, Elastic Compute Cloud)
STEP 1 - Get an Amazon AWS Account and begin cloud computing!
Amazon Web Services (AWS) is a cloud computing service provided by Amazon, the well known e-commerce giant. The registration process is integrated with Amazon.com, so you can already sign-in with your existing account if you have one! Please note AWS offers the EC2 service free for 750 hrs/month, for 12 months for the Linux t2.micro instance. This is a good option for testing and getting familiar with the system before you deploy into paid services.
Once you are signed in on AWS you will be presented with a list of services offered by Amazon. Select on EC2 (stands for, Elastic Compute Cloud)
Step 2 - Setup the pre-built AMI (Amazon Machine Image) on AWS EC2
An Amazon Machine Image (AMI) provides the information required to launch an instance, which is a virtual server in the cloud. For this tutorial, we need to use the following AMI: IMAGE: ami-2cbf3e44 for US-East (Ubuntu Server 14.04 LTS (HVM) – CUDA 6.5)
To find the AMI go to the navigation bar, select US East (N.Virginia). Then In the navigation pane, click Images -> AMIs. Next switch to the Public Images next to the search filter (the default is "Owned by Me" which will be at first empty, if you do not yet own any AMI) Select Community AMIs Tab and Click on the search filter to (search by) AMI ID -> ami-2cbf3e44 Note: Make always sure you are in the correct region (US East, N.Virginia as we said) otherwise you will not see the AMI we are insterested in on the list. Select the ami-2cbf3e44 and click on the blue button, “Select”. Now you can choose an Instance Type.
Select GPU instances g2.2xlarge or g2.8xlarge and click Next: Configure Instance details. WarningI recommend going with the smaller one first, or even stick to the t2.micro free instance for testing (not mining) to save money during the learning curve.
Step 3 - Configure Instance Details
Leave the default settings, click Next: Add Storage
Step 4 - Add Storage
I added 60 Gigs on each volume. The blockchain is growing so it is better to get more, this should give me suitable time to figure out how to migrate my data volumes with snapshots. After adding the storage click Next: Tag Instance
Step 5 - Tag Instance
Leave the default settings alone and click Next: Configure Security Group.
Step 6 - Configure Security Group
Click on Create new security group, make sure you add your ip and allow TCP & UDP for everyone on Port 30303.
Step 7 - Review, Launch, and Select a Key Pair
Check over all your settings, and if they are correct select Launch!
After completing this final section, check the box and launch the instance. If you got everything completed you should get a launch status screen. Click view instances to proceed.
Step 8 - Connect To Your Instance
Once you have launched your image you can monitor it and get your connection string here.
Click Connect, and your connection info will appear. What you will do is paste this connection string in your terminal to access the cloud server for installing Ethereum.
Step 9 - Installing Ethereum on your Instance and Start Mining!
Ethereum client comes in 3 implementations. One written in Go language, another written in C++, and the third written in Phyton. At the moment, the only implementation supporting GPU mining is the C++ implementation. However, the live testnet is running on the Go implementation! Therefore, you will need the Go implementation to read, synchronize the chain and credit Ether on your account, but it is the C++ miner to have GPU support.
Install geth (the Go-Ethereum command line client)
Run the following commands to install the latest developer version of go-ethereum
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum-qt
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo add-apt-repository -y ppa:ethereum/ethereum-dev
sudo apt-get update
sudo apt-get install ethereum
and type "Y" to install.
Step 10 - Use geth to Download the Blockchain
First things first, type the word screen in your terminal.
This will initiate the screen program so you can keep your processes running. Downloading the blockchain takes a long time, and you want to make sure your processes keep running after you get disconnected from them. You have seen it a million times- Broken Pipe, then the panic sets in, where did it geth go, is it still running somewhere? Nope, why, because you need to have a container to hold the process, in this case it is called Screen. At first it may look intimidating, but it is very simple to use. Here is a link to a good resource that explains how to use it. https://www.howtoforge.com/linux_screen
Once you get your new screen open run the line of code below to launch geth
You will know it is done downloading blocks when it starts downloading around one at a time.
Step 11 - Install the C++ miner (ethminer)
Use screen to locate your geth process. Type the command below into your terminal.
Next connect to your screen
screen -x (paste.your.screen-pid-here)
Blockchain Not Finished
The image above shows an example of the blockchain just getting started. Once it shows it importing 1 block at a time you will be ready to start mining.
Please Note if you need to stop geth for any reason just press Ctrl C and it will terminate.
Type these commands into your terminal to install ethminer.
sudo apt-get update
sudo apt-get install cpp-ethereum
ethminer -G -M
Step 12 - Create A New Geth Account and Synchronize Go and C++ clients to start mining ETC!
As above type these commands into the terminal of your Amazon AWS cloud instance.
geth account new
Don’t forget to backup your address and the passphrase you are prompted to create.
To check if account generation was successful type the command:
geth account list
To check your ETC balance type
geth --rpc console
Then hit control-A control-D
Now start the miner
ethminer -G --opencl-device 0
Then hit control-A control-D
Enter screen -ls to verify you have two detached screens running in the background
Note: If you're using the larger g2 instance with 4 GPUs (the 2.8) you may need to start ethminer 4 times, each time adding a --opencl-device <0..3> argument
So, you will need to start ethminer 3 more times with these commands:
ethminer -G --opencl-device 1
ethminer -G --opencl-device 2
ethminer -G --opencl-device 3
One final note, if you would like to mine with a pool go over to miner gate.com and sign up. Then launch your ethminer like this:
ethminer -G -F http://eth.pool.minergate.com:51777/YOUR_EMAIL –disable-submit-hashrate
That is it, now you should be able to see ethminer getting work packages from geth, and mining. Please note this blog article is a work in progress I am creating as I follow the tutorial for mining Ether at https://github.com/angelomilan/ethereum-guides/blob/master/GPU-cloud_mining.md. At the time of posting this blog I am getting really close to getting my blocks all up to date. I will update this blog if there are any changes or if I run into any problems. If anyone has any comments, changes, and or suggestions please feel free to add comments below and I will get back to you and or update this post if needed. My goal is to create an easy to follow guide for cloud mining ETC, with help from the community I know it can be done!
** Update 7-31-16 Everything Working!**
I have checked over the instructions, did a small edit, however I got everything running, wow! I will clean this article up and add some more screenshots. The tricky part is just having 2 screens open at same time, and also make sure you stop geth from the original blockchain download, and re-launch it with the rpc flag.