Prerequisites

Before setting up your node, make sure you meet the following requirements:

  1. System Requirements:
  2. Operating System: Linux (Ubuntu 20.04 or later is preferred).
  3. Dependencies:

Step 1: Install Docker

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


Step 2: Download and Configure VOI Node

  1. Pull the VOI Node Docker Image:

    docker pull voi/participation-node:latest
    
    
  2. 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:

  3. 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
    
    

Step 3: Run the Node

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