These instructions will help you build and setup a Graft Supernode from Source.
- OS: Ubuntu 18.04 (other linux distributions and versions may require additional steps)
- RAM: 2GB per CPU Core
If you have not done so add a user and give it sudo rights. We'll use graft-user, but you can use any username you prefer.
adduser graft-user
usermod -aG sudo graft-userLogout of root and log back in with your new username and password. Once you are logged in under the new account update and upgrade the server. If you receive a prompt "What do you want to do about modified configuration file sshd_config?" choose the first option "install the package maintainer's version"
sudo apt-get update
sudo apt-get upgrade -yfree -h
df -h
sudo fallocate -l 4G /swapfile # Change 4G to the proper size swap file for your server
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo su -
cat <<EOF >> /etc/fstab
/swapfile none swap sw 0 0
EOF
exitsudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh/tcp
sudo ufw limit ssh/tcp
sudo ufw allow 28600/tcp # Load balancer http port
sudo ufw allow 28643/tcp # Load balancer https port
sudo ufw allow 28680/tcp # p2p node port
sudo ufw allow 28680/udp # p2p node port
sudo ufw allow 28681/tcp # rpc node port
sudo ufw allow 28690/tcp # rpc supernode port
sudo ufw allow 8081/tcp # block explorer port
sudo ufw logging on
sudo ufw -f enable
sudo ufw statussudo apt-get install -y git build-essential cmake pkg-config libboost-all-dev libssl-dev \
autoconf automake check libpcre3-dev rapidjson-dev libreadline-devsudo sed -i -e 's/.*DefaultLimitNOFILE=.*/DefaultLimitNOFILE=8192/g' /etc/systemd/system.confgit clone --recursive -b alpha3 https://github.com/graft-project/graft-ng.git
cd graft-ng
git submodule update --init --recursivecd $HOME
mkdir -p supernode/logs
cd supernode
cmake -DENABLE_SYSLOG=ON $HOME/graft-ng
make -j2 # Adjust as needed: -j1 for a low-powered machine, -j8 for an 8-core monster with at least 16GB rammkdir -p $HOME/.graft/testnet/lmdb
wget https://rta.graft.observer/lmdb/data.mdb -P $HOME/.graft/testnet/lmdb/$HOME/supernode/BUILD/bin/./graftnoded --testnet --log-file ~/supernode/logs/graftnoded.log --log-level=1 --detachStart graft_server for long enough to create the stake-wallet then close it. When it starts to scroll hit CTRL-C to exit.
$HOME/supernode/./graft_serverThe following command will give you the stake wallet address. Use this address to request testnet graft in the Telegram group or Discord channel.
cat $HOME/.graft/supernode/data/stake-wallet/stake-wallet.address.txtmkdir -p $HOME/.graft/supernode/data
wget https://rta.graft.observer/lmdb/watch-only-wallets.tar
tar xf watch-only-wallets.tar -C $HOME/.graft/supernode/data
rm watch-only-wallets.tar$HOME/supernode/./graft_server --log-level=1 --log-file $HOME/supernode/logs/graft_server.log