Node Setup and Configuration

Build / Integration Guide / Node Setup and Configuration

3. Node Setup & Configuration

📍 Step 1: Setting up your Minotari base node is the foundation of your exchange integration. This node will sync with the Tari network and provide blockchain data.

🚀 Initial Node Setup

Pre-Setup Checklist

  • Server meets minimum requirements
  • Firewall configured for Tari ports (18141, 18142, 18143)
  • Tor installed (Linux/macOS) or IP configured
  • Backup strategy planned

1. Initialize the Node

Pseudocode

FUNCTION setupTariNode():
    // Step 1: Check system requirements
    IF (disk_space < 50GB OR memory < 4GB):
        THROW "Insufficient system resources"

    // Step 2: Initialize node configuration
    IF (config_file_exists):
        LOAD existing_config
    ELSE:
        CREATE default_config
        SET network = "mainnet" // or "testnet" for testing
        SET grpc_enabled = true
        SET grpc_port = 18142
        SET p2p_port = 18141

    // Step 3: Generate node identity
    IF (NOT node_identity_exists):
        GENERATE new_keypair
        SAVE keypair_to_secure_location
        LOG "Node identity created: " + public_key

    // Step 4: Configure network transport
    IF (tor_available):
        SET transport = "tor"
    ELSE:
        SET transport = "tcp"
        CONFIGURE public_ip_address

    // Step 5: Start synchronization
    START node_process
    WAIT_FOR initial_sync

    RETURN node_status

grpcurl Test

# Check node version to confirm gRPC is reachable
grpcurl -plaintext localhost:18142 tari.rpc.BaseNode/GetVersion

# Check node identity (public key, addresses)
grpcurl -plaintext localhost:18142 tari.rpc.BaseNode/Identify

# Check sync status once the node is running
grpcurl -plaintext localhost:18142 tari.rpc.BaseNode/GetTipInfo

Command Line

# Initialize node configuration (creates config.toml + identity)
minotari_node --init --network mainnet

# Start the node with gRPC enabled
minotari_node --grpc-enabled 
  --grpc-address 127.0.0.1:18142 
  --p2p-port 18141

# Follow node logs to confirm sync has started
tail -f ~/.tari/mainnet/log/base_node.log

Automated Script

#!/bin/bash
set -e

echo "=== Tari Node Setup ==="

# 1. Check system requirements
DISK_FREE=$(df -BG --output=avail / | tail -1 | tr -dc '0-9')
MEM_TOTAL=$(free -g | awk '/^Mem:/{print $2}')

if [ "$DISK_FREE" -lt 50 ] || [ "$MEM_TOTAL" -lt 4 ]; then
  echo "Insufficient system resources"
  exit 1
fi

# 2. Initialize configuration if it doesn't exist
if [ ! -f ~/.tari/mainnet/config/config.toml ]; then
  minotari_node --init --network mainnet
fi

# 3. Start the node as a background service
minotari_node --grpc-enabled --grpc-address 127.0.0.1:18142 --p2p-port 18141 &

# 4. Wait for initial sync to begin
sleep 10
grpcurl -plaintext localhost:18142 tari.rpc.BaseNode/GetTipInfo

echo "Node setup complete"