Let's do automatic

Auto install a Masternode on your VPS

Masternode automatic installation script

This Shell script can be used to setup a single or multiple PowerSwitch Masternode(s) on a Linux server running Ubuntu 16.04.

Download, install and run the script :

Get the script from Github

wget -q https://raw.githubusercontent.com/PowerSwitchCrypto/MN-Setup/master/powerswitch.sh

Run the setup script

bash powerswitch.sh

Desktop wallet setup

After the MN is up and running, you need to configure the desktop wallet accordingly. Here are the steps you need to follow :

1. Open the PowerSwitch Desktop Wallet.

2. Go to "Receive" and create a New Address: MN1

3. Send 5000 PWS to MN1.

4. Wait for 15 confirmations.

5. Go to Help → "Debug Window - Console"

6. Type the following command : masternode outputs

7. Go to Masternodes tab

8. Click Create and fill the details:

Alias: MN1

Privkey: Masternode Private Key

TxHash: First value from Step 6

Output index: Second value from Step 6

Reward address: leave blank

Reward %: leave blank

9. Click OK to add the masternode

10. Click Start All

Usage :

For security reasons PowerSwitchd is installed under a normal user, usually "powerswitch", hence you need to "su - powerswitch" before checking :

POWERSWITCHEUSER=powerswitch #replace powerswitch with the MN username you want to check  
su - $POWERSWITCHEUSER
PowerSwitchd masternode status  
PowerSwitchd getinfo

Also, if you want to check/start/stop PowerSwitchd daemon for a particular MN, run one of the following commands as root :

POWERSWITCHEUSER=powerswitch  #replace powerswitch with the MN username you want to check  
systemctl status $POWERSWITCHEUSER #To check the service is running  
systemctl start $POWERSWITCHEUSER #To start PowerSwitchd service  
systemctl stop $POWERSWITCHEUSER #To stop PowerSwitchd service  
systemctl is-enabled $POWERSWITCHEUSER #To check PowerSwitchd service is enabled on boot  

Wallet re-sync

If you need to resync the wallet, run the following commands as root :

POWERSWITCHEUSER=powerswitch  #replace powerswitch with the MN username you want to resync
systemctl stop $POWERSWITCHEUSER
rm -r /home/$POWERSWITCHEUSER/.PowerSwitch/{banlist.dat,blk0001.dat,database,db.log,mncache.dat,peers.dat,smsgDB,smsg.ini,txleveldb}
systemctl start $POWERSWITCHEUSER

Multiple MN on one VPS :

This script allows the possibility to run multiple PowerSwitch Masternodes on the same VPS.

Each MN will run under a different user that you will choose during installation.