VPS Setup

A VPS (Virtual Private Server) is ideal for running a masternode because it is a cost effective way to guarantee a persistent connection. recommends using Vultr for your VPS.

Create an SSH key

SSH (Secure Socket Shell) keys allow for secure access to a remote host. They are the recommended way of accessing your VPS and will be necessary to follow the tutorial. Please create an SSH key before proceeding.

It is recommended that users follow Vultr's official guide for setting up an SSH key.

Get an account on Vultr and deploy a Cloud Servers

First step is register for an account on Vultr. You can use our ref link:

https://www.vultr.com/?ref=7651545

(thats help us on maintaining active nodes for testnet and other technical and development purposes).

Once you created your account and added a valid payment method you can begin setting up your VPS server:

  • Choose a Server Location (choosing the location closest to you is fine)

  • Under Server Type, select Ubuntu 16.04 x64

  • Select server size, we recommend choosing the $5/mo VPS with 1CPU and 1024MB of memory

  • Add your SSH key

  • Skip down to section 7 and set a server Hostname & Label (could be anything you like)

  • Click Deploy Now

Libraries Installation

STEP #1

First we must to access on our VPS and setup Swap Space, in order to increase virtual memory for successfully compile source code on low ram machine.

After logging in, run these following commands as Root User:

fallocate -l 3G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo -e "/swapfile none swap sw 0 0 \n" >> /etc/fstab

STEP #2

Now it’s time to install the depencies with following commands:

sudo add-apt-repository -y ppa:bitcoin/bitcoin
sudo apt-get install -y software-properties-common python-software-properties
sudo apt-get update
sudo apt-get install -y pkg-config
sudo apt-get -y install build-essential autoconf automake libboost-all-dev libleveldb-dev libgmp-dev libgmp3-dev libssl-dev libcurl4-openssl-dev libcrypto++-dev libqrencode-dev libminiupnpc-dev autogen libtool git libevent-dev libprotobuf-dev
sudo apt-get install -y curl g++ git-core pkg-config libtool faketime bsdmainutils mingw-w64 g++-mingw-w64 nsis zip ca-certificates python

STEP #3

Now you are ready to compile the Berkely DB v4.8 database:

sudo apt-get install libdb4.8-dev libdb4.8++-dev -y [enter]

Lyra Daemon Installation

STEP #4

Now you can proceed with compile and start the Lyra daemon with commands below

git clone https://github.com/scryptachain/scrypta

cd scrypta

./autogen.sh

./configure

sudo make

cd src

chmod 777 -R *

./lyrad &

Note that if you erroneusly builded your VPS with Ubuntu 18.04 LTS, after./configurecommand, you could have this error:configure: error: Detected LibreSSL: This is NOT supported, and may break consensus compatibility!Solve this issue installing ssl library v1.0 with the following command:apt-get install libssl1.0-dev

STEP #5

When you start the wallet for the first time a new folder is created with the chain, the .conf file and so on. As the lyra.conf file has not been set up yet, you will likely receive the follow message:

Error: To use lyra, or the -server option to lyra-qt, you must set an
rpcpassword in the configuration file: /root/.lyra/lyra.conf

To resolve this you need to proceed with next step

STEP #6

Move to your LYRA system folder and edit the lyra.conf file with your masternode information:

cd
cd .lyra
sudo nano lyra.conf

Now you have to enter the follow informations and save:

rpcuser=YOUR_USERNAME
rpcpassword=YOUR_PASSWORD
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=64
masternode=1
externalip=YOUR_VPS_IP
bind=YOUR_VPS_IP
masternodeaddr=YOUR_VPS_IP:42222
masternodeprivkey=YOUR_MASTERNODE_KEY

Save with Ctrl + X, confirm with Y and press Enter

STEP #7

Back to your src folder to run the demon and start your masternode. Enter the following commands:

cd
cd scrypta/src
./lyrad & [enter]

Now it's time to wait a complete sync of blockchain data. You can check the status with following command:

./lyra-cli getinfo

Take a look on "blocks" : , it have been synced with the data on official block explorer

A complete sync is required in order to start correctly your masternode, it could need time to download all the blockchain data.

When the sync is complete you are able to proceed with Masternode Start and Status Check