Setting up RNode on a VPS or a cloud service like Amazon Web Services (AWS) EC2 is desirable for users who are not able to set port forwarding or UPNP due to various network setups, or for users who might want to run RNode for long periods (via  screen).

This is a step by step guide to run RNode 0.5.3 on Amazon Web Services. The guide uses instances that are eligible for the Amazon 12 month free tier  https://aws.amazon.com/free/.

1. Create a new EC2 instance and set up port forwarding

  • Choose the Amazon Linux 2 AMI Image

  • Choose your instance type and select the Configure Security Group tab.

  • On the configure security Group tab:
    • For assign a community group:
      • Select “Create new group”
    • Click “Add Rule”
      • select  “Custom TCP Rule” under “Type”
    • Port Range
      • enter: 40400–40430
    • Leave the source to 0.0.0.0/0
    • The description can be whatever you want
  • Click “Review and launch” and then review your settings

  • After clicking on “Launch” a window will appear(as shown below):
    • You can Select either: “Create a new key pair” or “choose an existing one.”
    • Select “create a new key pair”
      • Note: If you create a new key pair, you must download the pem file before you can launch the Instance.
    • Type in a name for the key pair name
      • Note: for this tutorial we will call it: EC2-1
    • Then click “Download key Pair”
      • Note: Store this file in a safe place
    •  Last click “Launch Instance”

  • Once it launches, you will see a banner that says: “Your Instances are now launching”. Click the Instance ID and take a note of the instance public DNS. It will be used as the address to SSH to from our local machine.

2. SSH to your EC2 instance:

  • Open up terminal or the PowerShell (if you are a Windows user).
  • For Linux and MacOS users, the pem file will need strict permissions:

Open a terminal and change the permissions of the .pem file.

$ chmod 400 ~/.ssh/ec2-1.pem
  • Once your instance is initialised, use your private key file (ec2–1.pem) and the address of your EC2 instance (the Public DNS we mentioned above) to log in.
$ ssh -i <Name>.pem ec2-user@<Public DNS(IPV4)>
Example:
$ ssh -i ~/.ssh/ec2-1.pem ec2-user@ec2-35-174-113-155.compute-1.amazonaws.com

3. Environment setup and RNode installation

The environment setup script that we will run (https://git.io/fNnKN):
https://gist.github.com/ddayan/d16c71b82a8ee544c0e63338d05d4107

$ wget https://git.io/fNnKN -O rnode-env-setup.sh
$ chmod +x ./rnode-env-setup.sh
$ ./rnode-env-setup.sh
$ source ~/.bash_profile

4. Installing RNode

The RNode installation script we will run (https://git.io/fN0RA):
https://gist.github.com/ddayan/8b6ccb1d1f6d61b12ce132f9ea82771f

$ wget https://git.io/fN0RA -O rnode-install.sh
$ chmod +x ./rnode-install.sh
$ ./rnode-install.sh
Using RNode version: 0.5.3. Please run the script with the -v option if you wish to specify a different version.
1) Release
2) Master
3) Dev
4) Test
5) Quit
Please enter your choice: 1


5. Running RNode

Pick an unclaimed validator private key from here.

Get the Pyrofex Release bootstrap server address from here.

$ rnode run -b <server address> --validator-private-key <your private key>
Example:
rnode run -b rnode://baa289f8b32ce8009753bbffcd2c6814aef0da9b@52.119.8.52:40400 --validator-private-key 612feec901631aeae4c9378d2b453dfa269774c43f990f371056479b110a0e19

Now you have a understanding of how to set up a RNode using AWS. For more information on node setup, or testing, join the #node-testing channel in our Discord.