Nodes Guide
DA Node - ZeroGravity
Learn how to run a DA Node on ZeroGravity
Prerequisites
- You have completed Getting Started with ZeroGravity
 - Have at least 30a0gi to stake on a validator, otherwise node will crash at startup
 
Generate BLS Key
You will need a BLS Private key to run a DA Node, use this command to generate one, make sure keep a backup of it somewhere safe
docker compose --profile da-node run --rm --entrypoint /usr/local/bin/key-gen da-node
Set environment variables
open .env file with your editor
nano .env
modify the variables in .env file under 0G DA Client configs section with your desired variables.
Important ones are:
DA_NODE_ETH_RPC_ENDPOINTIf you are running a node/validator using this compose file, you can directly connect to it by setting this tohttp://geth:8545, otherwise use a public RPC endpointDA_NODE_SOCKET_ADDRYour server public IP Address or DNS record pointing to itDA_NODE_SOCKET_PORTa valid, non busy port. e.g.34180DA_NODE_SIGNER_BLS_PRIVATE_KEYput the BLS private key you have generated in the previous stepDA_NODE_SIGNER_ETH_PRIVATE_KEYThis requires a private key of an account which staked at least 10 a0gi to a validator, without leading 0x. you have two ways to get this private key- create a fresh wallet on metamask, export private key and REMOVE LEADING 0X
 - or use your validator account private key. export it by 
0gchaind keys unsafe-export-eth-key $WALLET_NAME 
Run DA Node
docker compose --profile da-node up -d da-node
Check logs
docker compose logs -f --since 1m da-node