This repository contains instructions, commands and configurations required to run a SWARM Masternode. SWARM Masternodes are a way for anyone to provide services to the SWARM network - and to be rewarded for doing so.
Join the Swarm Masternode Telegram group to connect with other Masternode operators and to get help.
This guide assumes:
- installation will be on a VPS as opposed to a physical machine
- usage of Ubuntu linux
- connecting from Windows with Putty
Installing a SWARM Masternode will require the following setup and specifications on the host machine/VPS.
- 50,000 SWM tokens in a single wallet (only one Masternode can be set up per wallet)
- Linux/MacOS with 1GB of RAM and minimum 20GB of disk space dedicated to IPFS data.
- Git installed
- Docker CE & Docker Compose installed
- Public static IP address, with firewall allowing public TCP ports (80 & 4001)
- Publicly available TCP Ports:
- 80 for Nginx
- 4001 for IPFS
- Free local TCP ports containers will bind on:
- 8080
- 5001
Set up a Virtual Private Server (VPS) with Ubuntu Server 18 LTS 64bit, meeting the following minimum requirements. Then proceed to connecting and setting up your Masternode:
Minimum Specifications:
- 1 Virtual CPU
- 1 GB RAM
- 20 GB Hard Disk
- 2 TB/month transfer
- Download and install PuTTY from https://www.putty.org
- Run PuTTY to connect to your new server:
- In the hostname field, enter the IP address of the server you created.
- Set Port to 22
- Set connection type to SSH
- Click Open to connect to server
- PuTTY security alert warning screen: Select YES
- Sign in with user ‘root’ using your root credentials
sudo apt updatesudo apt upgrade- When prompted to restart services without asking, select “Yes”
Note: Replace USERNAME with a username you would like to use:
adduser USERNAME- enter and confirm password
- enter user information (optional)
usermod -a -G sudo USERNAMElogout
Enter all commands below into the PuTTY console. Ensure each command successfully completes before entering the next one.
sudo apt install docker-compose
-
sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add --
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get updatesudo apt-get install docker-cesudo usermod -aG docker USERlogout- Run PuTTY again and log back in with USER to apply the changes above.
git clone https://github.com/swarmfund/swarm-masternode.git masternodecd masternodemkdir -p ./ipfs/stagingsh masternode.sh up
Go to http://MASTERNODE_IP_ADDRESS_HERE/ipfs/QmUrLEFJAfAFhSYoWYnrUhxEDL2WwGJZkYijepLpLuRZ1r/#/
If your Masternode is properly connected, you should be able to see following page:
Go to https://masternodes.swarm.fund/ and follow the instructions.
When you see the success message, you have completed setting up and registering your SWARM Masternode.
Enter all commands below into the PuTTY console. Ensure each command successfully completes before entering the next one.
Start in the root/home directory of your USER by entering the command cd ~
docker exec mn_ipfs ipfs id
cd masternodesh masternode.sh stop
cd masternodesh masternode.sh down
cd masternodesh masternode.sh upgrade
cd masternodegit pullsh masternode.sh restart
If, for any reason, you need to register your node again from scratch, use the following commands to generate a new MNID
cd masternodesh masternode.sh downrm -rf ipfsmkdir -p ipfs/stagingsh masternode.sh up
