The Nontechnical Guide to Onboarding An Ambrosus Atlas Masternode

subliminal-amb
Jul 25, 2019 · 11 min read

This guide is targeted at non-technical users who are going through the process of onboarding onto AMB-NET. As a developer who has recently been onboarded, I have seen many community members struggling with setting up their masternode. This is usually because they do not understand the technical terminology used or have never worked with a unix terminal before. The goal of this guide is to break down the concepts for everyone to not only feel comfortable setting up their masternode, but also to understanding the reasoning for each step along the way.

To complement the existing wonderful guide on reddit, we will setup our node using DigitalOcean.


Overview

  1. VPS Setup
  2. Setup Your Node
  3. Convert to Native AMB
  4. Running Your Node
  5. Final Comments

VPS Setup

What is a VPS?

A virtual private server allows users the ability to run their own server on shared physical resources. As an analogy, think about it like renting office space in an large office building. We own our space and we can customize it to our needs, but at the same time the building is shared with other people.

The term virtual private server is named as such because virtualization is the technology used that allows the host (in our case DigitalOcean) to split up a single server into multiple ones. The word private means the server will only be accessible by you and resources will be dedicated for your server as specified during the VPS setup (i.e. RAM, CPU, Storage etc.)

Why do I need a VPS?

Our VPS will be where we setup and run our node from. Instead of running our nodes from our own desktop machines, hosting on a VPS will allow us benefits such as reliable availability, ease of setup & configuration, and future scalability

Step 1: Setup a DigitalOcean Droplet

To begin, first create an account at DigitalOcean

disclaimer: the link above is my referral link and if you choose to use it you’ll get $50 of credit for your first month. Otherwise you can visit digitalocean.com

Next, login and create a new project. Call it whatever you’d like, I named mine “ambrosus-node”. For the last field on this page, select Service or API

Now that we have our project, let’s add our server to it.

Click on the create button at the top of the page and select Droplets

Now we need to select the configuration and specs of our server. Assuming you are onboarding as an Atlas node we care about having enough space since our primary role in the network will be to store bundles.

Select the following:

  • Ubuntu 18.04 x64 — this should be selected by default. 18.04 is the latest stable version which is always a safe bet. More about Ubuntu versions if you are extra curious https://ubuntu.com/about/release-cycle
  • Standard Plan
  • $10 / month with 1 CPU / 50 GB storage — best bang for your buck since we will need to extra storage as an Atlas node
  • Select any data center region — since the cryptoeconomics have been modified to use the DMP algorithm, location and latency should no longer be a major factor into your performance on the network. Yay for fairness
  • Add and select your SSH key — see below if you do not know how to setup SSH
  • Name the droplet and assign it to our project

Highly Recommended Step: Setup SSH Authentication

Instead of using a username and password we’ll opt to use a cryptographic SSH key-pair. This is more secure because a private key takes the place of a password, which is generally much more difficult to brute-force.

For Windows Users

You’ll need to install an application called PuTTY which will allow you to create and get your public key. See the following document https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/create-with-putty/

For Mac / Linux Users

Open your terminal application and type in the following command

ssh-keygen -t rsa

You will be prompted to select a location for the keys, leave it as the default this will generate two files in your ~/.ssh directory

  • id_rsa — your private key. Never share this key, this is for you and only you to see.
  • id_rsa.pub — your public key. This is the key you will share.

Next, enter a passphrase for your key. This password will be used whenever you are authenticating with the SSH key so keep it safe.

Now we need to add our public key to our Droplet. Navigate back to DigitalOcean, click New SSH Key and paste in the contents of id_rsa.pub.

One simple way to accomplish this is with the cat utility in our terminal

cat ~/.ssh/id_rsa.pub

This will output the contents of that file to our terminal window. From there we can simply copy and paste it.

Great! Your droplet is configured for SSH authentication, let’s continue.


Now submit the current page to create your droplet. You’ll be brought to another page where you can see the status of your server as it spins up.

Next, lets configure the firewall to our server. Click into your newly created droplet and go to Networking. Create a new firewall with the settings below for Inbound Rules and assign it to your droplet.

For our server’s firewall we want to abide by the principle of least-privilege, which says that we should only allow access to information and resources that are necessary for the purposes we expect. Here the Ambrosus team has outlined these settings as requirements to allow the network to communicate with our node.

Setup Your Node

Now that our server is running, we need to connect to it.

Step 2: Login into your VPS

For Windows Users

You’ll have to use PuTTY to connect to your VPS. Heres a good guide on how to do that in DigitalOcean https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/putty/

If you’re familiar with Windows Subsystem for Linux (WSL) and have it set up you can follow the Mac / Linux steps below.

For Mac /Linux Users

Begin by copying the IP address of your droplet. You can find it by viewing your droplet in your browser. Simply click on it to copy it to your clipboard. Next, open your terminal and type in the following command

ssh root@<droplet_ip_address>

Replace “<droplet_ip_address>” with the address we had previously copied. This above command tells us we want to SSH into the root user at the following server IP address. If you setup a password for your SSH key, you’ll be prompted to enter it here. Say yes to any other prompts.

Note that root is a special superuser and is the default user who has all rights or permissions in our Linux operating system.

Just like that you’ll be connected to your VPS. You are now remotely accessing your private server!

If you recall, we setup our server with the Ubuntu OS. Other than the actual operating system, there is nothing else installed on our server. Time to change that.

Step 3: Retrieve and run the setup script

If you’ve been following the ambrosus github, you’ll notice a project called ambrosus-nop. This is the tool created by the team to facilitate onboarding.

Let’s start by downloading this tool into our server. Run the following commands

wget https://nop.ambrosus.com/setup.sh

chmod +x setup.sh

The first command beginning with wget is a utility that retrieves the content of the setup script and related files we’ll need

The second command, chmod simply changes the permissions of the .sh file so that we’ll be able to run the script. The “x” is for executable

Now let’s run this script, its an interactive script so have you’ll be using your up/down arrows along with the enter key to make your selections.

./setup.sh

Options to select:

  • Main network
  • Create a new key — this is a Ethereum wallet in case its not clear, we need to either provide a key to an empty wallet we’ve created elsewhere or more simply we can just let the script create the new public/private key for us. We will choose the latter.

IMPORTANT: Do not enter the private key to your Ethereum cold wallet, you will be creating an entirely new wallet above to use with the network

  • http://<droplet_ip_address> — paste in the IP address to your server that should still be copied onto your clipboard. Don’t forget the “http://” prefix. This is how the network will be able to reach our node.
  • Email address

Once you complete the script there are two files you should be aware of

1. state.json — this file stores the result of the script you just completed, in here you can find the private and public key to the wallet you had created. Do not share the private key with anybody! The public key will be used for whitelisting below.2. TOS.txt — this is our signed terms of service agreement. We’ll be copying the contents in the following stepsView the contents with the following commandcat ./ambrosus-nop/state.jsonor cat ./ambrosus-nop/output/TOS.txt

Thats it, you’ve now configured your node, time to compile the information needed for whitelisting into a draft email.

Step 3: Create a draft email of our whitelist request

When completing the script, you should see it write out a bunch of text into the terminal. Copy the text beginning with the { and ending with }, see below for an example

{
network: main,
address: 0x123456789
role: Atlas Omega
email: youremail@gmail.com
url: http://127.0.0.1
...
}

We need to send this to tech@ambrosus.com. Start an email and title it “Atlas Omega Whitelist Request” or similar and paste in the above text.

In addition to this text, they ask you to submit the signed terms of service agreement. Recall the cat command we used previously to read out the public SSH key. Let’s use that again here.

cat ./ambrosus-nop/output/TOS.txt

Copy the contents of the TOS.txt that were output onto the terminal and create a new text file on your actual desktop machine to save it in.

Lastly, attach the TOS.txt file to your email and save it as a DRAFT

The onboarding process has changed slightly, you now need to have our tokens transferred to native AMB before you can submit our request for whitelisting. Complete the next section before sending out your whitelist request.

At the end of this section you have:

  • Downloaded the ambrosus-nop tool onto your VPS
  • Completed the initial setup steps
  • Prepared a draft of your email for whitelisting

Convert To Native AMB

You most likely have your ERC-20 amb tokens stored somewhere in an Ethereum cold wallet. In this section we’re going to convert these tokens to native AMB which we’ll be able to use in the mainnet.

Step 5: Setup MetaMask and send our ERC-20 tokens

First, download MetaMask to your browser if it is not already installed. https://metamask.io/

Recall the wallet we previously created in Step 3 as part of running the setup script. This is your primary wallet that you be using to store your native AMB. To get there we’ll need to first send our current ERC-20 tokens to this wallet and use the bridge to do the conversion.

Let’s start with importing our new wallet into MetaMask.

First click on the MetaMask extension in your browser, it asks you to create a new wallet or import one with a seed phrase. Since we don’t have a seed phrase for our wallet, just create a new wallet to get to the next screen.

After creating an account, click on the Account button in the upper right corner, you’ll probably have a colorful image there, and select import account.

Here you’ll paste in the private key to your wallet. See below if you are unsure how to get that.

If you are looking for your private key, recall the state.json file that was created on our server. In that file you can find your private key. Paste that into the form and click import.

Now our wallet is imported into MetaMask. Theres one more step before we send our tokens over, we need to add the Ambrosus Network.

Complete Step 2 in Vlad’s post and return here https://medium.com/@vladtrifa/how-to-connect-to-amb-net-with-metamask-6964c71e217e

With MetaMask configured, you can now send your stake for the masternode you are onboarding to the public address of your wallet. For example, for Atlas Omega thats 75,000. To ensure we cover any additional fees, I would send an extra 300 tokens (total of 75,300). Also, send some Ethereum to cover gas fees, something like 0.05 would suffice.

Once you’ve received the tokens in your wallet, all you need to do next is send it over the bridge.

Open MetaMask and click the Network dropdown at the top, change it to Main Ethereum Network. Navigate to https://bridge.ambrosus.com and click on transfer AMB click on proceed with MetaMask.

Notice the top is Ethereum and the bottom is AMB-NET. If your page does not follow that ordering ensure you have switched your MetaMask network to be connected to Ethereum.

Be sure to accept the transaction on MetaMask. If the transaction seems to be taking too long, you can configure the gas amount by navigating to your MetaMask page and clicking on the transaction in flight. From there you should be able to tweak your gas.

Step 6: Send your whitelist email

Once you’ve received your native AMB to your wallet. You are ready to submit your whitelist email request that you previously saved as a draft.

You should hear back within 24–72 hours about your whitelist approval

At the end of this section you have:

  • Imported your wallet into MetaMask
  • Setup MetaMask with AMB-NET
  • Received native AMB tokens via the Ambrosus Bridge to your wallet
  • Sent your whitelist email

Running Your Node

Step 7: Finishing the setup

Once you’ve heard back from the team with your whitelist confirmation, you are ready to run your node!

Connect to your VPS and run the follow script. Note this script is different than the one we previously ran. Refer to the previous steps if you forgot how to connect to your VPS.

./setup2.sh

Go through the interactive menu again and select any that apply to you. Once you are done with the script you’ll be officially onboarded!

You should be able to see your public address in the list of masternodes. It is sorted with the top being the most recently onboarded nodes.

https://explorer.ambrosus.com/atlas

If you would like to see how many bundles you’ve successfully stored so far simply search your address in the explorer.

Congratulations, you’re officially an Ambrosus masternode operator!

Final Comments

Backup Wallet

Be sure to backup your private/public key to the wallet we created. If you have a password manager, create a secure note. Even better, store it securely offline on paper.

Monitor for Updates

The team is always improving the network, meaning there will be times in the future when you’ll need to update your node. Keep an eye out on Slack for messages by the team. There is an update script that can be run as needed.

Setup a Domain

In this tutorial we use the node ip address from DigitalOcean, it is recommended that you purchase a cheap domain and use that in place of the ip address. There are lots of tutorials online on how to configure a domain. Note, you will not need to whitelist again if you are only looking to update your ip address to a domain.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade