cloud-eth2

my cloud eth2 scripts for an aws ubuntu ec2 instance

Stars
11

cloud-eth2

scripts and instructions for running an eth2 node on aws ec2 (ubuntu)

Launch an EC2 instance with the Ubuntu Server 20 AMI

I went with a c4.xlarge with 400GB free

I have ports 30303 and 13000 open in your secuirty group and 22 for ssh from my home ip

SSH in and clone down this repo:

git clone https://github.com/austintgriffith/cloud-eth2.git

Navigate to the cloud-eth2/geth directory and install Geth (eth1 client):

cd ~/cloud-eth2
cd geth
chmod +x *.sh
./installAndUpdate.sh

Tell pm2 (a process manager) to run our geth node on boot:

pm2 start geth.js
pm2 save
pm2 startup

It will give you a PATH command you need to run: image

You should be able to follow your geth.log now (even after you reboot the machine, it should run at boot):

cd ~/cloud-eth2/geth
tail -f geth.log

It could take a while for your geth node to sync with the mainnet eth1 chain. (You know it is done when it is processing 1 block at a time.)

While it syncs, you can get started with Prysm...

Navigate to the prysm folder, make the script executable, and install:

cd ~/cloud-eth2
cd prysm
chmod +x *.sh
./installAndUpdate.sh

Now you can launch your Prysm beacon chain process and add it to PM2:

pm2 start prysm.js
pm2 save

You can follow the logs for your Prysm beacon chain:

tail -f prysm.log

You'll notice that it needs to wait for the geth node to be in sync first:

You will want to move your ETH2 keys from the LaunchPad into ~/cloud-eth2/prysm/eth2_validator_keys.

Then, run the import script to bring them into Prysm:

cd ~/cloud-eth2
cd prysm
./importKeys.sh

Finally, you are ready to fire up your validator:

pm2 start validator.js
pm2 save