Getting Started With Your VPS
For the following part of the guide you need to be root. depending on your VPS provider they may have only provided you with a “sudo” user. You can change to root by doing:
apt update && apt upgrade -y apt install unzip fail2ban -y
Add 4GB Swap
First check to make sure there is not already swap active:
If no swap it will return:
Swap: 0B 0B 0B
Create SWAP and Activate:
dd if=/dev/zero of=/swapfile bs=1k count=4096k chmod 600 /swapfile mkswap /swapfile swapon /swapfile echo "/swapfile swap swap auto 0 0" | tee -a /etc/fstab sysctl -w vm.swappiness=10 echo vm.swappiness = 10 | tee -a /etc/sysctl.conf
Note: swappiness = 10 tells system only to use swap if really needed.
Enable UFW & Open Ports
apt install ufw -y ufw default deny incoming ufw default allow outgoing ufw allow ssh ufw allow 15277/tcp ufw enable
Setup jail for bad guys hitting SSH, and set it to ban after three failed logins to SSH:
Copy and paste the following into the file:
[sshd] enabled = true port = 22 filter = sshd logpath = /var/log/auth.log maxretry = 3
ctrl +x y then enter
Reboot the server:
Add a system user to run fsocietyd:
Note: Adjust wget command to match your Ubuntu version, example below is for Ubuntu 18.
wget https://github.com/fsocietychain/fsociety/releases/download/v0.0.1.02/fsociety-ubuntu20-v0.0.1.02.zip unzip fsociety-ubuntu20-v0.0.1.02.zip chmod +x ~/fsociety-build/fsocietyd chmod +x ~/fsociety-build/fsociety-cli chmod +x ~/fsociety-build/fsociety-tx mkdir ~/.fsocietycore && touch ~/.fsocietycore/fsociety.conf cd .fsocietycore echo "daemon=1" >> ~/.fsocietycore/fsociety.conf ~/fsociety-build/./fsocietyd echo all done!
You should see fsocietyd server starting. You can confirm it is running with:
It should be using a good amount of CPU. This shows you it is working, we will return to it later.
This part of the guide is to get your local wallet or control wallet setup. If you already have FSociety core wallet running you can skip to next section.
Download , Install & Sync Local Wallet :
Download latest FSociety wallet at https://github.com/fsocietychain/fsociety/releases
- Start wallet and let it finish syncing.
- Encrypt wallet (Settings > Encrypt Wallet)
- Create new receiving address
- Backup wallet.dat (File > Backup Wallet). Store in multiple locations.
- Dump private key for receiving address (this should be printed and stored offline in multiple locations):
walletpassphrase password time (in seconds)
dumpprivkey "address" (address is the receiving address you sent the 1,100,000 FSC to)
- Send 1,100,000 FSC to self (this is current collateral amount)
- Wait to 2 confirmation
The private key only allows you to restore the matching receiving address. If you setup multiple nodes you should dump the private key for each collateral receiving address.
Build protx command for control wallet
Here is an example protx quick_setup command:
protx quick_setup "ne935d771668fa640c56grt56ry8688b0f039f7b684e715d92e4012369fea6" "1" "18.104.22.168:15277" "FQ6HwVC54Vzku47L2Loae4fdPkYXEyqm5y"
The structure from left to right is:
- Transaction ID: In your wallet go to “Transactions” right click the one you sent yourself earlier and “Copy Transaction ID”. Replace the Transaction ID in example.
- Collateral index: Tools > Debug console. Type smartnode outputs to check if 1 or 0. Adjust example command if needed.
- Your smartnode server IP and port: Replace example IP with your Smartnode server IP, leave port as is.
- Fee address: This is any address in your wallet which contains enough FSC to pay the fee. When you enter the protx quick_setup command it is a transaction and needs to be paid for. It is a very small amount 1/2 an FSC is more than enough. In Debug console do “listaddressbalances” to show all addresses with a balance, choose one and replace address in example command.
Enter the protx quick_setup command in Debug console. This will create a .conf file for that node in the same directory you ran the wallet from. Open it and copy the contents.
Finish Smartnode Configuration (VPS):
Paste in what you copied from the .conf file made during the protx command, save and exit (ctrl+x, y, enter).
Wait two minutes and do:
~/fsociety-build/./fsociety-cli smartnode status
This should return:
Your Smartnode should now be running!