0G Labs Logo

0G Labs

Active

0G Labs is a modular AI blockchain project that combines Layer 1 (L1) blockchain technology with decentralized artificial intelligence capabilities.

0G Aristotle Validator Node Setup

This guide will help you install a 0G Aristotle Validator node using a combination of the best practices from the official tutorial and community enhancements.

Note

You can currently operate your node as an RPC (Remote Procedure Call) to support the network and maintain synchronization with the blockchain.

The ability to create a validator is now available. You'll find comprehensive instructions for setting up your validator on staking interfaces page.

Requirements

  • CPU: 8 Cores
  • Memory: 64GB RAM
  • Disk: 1 TB of storage (NVME)
  • Bandwidth: 100 Mbps (Download / Upload)

Update

Click here to see how to update to Aristotle-v1.0.6

⚠️ Complete the update before the Hard Fork deadline at 2026-06-26 00:00:00 UTC.

Stop service

systemctl stop 0gchaind
systemctl stop geth

Download & Extract Binary

wget https://github.com/0gfoundation/0gchain-Aristotle/releases/download/v1.0.6/aristotle-v1.0.6.tar.gz
tar -xvzf aristotle-v1.0.6.tar.gz
cd $HOME/aristotle-v1.0.6/bin

Give permission

chmod +x 0gchaind
chmod +x geth

Copy to /usr/local/bin/. Adjust if you are using a different path directory.

cp 0gchaind /usr/local/bin/0gchaind
cp geth /usr/local/bin/geth

Restart service

sudo systemctl daemon-reload
sudo systemctl restart 0gchaind
sudo systemctl restart geth

Manual Install

Version v1.0.6

1. Install Dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y

2. Install Go

cd $HOME && \
ver="1.22.0" && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go version

3. Set Environment Variables

Configuration

Generated Command

echo 'export MONIKER="ExampleMoniker"' >> $HOME/.bash_profile
echo 'export OG_PORT="55"' >> $HOME/.bash_profile
source $HOME/.bash_profile

4. Download and Extract

cd $HOME
wget https://github.com/0gfoundation/0gchain-Aristotle/releases/download/1.0.6/aristotle-v1.0.6.tar.gz
tar -xvzf aristotle-v1.0.6.tar.gz
rm aristotle-v1.0.6.tar.gz
chmod 777 $HOME/aristotle-v1.0.6/bin/geth
chmod 777 $HOME/aristotle-v1.0.6/bin/0gchaind

Move binaries to /usr/local/bin for global access

sudo mv $HOME/aristotle-v1.0.6/bin/geth /usr/local/bin/geth
sudo mv $HOME/aristotle-v1.0.6/bin/0gchaind /usr/local/bin/0gchaind

5. Initialize the Chain

mkdir -p $HOME/.0gchaind
cp -r $HOME/aristotle-v1.0.6/* $HOME/.0gchaind/
 
geth init --datadir $HOME/.0gchaind/0g-home/geth-home $HOME/.0gchaind/geth-genesis.json
 
0gchaind init $MONIKER --home $HOME/.0gchaind/tmp --chaincfg.chain-spec mainnet
cp $HOME/.0gchaind/tmp/data/priv_validator_state.json $HOME/.0gchaind/0g-home/0gchaind-home/data/
cp $HOME/.0gchaind/tmp/config/node_key.json $HOME/.0gchaind/0g-home/0gchaind-home/config/
cp $HOME/.0gchaind/tmp/config/priv_validator_key.json $HOME/.0gchaind/0g-home/0gchaind-home/config/

Generate JWT Authentication Token

0gchaind jwt generate --home $HOME/.0gchaind/0g-home/0gchaind-home --chaincfg.chain-spec mainnet
 
cp -f $HOME/.0gchaind/0g-home/0gchaind-home/config/jwt.hex $HOME/.0gchaind/

6. Configure Node

Set Node Moniker

sed -i -e "s/^moniker *=.*/moniker = \"$MONIKER\"/" $HOME/.0gchaind/0g-home/0gchaind-home/config/config.toml

🧠 Note: This is your node moniker, not the validator moniker.
You will set your validator moniker later when you create a validator.

Update geth-config.toml Ports

sed -i "s/HTTPPort = .*/HTTPPort = ${OG_PORT}545/" $HOME/.0gchaind/geth-config.toml
sed -i "s/WSPort = .*/WSPort = ${OG_PORT}546/" $HOME/.0gchaind/geth-config.toml
sed -i "s/AuthPort = .*/AuthPort = ${OG_PORT}551/" $HOME/.0gchaind/geth-config.toml
sed -i "s/ListenAddr = .*/ListenAddr = \":${OG_PORT}303\"/" $HOME/.0gchaind/geth-config.toml
sed -i "s/^# *Port = .*/# Port = ${OG_PORT}901/" $HOME/.0gchaind/geth-config.toml
sed -i "s/^# *InfluxDBEndpoint = .*/# InfluxDBEndpoint = \"http:\/\/localhost:${OG_PORT}086\"/" $HOME/.0gchaind/geth-config.toml

Update config.toml and app.toml for 0gchaind

# config.toml
CONFIG="$HOME/.0gchaind/0g-home/0gchaind-home/config"
 
sed -i "s/laddr = \"tcp:\/\/0\.0\.0\.0:26656\"/laddr = \"tcp:\/\/0\.0\.0\.0:${OG_PORT}656\"/" $CONFIG/config.toml
sed -i "s/laddr = \"tcp:\/\/127\.0\.0\.1:26657\"/laddr = \"tcp:\/\/127\.0\.0\.1:${OG_PORT}657\"/" $CONFIG/config.toml
sed -i "s/^proxy_app = .*/proxy_app = \"tcp:\/\/127\.0\.0\.1:${OG_PORT}658\"/" $CONFIG/config.toml
sed -i "s/^pprof_laddr = .*/pprof_laddr = \"0.0.0.0:${OG_PORT}060\"/" $CONFIG/config.toml
sed -i "s/prometheus_listen_addr = \".*\"/prometheus_listen_addr = \"0.0.0.0:${OG_PORT}660\"/" $CONFIG/config.toml
 
# app.toml
sed -i "s/address = \".*:3500\"/address = \"127.0.0.1:${OG_PORT}500\"/" $CONFIG/app.toml
sed -i "s/^rpc-dial-url *=.*/rpc-dial-url = \"http:\/\/localhost:${OG_PORT}551\"/" $CONFIG/app.toml

Disable Indexer

sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $CONFIG/config.toml

Configure Pruning

Pruning Strategy

💡 Recommended for Validators to fine-tune storage.

blocks
blocks

Generated Command

sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.0gchaind/0g-home/0gchaind-home/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.0gchaind/0g-home/0gchaind-home/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.0gchaind/0g-home/0gchaind-home/config/app.toml

Configure JSON-RPC Host (Geth / EVM Layer of 0G)

🔐 Security Note:

Only use 0.0.0.0 if you protect the RPC with a firewall or expose it intentionally. If using a reverse proxy like Nginx, it's safer and more efficient to keep the RPC bound to 127.0.0.1.

JSON-RPC Host (Geth / EVM Layer of 0G)

This step allows you to configure the JSON-RPC host for the Ethereum-compatible layer of your 0G node.

sed -i 's/HTTPHost = .*/HTTPHost = "127.0.0.1"/' $HOME/.0gchaind/geth-config.toml

This setting only applies to the EVM (Geth) layer of 0G.

  • 127.0.0.1: accessible locally only
  • 0.0.0.0: open to external connections

Cosmos RPC (Tendermint Layer)

This step sets the Tendermint RPC address for the Cosmos-based layer of your 0G node.

CONFIG="$HOME/.0gchaind/0g-home/0gchaind-home/config"
sed -i "s|laddr = \"tcp://127.0.0.1:${OG_PORT}657\"|laddr = \"tcp://127.0.0.1:${OG_PORT}657\"|" $CONFIG/config.toml

⚠️ Important: Use 0.0.0.0 only if the port is firewalled or routed through a trusted proxy. In most setups, 127.0.0.1 is preferred for local-only access.


7. Configure Systemd Services

Setup 0gchaind.service

sudo tee /etc/systemd/system/0gchaind.service > /dev/null <<EOF
[Unit]
Description=0gchaind Node Service
After=network-online.target
 
[Service]
User=$USER
Environment=CHAIN_SPEC=mainnet
WorkingDirectory=$HOME/.0gchaind
ExecStart=/usr/local/bin/0gchaind start \
  --chaincfg.chain-spec mainnet \
  --home $HOME/.0gchaind/0g-home/0gchaind-home \
  --chaincfg.kzg.trusted-setup-path=$HOME/.0gchaind/kzg-trusted-setup.json \
  --chaincfg.engine.jwt-secret-path=$HOME/.0gchaind/jwt.hex \
  --chaincfg.engine.rpc-dial-url=http://localhost:${OG_PORT}551 \
  --chaincfg.restaking.enabled \
  --chaincfg.restaking.symbiotic-rpc-dial-url HTTPS://YOUR.RPC.URL \
  --chaincfg.restaking.symbiotic-get-logs-block-range 8 \
  --p2p.seeds 9f78a3abe4be4462cdc2c3cae3c49a6a88ec16bc@8.221.140.134:26656 \
  --p2p.external_address=$(curl -4 -s ifconfig.me):${OG_PORT}656
Restart=always
RestartSec=3
LimitNOFILE=65535
 
[Install]
WantedBy=multi-user.target
EOF

Note:

  • Adjust --chaincfg.restaking.symbiotic-rpc-dial-url to your preferred Ethereum RPC provider.
  • Set --chaincfg.restaking.symbiotic-get-logs-block-range based on your RPC’s performance and limitations (default: 1, meaning 1 block per request). Higher values may speed up syncing but can cause failures if your RPC cannot handle larger ranges.

Setup geth.service

sudo tee /etc/systemd/system/geth.service > /dev/null <<EOF
[Unit]
Description=0g Geth Node Service
After=network-online.target
 
[Service]
User=$USER
WorkingDirectory=$HOME/.0gchaind
ExecStart=/usr/local/bin/geth \
  --config $HOME/.0gchaind/geth-config.toml \
  --datadir $HOME/.0gchaind/0g-home/geth-home \
  --http.port ${OG_PORT}545 \
  --ws.port ${OG_PORT}546 \
  --authrpc.port ${OG_PORT}551 \
  --bootnodes enode://2bf74c837a98c94ad0fa8f5c58a428237d2040f9269fe622c3dbe4fef68141c28e2097d7af6ebaa041194257543dc112514238361a6498f9a38f70fd56493f96@8.221.140.134:30303 \
  --port ${OG_PORT}303 \
  --networkid 16661
Restart=always
RestartSec=3
LimitNOFILE=65535
 
[Install]
WantedBy=multi-user.target
EOF

8. Start the Service

sudo systemctl daemon-reload
sudo systemctl enable 0gchaind
sudo systemctl enable geth
sudo systemctl start 0gchaind
sudo systemctl start geth

9. Verify Installation

journalctl -u 0gchaind -u geth -f

Useful Commands

Check logs

journalctl -u 0gchaind -u geth -f

Check Blocks

source <(curl -s https://raw.githubusercontent.com/astrostake/0G-Labs-script/refs/heads/main/validator/aristotle/check_block.sh)

Check node status

curl -s localhost:${OG_PORT}657/status | jq .result.sync_info

Check Port

#install net-tools
apt install net-tools
 
#check port
sudo netstat -tulpn | grep geth
sudo netstat -tulpn | grep 0gchaind

🛡️ Security

To apply a quick security baseline, you can configure your firewall like this:

sudo ufw allow ${OG_PORT}303/tcp comment 'geth_p2p_port'
sudo ufw allow ${OG_PORT}303/udp comment 'geth_p2p_port'
sudo ufw allow ${OG_PORT}656/tcp comment '0g_p2p_port'

🔐 For a more secure and maintainable setup, check out our Essentials Guide, including SSH key setup, Fail2Ban protection, and a full VPS hardening checklist.

Delete Validator

⚠️ Critical: Backup Your Validator Key!

Make sure to backup priv_validator_key.json and priv_validator_state.json. Do not lose this key — it is required to run your validator.

File location: ~/.0gchaind/0g-home/0gchaind-home/config/priv_validator_key.json

~/.0gchaind/0g-home/0gchaind-home/data/priv_validator_state.json

cd $HOME
sudo systemctl stop 0gchaind geth
sudo systemctl disable 0gchaind geth
sudo rm /etc/systemd/system/0gchaind.service
sudo rm /etc/systemd/system/geth.service
sudo systemctl daemon-reload
sudo rm -f $(which 0gchaind)
sudo rm -f $(which geth)
sudo rm -rf $HOME/.0gchaind
sudo rm -rf $HOME/aristotle-v1.0.6