Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The following guide will help you set up your own self-hosted NULS agent "cold" node on a linux cloud hosted server. "Cold" nodes are ideal because they do not hold your collateral private keys on them, and thus it is not possible to lose your NULS if your node becomes compromised. To follow this guide, you'll need a basic understanding of Linux and some of the common tools like putty. Don't know where to get started? Would you rather have the professionals host it? Just reach out to the Node Forge team at sales@nodeforge.io to get started!

...

  1. Create a hosted server on your platform of choice. Digital Ocean is recommended by this guide. Select one with at least these specifications: 
    1. 8 cores
    2. 16 GB Ram
    3. 100GB of SSD Storage
    4. Ubuntu 16.04

  2. Install a helper add-on to unzip files and firewall. If using network storage on platforms such as scaleway, make sure you do not block your storage using ufw inadvertently. See here: https://www.scaleway.com/docs/configure-ufw-firewall-on-ubuntu-bionic-beaver/

    Code Block
    languagebash
    themeEmacs
    linenumberstrue
    apt-get install unzip ufw
    ufw allow 22
    ufw allow 8016
    ufw enable


  3. On the server, create a new user to run the nuls wallet software, then switch to that user

    Code Block
    languagebash
    themeEmacs
    linenumberstrue
    sudo adduser --disabled-password --gecos "" nuls-agent
    sudo su nuls-agent


  4. Download the NULS wallet software and starter data to ~/ and extract them


    Code Block
    languagebash
    themeEmacs
    linenumberstrue
    cd ~
    wget http://nuls-usa-west.oss-us-west-1.aliyuncs.com/1.1.5/NULS-Wallet-linux64-1.1.5.tar.gz
    wget http://nuls-usa-west.oss-us-west-1.aliyuncs.com/data/data-1219733.zip
    tar -zxf NULS-Wallet-linux64-1.1.5.tar.gz
    unzip data-1219733.zip


  5. Start the node software

    Code Block
    languagebash
    themeEmacs
    linenumberstrue
    sh ~/bin/start.sh


  6. Start the command line interface and make sure you get a good response back from the network.

    Code Block
    languagebash
    themeEmacs
    linenumberstrue
    sh ~/bin/cmd.sh
    getconsensus


  7. Let your node synchronize until the "localBestHeight" attribute of your node matches the "netBestHeight" attribute. You can also compare it to the highest block number under "transactions" on http://explorer.nuls.io/. You can check your current synchronization with the following command:

    Code Block
    languagebash
    themeEmacs
    linenumberstrue
    getnetinfo


  8. Create an address for packing on the server. This will be your "PACKING_ADDRESS"

    Code Block
    languagebash
    themeEmacs
    linenumberstrue
    create


    Warning

    Do not set a password. Just hit enter. This address will not hold any NULS in it, so it's safe


  9. Get the private key of the packing address you just created by running the "getaccounts" command, and copying the contents of the "address" and "priKey" field to a notepad for later use. This will be your "PACKING_ADDRESS" and "PACKING_KEY", respectively.

    Code Block
    getaccounts 0 0


  10. Open your NULS "collateral" wallet (the wallet that contains all your NULS) and copy down the address that contains your NULS 
    1. Open NULS wallet that has collateral NULS in it
    2. Click the "Wallet" tab at the top
    3. Pick the appropriate account from the drop down "Account:" window at the top that has your NULS in it.
    4. Click the Image Removed icon the Image Added  icon to copy the account string that contains your collateral, and save it on your notepad for later. This will be your "AGENT_ADDRESS". 
  11. In your NULS "collateral" wallet, your import the PACKING_KEY you saved in step 9: 
    1. Click the "Wallet" tab at the top
    2. Click the Image RemovedImage Added icon
    3. Click the "+" icon in the top right
    4. Click "Import a new account"
    5. Click the "Import Key" link below the Keystore box.
    6. Copy the "PACKING_KEY" from earlier into the "Restore private key" box.
    7. Click "I do not want to encrypt this account"
    8. Verify that the "PACKING_ADDRESS" now appears in your list of addresses. 
  12. In your NULS "collateral" wallet, create the agent node

    1. Click the "Consensus" tab at the top
    2. Click the "Create" link 
    3. In the "Consensus account" drop down box, select your "AGENT_ADDRESS" that contains your NULS
    4. In the "Packing address" field, type in the "PACKING_ADDRESS" from step 9.
    5. In the "Deposit (NULS)" field, type in the amount of NULS you wish to "deposit" as collateral (20,000 is typical).
    6. In the Commission rate (%)" field, type in a percentage of earnings that you want to keep as commission. 10% is the minimum, and also the most common selection if you want to attract stakers.
    7. Click Create.
    8. If prompted for a password, enter the password for your "AGENT_ADDRESS" that you set previously
    9. You should get a brief notice indicating the agent was created successfully.
  13. Remove the "PACKING_ADDRESS" from your "collateral" wallet.
    1. Click the "Wallet" tab at the top
    2. Click the Image RemovedImage Added icon
    3. Click the "Remove" link next to the "PACKING_ADDRESS" that you wrote down in step 9. 
    4. Click "Confirm" to remove the address.


...