Hop Docs
Developer Docs

EC2 Setup

Set up a Hop Node on EC2

Node Creation

Create an EC2 instance to run your Hop Node

On the AWS website

  1. 2.
    Sign into your AWS account
  2. 3.
    In the "services" search bar, type "EC2" and click on the first result
  3. 4.
    Click "Launch Instance"
  4. 5.
    Select "Ubuntu Server 20.04 LTS (HVM), SSD Volume Type"
  5. 6.
    Search for the instance type "m5.large" and select this instance
  6. 7.
    Click "Next: Configure Instance Details"
  7. 8.
    Click "Next: Add Storage"
  8. 9.
    In the "Size (GiB)" column, use "100" instead of the default "8"
  9. 10.
    Click "Review and Launch"
  10. 11.
    Click "Launch"
  11. 12.
    Select "Create a new key pair" and name it "hop-node"
  12. 13.
    Click "Download Key Pair" and save the .pem file on your machine
  13. 14.
    Click "Launch Instances"

In the Terminal on your local machine

  1. 1.
    Navigate to the directory where you downloaded your .pem file (for example, try cd ~/Downloads)
  2. 2.
    Run the following commands to set up your Hop Node directory and server access.
i. Create .ssh directory if not existing already:
mkdir ~/.ssh
ii. Move .pem file to the ssh directory:
mv ~/Downloads/hop-node.pem ~/.ssh
iii: Change the permission of the .pem file for SSH:
chmod 400 ~/.ssh/hop-node.pem

On the AWS website

  1. 1.
    Navigate to your EC2 instances (this should be the page you were on last)
  2. 2.
    Select your instance and click the "Connect" button
  3. 3.
    Choose "SSH client"
  4. 4.
    Copy the last line labeled "Example"
In the Terminal on your local machine
  1. 1.
    Paste the command you copied and run it
  2. 2.
    When prompted, type "yes" and click enter

Docker Installation and Node Set up

On your new EC2 Ubuntu instance, install Docker and pull the latest Hop Node:
sudo apt-get update
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt-get install docker-ce -y
sudo usermod -aG docker $USER
newgrp docker
docker pull hopprotocol/hop-node
Set up the Hop Node configuration:
mkdir ~/.hop-node
vim ~/.hop-node/config.json
In this file, paste the default configuration example:

Keystore Generation and Funding

Generate the Keystore that will be the Hop Bonder.
docker run -v ~/.hop-node:/root -it hopprotocol/hop-node keystore generate --path /root/keystore.json
Follow the instructions in your terminal and return to this page upon completion.
The command ends by printing the public key associated with your Hop Bonder. You may now send funds to that address.

Running the Bonder

Run the following command to run the Hop Bonder
docker run -d hop-bonder -v ~/.hop-node:/root -it hopprotocol/hop-node --config /root/config.json