I see that a lot of people (especially on Discord) are still struggling setting up MNs. Here are detailed steps you have to do including VPS server setup:
# --------------------------
# 1. Deploy Ubuntu 16.04 VPS
# --------------------------
# --------------------------
# 2. Add swap
# --------------------------
cd /var
touch swap.img
chmod 600 swap.img
dd if=/dev/zero of=/var/swap.img bs=2048k count=1000
mkswap /var/swap.img
swapon /var/swap.img
echo "/var/swap.img none swap sw 0 0" >> /etc/fstab
# --------------------------
# 3. Add new user
# --------------------------
adduser --shell /bin/bash xios_user
# --------------------------
# 4. visudo - add user to sudoers file
# --------------------------
xios_user ALL=(ALL:ALL) ALL
# --------------------------
# 5. Create .ssh dir and copy ssh keys to .ssh/authorized_keys
# --------------------------
su xios_user
cd
mkdir .ssh
chmod 700 .ssh
# On local computer go to ~/.ssh directory
scp id_rsa.pub xios_user@VPS_IP_ADDRESS:~xios_user/.ssh
# On VPS
cd
mv ~xios_user/.ssh/id_rsa.pub ~xios_user/.ssh/authorized_keys
# --------------------------
# 6. Change /etc/ssh/sshd_config
# --------------------------
sudo su
vi /etc/ssh/sshd_config
# Update/add the lines
PermitRootLogin no
PasswordAuthentication no
AllowUsers xios_user
# --------------------------
# 7. Restart ssh
# --------------------------
# --------------------------------------------------------------
# SETUP XIOS MASTERNODE
# --------------------------------------------------------------
# ------------------
# VPS
# ------------------
# 1. Install dependencies
sudo apt-get -y update && sudo apt-get -y install build-essential libssl-dev libdb++-dev libboost-all-dev libcrypto++-dev libqrencode-dev libminiupnpc-dev libgmp-dev libgmp3-dev autoconf autogen automake libtool
# 2. Clone repo
git clone https://github.com/ButterRose/Xios.git xios
# 3. Build XIOSd
cd xios/src
sudo make -f makefile.unix
# 4. Run XIOSd daemon
# Will see an error here
# 5. Edit ~/.XIOS/XIOS.conf
rpcuser=XIOSrpc
rpcpassword=PASSWORD
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
staking=0
# 6. Start XIOSd again
# 7. Check last block synced
{
"blocks" : 12633,
"currentblocksize" : 0,
"currentblocktx" : 0,
"difficulty" : 176623.15359025,
"blockvalue" : 100000000,
"netmhashps" : 13230.39365848,
"netstakeweight" : 108655610669683.62500000,
"errors" : "",
"pooledtx" : 0,
"stakeweight" : {
"minimum" : 0,
"maximum" : 0,
"combined" : 0
},
"testnet" : false
}
# 8. Generate masternode private key
./XIOSd masternode genkey
Generated masternode private key: MASTERNODE_PRIVATE_KEY
# 10. Stop XIOSd daemon
# 9. Update XIOS.conf file
rpcuser=XIOSrpc
rpcpassword=PASSWORD
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
staking=0
logtimestamps=1
port=9999
masternode=1
masternodeaddr=VPS_IP_ADDRESS:9999
masternodeprivkey=MASTERNODE_PRIVATE_KEY
# 10. Start XIOSd daemon again
# ------------------
# WINDOWS
# ------------------
# 11. On your XIOS Wallet open Help->Debug Window->Console and type
getaccountaddress MASTERNODE_ALIAS
Masternode address: GENERATED_MASTERNODE_ADDRESS
# 12. Send 1,000 XIOS to the address above and wait for 15 confirmations
# 13. On Windows edit ~AppData/Roaming/XIOS.conf
rpcuser=XIOSrpc
rpcpassword=PASSWORD
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
staking=0
logtimestamps=1
# 12. On Windows Wallet console type
Output:
{
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1" : "1",
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2" : "0"
}
# 13. Create the masternode.conf file.
# Inside your Windows wallet, click Masternodes -> My Master Nodes -> Create
Alias: MASTERNODE_ALIAS
Address: VPS_IP_ADDRESS:9999
Private Key: MASTERNODE_PRIVATE_KEY
TxHash: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1
Output Index: 1
Reward Address: REWARD_WALLET_ADDRESS
Reward %: 100
-------------------------------
Hope this helps.