Full Node (Docker version)
We are going to follow these steps to set up an XDC Masternode.
Setting up XDC Network Masternode Docker version
The server or VPS used for the masternode should be directly facing the internet with a public IP and without NAT.
Follow the written steps starting from step 1, or you can watch the video tutorials:
Setting up an XDC Network Masternode via Docker
Step 1
Clone repository
Step 2
Then we change the directory to XinFin-Node
Step 3
We need to install Docker and Docker-Compose by running the following command:
Step 4
Create a new .env file and copy the env.example file that exist in the mainnet directory. We will ensure we are in the "mainnet" directory by typing these commands. Once in edit mode for the .env file, name your masternode and use an email address in the respective fields
For Testnet
Step 5
Start your Node
For Mainnet run the following commands:
At this point you should be able to see your masternode on the list of nodes here or as shown below:
For Testnet run the following commands:
You should be able to see your node listed on the [Apothem Network] page. Select "Switch to LiveNet" to check LiveNetwork Stats and Select "Switch to TestNet" for TestNetwork.
Your coinbase address can be found in xdcchain/coinbase.txt file.
For troubleshooting purposes, you can stop the node by using the following command on either Mainnet or Testnet:
Downloading a Network Snapshot (Mainnet or Apothem)
The following steps are to expedite the syncing process of your node with the XDC Network. If you followed the steps above, your node will take 3-4 days to sync up with the network fully. You can reduce that time by downloading a network snapshot and bringing your node back up after the chain has been downloaded and unpacked.
Mainnet Snapshot
Bring down your node:
Remove the old xdchain file from the server
Download the snapshot
Unpack the xdcchain.tar file
The unpacking will take some time, and it will look like this:
The following command will move the xdcchain/XDC to xdcchain/XDC_backup
Then we are going to remove the old "nodekey" file
The last step is to run the bash upgrade.sh command
This command will bring your node up and it will start syncing to the network. Once up and running, your node will be synced to the network in just a few minutes.
Apothem Snapshot
Bring down your node:
Remove the old xdchain file from the server
Download the snapshot
Unpack the apothem.tar file
Move the xdcchain-testnet
Bring up the node
Last updated