Skip to main content

0G AI Alignment Node - Guide


Who this is for & what you'll learn
  • Run your own Alignment Node or delegate to a NAAS provider
  • Understand system requirements, setup steps, and monitoring
  • Learn NAAS models (commission vs prepaid) and how to delegate/undelegate

Overview

The 0G AI Alignment Node system allows license holders to participate in the network either by running their own nodes or delegating to Node as a Service (NAAS) providers. This guide covers both options to help you choose the best approach for your needs.

Choose Your Path

Quick decision summary

OptionBest forSetup timeRewardsMaintenance
Option 1: Delegate to NAASNon-technical users2-3 Minutes100% (prepaid) or minus commissionProvider handles
Option 2: Run your ownTechnical users1-2 Hours100%You handle

Option 1: Delegating to NAAS Providers

Understanding NAAS Models

NAAS providers offer two delegation models:

Commission-Based Model

  • How it works: NAAS provider takes a percentage of your rewards as commission
  • Payment: No upfront payment required
  • Status: Nodes start as "Active" immediately
  • Best for: Users who prefer sharing rewards over upfront payments

Prepaid Model

  • How it works: Pay a fixed fee upfront for node operation
  • Payment: One-time or recurring prepaid fee
  • Status: Nodes start as "Expired" until payment is confirmed
  • Best for: Users who want predictable costs

How to Delegate

Step 1: Choose a NAAS Provider

  1. Access the 0G Claim Portal

  2. Navigate to the NAAS Providers section

  3. Review available providers:

    • Name & Description: Provider details
    • Commission Rate: Percentage for commission-based model
    • Prepaid Price: Cost for prepaid nodes
    • Reputation: Community ratings and uptime statistics

    NAAS Providers

Step 2: Complete Provider Onboarding

  1. Visit the selected NAAS provider's platform (URL provided in portal)
  2. Complete their onboarding process:
    • Create an account
    • Choose delegation model (commission or prepaid)
    • If prepaid, complete payment
  3. Receive your Target NAAS Node Address from the provider

Important: Save this address - you'll need it for delegation.

Step 3: Delegate Your Licenses

  1. Return to the 0G Portal
  2. Login with your wallet containing licenses
  3. Navigate to "My Licenses"
  4. Select license(s) to delegate
  5. Choose "Delegate" action
  6. Enter the Target NAAS Node Address provided by your NAAS provider
  7. Confirm the transaction

Delegate Licenses

Step 4: Monitor Delegation Status

Your delegation will show different statuses:

StatusDescription
InactiveLicense not delegated
PendingDelegation submitted, awaiting NAAS approval
DelegatedActive and earning rewards
ExpiredPrepaid period ended or payment issue

Managing Your Delegation

Checking Status

  1. Access the 0G Portal
  2. Navigate to "My Licenses"
  3. View delegation status for each license

Undelegating

To reclaim your licenses:

  1. Select delegated license(s)
  2. Choose "Undelegate"
  3. Confirm the transaction
  4. Licenses immediately return to "Inactive" status

Note: Undelegation is immediate and doesn't require NAAS approval.

Switching Providers

  1. First undelegate from current provider
  2. Wait for transaction confirmation
  3. Follow delegation steps with new provider

NAAS Payment Management

For Commission-Based:

  • Rewards automatically distributed after commission deduction
  • No action required from you
  • Monitor earnings in the portal

For Prepaid:

  • Track expiration dates
  • Renew before expiration to avoid downtime
  • Provider will update status upon payment
  • Node shows "Expired" if payment lapses

Option 2: Running Your Own Node

System Requirements

Before setting up your node, ensure your system meets these minimum specifications:

ComponentMinimum Requirement
RAM64 MB
CPU1 x86 Core @ 2.1GHz
Disk Space10 GB
Internet10 Mbps connection
NetworkPort must be externally accessible (configure in firewall)

Installation & Setup

Step 1: Download the Node Binary

Download the latest 0G alignment node binary from the official repository:

# Download the binary (replace with actual URL)
wget https://github.com/0gfoundation/alignment-node-release/releases/download/v1.0.0/alignment-node.tar.gz

tar -xzf alignment-node.tar.gz

cd alignment-node

chmod +x 0g-alignment-node

Step 2: Configure Environment

  1. Copy the example environment file:
cp .env.example .env
  1. Edit the .env file with your configuration:
nano .env
  1. Configure the following parameters:
export ZG_ALIGNMENT_NODE_LOG_LEVEL=debug
export ZG_ALIGNMENT_NODE_SERVICE_IP="http://127.0.0.1:34567" # Full URL endpoint
export ZG_ALIGNMENT_NODE_SERVICE_PRIVATEKEY=your_private_key_here
note

The private key is the private key of the wallet you used to purchase the NFT. If the wallet doesn't have any NFTs, the wallet is not eligible to register as operator.

Important Configuration Notes:

  • LOG_LEVEL: Set to debug for troubleshooting, info for normal operation
  • SERVICE_IP: The ip of the service you are running. You need to add the external ip of the node to the .env file. The external ip is the ip of the node that is accessible from the internet.
  • PRIVATEKEY: Your wallet's private key that holds the alignment node license(s)

Step 3: Network Configuration

Open your service port

The port specified in your configuration must be accessible externally for consensus communication.

Make sure this port is open in:

  • Cloud security groups/firewalls (AWS, Azure, GCP, etc.)
  • VPS provider firewalls
  • Local server firewall rules

Steps vary by provider; consult your host's docs.

Step 4: Start Your Node

  1. Load environment variables:
source .env
  1. Register the operator:
./0g-alignment-node registerOperator --key <your_private_key> --token-id <your_token_id> --chain-id <chain_id> --rpc <rpc_url> --contract <contract_address>
note

The token id is the token id of the NFT you purchased. The private key is the private key of the wallet you used to purchase the NFT. If the wallet doesn't have any NFTs, the wallet is not eligible to register as operator.

Configuration Details:

  • Chain ID: 42161 (Arbitrum Mainnet)
  • RPC URL: Use a reliable Arbitrum RPC endpoint such as:
    • https://arb1.arbitrum.io/rpc (Public endpoint)
    • Or your preferred Arbitrum RPC provider
  • Alignment manager contract address: 0xdD158B8A76566bC0c342893568e8fd3F08A9dAac (Arbitrum Mainnet)
  1. Start the node:
./0g-alignment-node start --mainnet
  1. To run in background (recommended for production):
nohup ./0g-alignment-node start --mainnet > node.log 2>&1 &

Monitoring Your Node

View logs:

tail -f node.log

Node command help

./0g-alignment-node --help

./0g-alignment-node <command> --help
Healthy node checklist
  • Status reports without errors
  • Logs show steady activity, no repeated crashes

Troubleshooting

Node not connecting:

  • Verify port is open and accessible externally
  • Check your firewall/security group settings
  • Ensure private key has associated licenses

Node crashes:

  • Check logs for errors
  • Verify system requirements are met
  • Ensure stable internet connection

Best Practices

For Self-Hosted Nodes

  1. Regular Updates: Keep node binary updated
  2. Monitoring: Set up alerts for downtime
  3. Backup: Keep secure backup of private keys
  4. Security: Use dedicated wallet for node operation
  5. Network: Ensure stable internet connection

For NAAS Delegation

  1. Research Providers: Check reputation and uptime history
  2. Understand Terms: Read commission rates and prepaid terms
  3. Monitor Status: Regularly check delegation status
  4. Payment Tracking: Set reminders for prepaid renewals
  5. Diversification: Consider splitting licenses across providers