Running RNode on Amazon AWS (EC2)

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
    • 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)>
$ 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):

$ 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):

$ 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>
rnode run -b rnode://baa289f8b32ce8009753bbffcd2c6814aef0da9b@ --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.

16 thoughts on “Running RNode on Amazon AWS (EC2)
  1. If you experience a timeout error using the run command above, try adding “`–default-timeout 6000“` after “`run“`.

  2. Hi, I ran through the steps on a clean EC2 install and got all the way to step 5. When I run the rnode command, I get a command not found error. I installed the release version off of the menu in step 4. Any idea why I can’t run rnode?

  3. Got the solution which is is to add ‘./’ before rnode. So the command line is ./rnode run -b –validator-private-key

    1. 0.6.2 is under the dev branch.
      run the install script with 0.6.2 version flag ‘./rnode-install.sh -v 0.6.2’ and choose the Dev branch.

Comments are closed.