How To Setup Masternode For Luxcoin (LUX)






LUX Masternode Setup




Version 2.2






1. Prerequisites


Linux Ubuntu 16.04.03 Server VPS


2. Update system















sudo apt-get update

# Fetches the list of available updates

sudo apt-get upgrade

# Strictly upgrades the current packages

sudo reboot

# Boots to the newly installed kernel


3. Create new user & add to sudo group:



[login as root] adduser admin


-> create password


-> Follow the steps, I leave my info blank usermod -aG sudo admin


From now forward, all activity will be run as admin… Keep root window open in case


4.Open a separate Putty session and login as admin


a.Install & configure Fail2ban sudo apt-get install fail2ban -y


b.*Optional – Setup email alerts sudo apt-get install sendmail


sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local sudo nano /etc/fail2ban/jail.local


-> ignoreip = 127.0.0.1/8 <add server IP> -> destemail = <your email>


-> sender = <the email you want to receive fail2ban emails from> -> action = %(action_mwl)s


-> [sshd]


-> enabled = true


sudo systemctl restart fail2ban


-> (should see list of jails enabled: [sshd])


[reference] -> https://www.linode.com/docs/security/using-fail2ban-for-security


c.Disable Direct root logins


sudo nano /etc/ssh/sshd_config


-> Change PermitRootLogin prohibit-password (in some cases it is PermitRootLogin password) to PermitRootLogin no





5. *Optional~~~ Requires you know what youre doing!!!


Change the port for SSH


Change Port 22 to Port xxxxx (pick a port between 1000-65000) sudo systemctl reload sshd


6.In a third putty session, try to connect to your server as root to insure it fails


7.Install & configure firewall


sudo apt-get install ufw -y


sudo ufw allow ssh note: If you changed the ssh port, use that port instead of “ssh” sudo ufw allow 26868


sudo ufw enable


Command may disrupt existing ssh connections. Proceed with operation (y|n)? answer y


8. This step is ONLY needed for very small VPS nodes


Add 1gb of swap


sudo fallocate -l 1G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile free -h


9. Compile source code


[login as admin]


git clone https://github.com/216k155/lux.git –recursive sudo find lux/ -type f -iname “*.sh” -exec chmod +x {} \; cd lux/


./install-dependencies.sh


./autogen.sh


./configure –disable-tests –without-gui –with-incompatible-bdb make





10. Setup linux wallet:


mkdir ~/.lux


nano ~/.lux/lux.conf (copy and paste below) – Please Note – On most systems, this step is done for you but you must change masternode=1 to masternode=0


rpcuser=youruser


rpcpassword=yourpassword


rpcallowip=127.0.0.1


port=26868


listen=1


server=1


daemon=1


maxconnections=200


rpcport=9888


externalip=yourip


bind=yourip


masternode=0 masternodeprivkey=YOU-WILL-REPLACE-IN-NEXT-STEP masternodeaddr=yourip:26868


staking=0


-> Ctrl + X, than y, and enter? (to exit & save)


11. Place luxd and lux-cli in Home directory:


cd /home/admin cp lux/src/luxd . cp lux/src/lux-cli .


./luxd– You should see Lux server starting


./lux-cli getinfo| grep blocks


-> (Run this a couple of time to insure the blocks are rising)


./lux-cli masternode genkey nano ~/.lux/lux.conf


-> masternodeprivkey=[paste here] -> masternode=1


-> Ctrl + X, than y, and enter? (to exit & save)


./lux-cli encryptwallet <password> Restart luxd


./lux-cli stop


./luxd


./lux-cli getaccountaddress 0 -> (create new LUXaddress & assign to 0)


./lux-cli getaccount <LUXaddress> -> (verify 0)


Verify you are running the correct versions


./lux-cli getinfo | grep ver


{


“version” : 4020000,


“protocolversion” : 69200,


“walletversion” : 60000,}





12. Test you new wallet in Windows:


[connect Filezilla via SFTP or WINSCP to linux IP] -> [.lux dir]


-> [download linux wallet.dat] [open windows]


-> [import linux wallet.dat to windows LUX appdata folder] -> [open windows LUX program]


-> [Settings -> Unlock wallet] (test linux generated password) -> [Receive tab]


-> (confirm address & label created in linux)


13. Fund the MN Wallet:


[send EXACTLY 16,120 LUX to linux wallet address] -> wait 15 confirmations


( you can check by placing your wallet address here https://explorer.luxcoin.xyz/)


./lux-cli walletpassphrase <PASSWORD> 100


./lux-cli masternode start


./lux-cli masternode list (you should see your IP address)


cat /dev/null > ~/.bash_history && history -c && exit


The LUX Masternode setup is now complete!!





Daemon commands: [login admin]


./luxd -> run daemon


./luxd stop -> stop daemon or ./lux-cli stop


./lux-cli getinfo


./lux-cli getinfo | grep ver


{


“version” : 4020000,


“protocolversion” : 69200,


“walletversion” : 60000,}


./lux-cli help -> (wallet commands)


./lux-cli –help -> (luxd commands)


./lux-cli getbalance -> (get balance)


./lux-cli getaccount <LUXaddress> -> (get label)


./lux-cli listaddressgroupings -> (show all addresses with balance & <label>)


./lux-cli getaddressesbyaccount <label> -> (show all addresses by <label>)


./lux-cli walletpassphrase <password> <seconds> -> unlock wallet for <seconds>


./lux-cli walletpassphrasechange <oldpassword> <newpassword>


./lux-cli masternode genkey


./lux-cli masternode start <password>


./lux-cli masternode stop <password>


./lux-cli masternode list


{


“185.43.109.228:26868” : 1,


“13.81.9.14:26868” : 1,


“184.101.127.247:26868” : 1


}


./lux-cli getstakingstatus




HTML to PDF API Converted By BCLTechnologies




Leave a Reply

Your email address will not be published. Required fields are marked *