Step-by-step guide to set up and run a 0G AI Alignment Node, including installation, configuration, and operation instructions with example commands and images. Designed for both beginners and experienced node operators.
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop screen build-essential jq make lz4 gcc unzip -yInstall Go
wget https://go.dev/dl/go1.22.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.3.linux-amd64.tar.gz
echo "export GOROOT=/usr/local/go" >> ~/.bash_profile
echo "export GOPATH=\$HOME/go" >> ~/.bash_profile
echo "export PATH=\$GOPATH/bin:\$GOROOT/bin:\$PATH" >> ~/.bash_profile
source ~/.bash_profileCreate a screen session to run in the background.
screen -S AI0GDownload the latest 0G alignment node binary from the official repository:
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-nodea. Copy the example environment file:
cp .env.example .envb. Edit the .env file with your configuration:
nano .envc. Configure the following parameters:
export ZG_ALIGNMENT_NODE_LOG_LEVEL=debug
export ZG_ALIGNMENT_NODE_SERVICE_IP="http://IP Public:34567" # Example: http://36.50.176.xxx:34567
export ZG_ALIGNMENT_NODE_SERVICE_PRIVATEKEY= Enter the private key that holds the NFT here, omit the 0xAfter finishing your edits, press Ctrl X then Y then Enter to save and exit.
d. Open port on Firewall
sudo ufw allow 34567/tcp
sudo ufw reloada. Load environment variables:
source .envb. Register the operator: Before performing this step, you need to have some ETH on the ARB mainnet in your wallet to cover the fees.
./0g-alignment-node registerOperator --key <Privatekey> --token-id <ID NFT> --commission 1 --chain-id 42161 --rpc https://arbitrum-one-rpc.publicnode.com --contract 0xdD158B8A76566bC0c342893568e8fd3F08A9dAacNote:
--key <Privatekey>: Enter the private key that holds the NFT here, omit the 0x.
--token-id <ID NFT>: If your wallet has 5 NFTs, you only need to enter 1 NFT ID as a representative, no need to enter all 5.c. Start your Node:
./0g-alignment-node start --mainnet > node.log 2>&1 &View logs: /root/alignment-node/node.log
time="2025-09-24T12:36:20+02:00" level=info msg="Verified identity result" address=0xabcxyz
time="2025-09-24T12:36:20+02:00" level=info msg="Starting server on port 34567"d. After finishing, you need to press Ctrl A + D to detach and return to the main screen.
Note: If you want to check the status of the screen, you need to type:
screen -r AI0GWebsite: https://claim.0gfoundation.ai/
Note: After you select the NFT, click delegate, and sign the transaction, you need to reload the site and perform the delegate action once more to complete it. At this point, the NFT status will show as pending.
Step 5: After completing Step 4, you need to return to the server's main screen to run the final command: Approve NFT delegation
./0g-alignment-node approve --mainnet \
--key <Privatekey> \
--chain-id 42161 \
--rpc https://arbitrum-one-rpc.publicnode.com \
--contract 0xdD158B8A76566bC0c342893568e8fd3F08A9dAac \
--destNode <Address hold NFT> \
--tokenIds <ID1,ID2,ID3,ID4,ID5>Note:
--key <Privatekey>: Enter the private key of the regisOperator wallet.
--destNode <Address hold NFT>: The wallet address holding the NFT is required to delegate into the regisOperator wallet.
--tokenIds <ID1,ID2,ID3,ID4,ID5>: Enter the NFT ID of the destNode walletResult: After running it, please go back to the dashboard to check that the status has changed from pending to delegated.

./0g-alignment-node --help
./0g-alignment-node <command> --helpStay in touch and follow my updates:
- X (Twitter): @p2pnodetop
- Discord:
p2pnodetop - Telegram:
P2Pnodetop
Let's build and explore the 0G ecosystem together! 🌌

