Before setting up your node, make sure you meet the following requirements:
If Docker is not already installed, follow these steps to install it:
# Update the system
sudo apt update && sudo apt upgrade -y
# Install required dependencies
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
# Add Docker’s official GPG key
curl -fsSL <https://download.docker.com/linux/ubuntu/gpg> | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# Set up the Docker repository
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
# Install Docker
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io
# Verify Docker installation
docker --version
Pull the VOI Node Docker Image:
docker pull voi/participation-node:latest
Create a Configuration File:
VOI nodes require a configuration file. Create a config.json file in the working directory. Below is a sample configuration:
{
"nodeName": "YourNodeName",
"network": "mainnet",
"api": {
"port": 8080,
"enableSwagger": true
},
"peer": {
"port": 30303
},
"logLevel": "info"
}
Modify the fields as needed:
mainnet or testnet based on your preference.Open Necessary Ports: Open the required ports in your firewall to allow the node to communicate:
sudo ufw allow 8080/tcp
sudo ufw allow 30303/tcp
sudo ufw enable
Run the node using Docker:
docker run -d \\\\
--name voi-node \\\\
-v $(pwd)/config.json:/app/config.json \\\\
-p 8080:8080 \\\\
-p 30303:30303 \\\\
voi/participation-node:latest
v: Maps the configuration file into the container.