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
- For assign a community group:
- 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 email@example.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> Example: rnode run -b rnode://firstname.lastname@example.org: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.
16 thoughts on “Running RNode on Amazon AWS (EC2)”
Thanks for the guide! I think the Pyrofex Release bootstrap server address link is wrong, shouldn’t it be: https://rchain.atlassian.net/wiki/spaces/CORE/pages/501842019/RNode+bootstrap+addresses
Hello! Thanks for the guide, I think the link for the bootstrap server is wrong, shouldn’t it be https://rchain.atlassian.net/wiki/spaces/CORE/pages/501842019/RNode+bootstrap+addresses?
Thanks Ramiro for the catch! It has been updated.
If you experience a timeout error using the run command above, try adding “`–default-timeout 6000“` after “`run“`.
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?
FYI I did change to the bin directory and can see the rnode and rnode.bat files there.
Got the solution which is is to add ‘./’ before rnode. So the command line is ./rnode run -b –validator-private-key
How do I update to rnode 6.2?
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.
Great content useful for all the candidates of AWS Training who want to kick start these career in AWS Training field.
Good article .thanks for posting pls update new articles like this
Thank you so much for giving us this information about the AWS, here I am having a query which is
How do I update to Rnode 6.2?
I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
Keep writing more articles like this, I would like to share with my colleagues
Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
Comments are closed.