Hello everyone, today I will guide you thorough how to install a Sui Fullnode with Docker
https://github.com/MystenLabs/sui/tree/main/docker/fullnode
I suggest we rent a VPS (Virtual Private Sever). I choose Contabo because it’s cheap with the hardware that event requires as you can see below:
Sever Requirements
This is for Fullnode but when you wanna run Validator for Incentivized Testnet it’s required more, so I suggest we buy this VPS size
Go to https://geni.us/contabo and Choose the Cloud VPS L as below:
Remember set the currency to Euro for cheaper payment
Fill out the password and hit Next
If you are new to Contabo you can create new account by filling the info or you can change to tab “I’m a Contabo Customer to login and hit Next
Then hit Oder & Pay
Then wait for Contabo to send you the login info in you email
Get the IP address and with the password you have just filled above, we are ready to go
Now connect to your VPS using terminal (if you use MacOS) or use Window Terminal if you use WindowOS with this command:
ssh [email protected][your IP address]
My Exp:
Type “yes” then Paste your Password (Remember the password does not show up) and enter
Now you are connected to the VPS:
Update your VPS Sever:
sudo apt update && sudo apt upgrade -y
Intall dependencies:
sudo apt-get install jq unzip -y
In this tutorial I will use Docker.
Install Docker
sudo apt-get install ca-certificates curl gnupg lsb-release wget -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
Install docker-compose
mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
sudo chown $USER /var/run/docker.sock
Create a directory for our project:
mkdir sui cd sui
Download files to this directory.
wget https://raw.githubusercontent.com/MystenLabs/sui/main/docker/fullnode/docker-compose.yaml wget https://github.com/MystenLabs/sui/raw/main/crates/sui-config/data/fullnode-template.yaml wget https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
Update the json-rpc-address in the fullnode config to listen on all addresses:
sed -i 's/127.0.0.1/0.0.0.0/' fullnode-template.yaml
Now start the Fullnode in detach mode:
docker compose up -d
Check if your node is working by entering your node Ip here: https://node.sui.zvalid.com/
Congratulation! now your Fullnode is running.
To update your node, use this command (this will reset your node to original state: delete data,…) you have to download new genesis file if Sui require
docker-compose down --volumes
For more tips check out this link:
https://github.com/MystenLabs/sui/tree/main/docker/fullnode#troubleshoot--tips--documentation