1. Home
  2. Delegate
  3. Linux
  4. Installing mShift on Ubuntu 16.04

Installing mShift on Ubuntu 16.04

This article will guide you through the installation of a mainnet node.

Prerequisites

After preparing your server with the Initial Server Setup with Ubuntu 16.04 guide, you can now install Shift on your server. To complete this tutorial, you will need:

  • One Ubuntu 16.04 server set up by following the Ubuntu 16.04 initial server setup guide, including a sudo non-root user and a firewall.
  • A wallet with a second passphrase and atleast 60 SHIFT
  • Find your own public IP here
  • To have the en_US.UTF-8 locales generated:
sudo locale-gen "en_US.UTF-8"

Installation

  1. First of all you’ll need to login into your server with the username you created in the Ubuntu 16.04 initial server setup guide:
ssh -p ssh_port [email protected]_server_ip
  1. Now, change to your home directory, clone the Shift repository there and install it:
cd ~
git clone https://github.com/shiftnrg/shift.git && shift/shift_manager.bash install
  1. For the next step, change to the newly created shift folder and update your client/wallet:
cd shift 
./shift_manager.bash update_client 
./shift_manager.bash update_wallet
  1. Shift is now installed. However, you’ll need to modify the config.json to your own values.
nano config.json

Edit the “api “part by replacing the dummy IP 1.2.3.4 shown in the example with your own public IP:

"api": { 
    "enabled": true,  
    "access": { 
        "public": false,  
        "whiteList": ["127.0.0.1", "1.2.3.4"] 
    }
}

After that, edit the “forging” part by replacing the dummy IP 1.2.3.4 once more and replacing [“shift shift …”] with your first passphrase (the 12 words you use to login). It is important that you keep the same format as shown ([] with quotation marks):

"forging": { 
    "force": false, 
    "secret": ["shift shift shift shift shift shift shift shift shift shift shift shift"] 
    "access": { 
        "whitelist": ["127.0.0.1", "1.2.3.4"] 
    } 
}

After editing the file press Ctrl+O and confirm with Enter. Now exit nano with Ctrl+X.

  1. To apply the changes made in the config.json, make sure to always reload Shift:
./shift_manager.bash reload
  1. Since your node has to catch up with the blockchain, rebuild it with a verified snapshot to speed this process up:
./shift_manager.bash rebuild

To make sure your node is alright, open http://yournodeIP:9305. It should show you the Shift Wallet UI. When your node is done syncing, it is ready to forge blocks. However, you’ll need to register your delegate now. Otherwise no one can vote for you and therefore start forging blocks.

Registration

Note: Registration should not take place over your own node, unless you have setup HTTPS properly. Otherwise your first and second passphrase will be send unencrypted over the network, thus very easy for anyone to steal your coins!

  1. Login into your wallet over a secure and trusted node, like the official wallet.
  2. After logging in, click on “Forging”:

  1. Now click on “Delegate Registration”:

  1. Type in the name of your delegate (your username) and confirm it. If you have setup a second passphrase, it will ask you for it:

 

Note: Turning on “Forging” is only needed when you don’t want to put your passphrase in the config. However, you have to activate forging every time after restarting. You can only turn on the switch on your own node!

Was this article helpful to you? Yes No

How can we help?