Running a node is one of the most effective ways to participate in the blockchain ecosystem and potentially generate passive income by contributing to network operations. In this article, we will provide you with a detailed guide on how to run a 0G Labs Node, an advanced platform that supports AI data storage and offers Data Availability solutions for both Web2 and Web3.
Introduction to 0G Labs
0G Labs (also known as ZeroGravity) is a platform that provides Data Availability services aimed at supporting AI and blockchain applications. The platform successfully raised $35 million in a Pre-Seed funding round, with participation from major investment funds such as Hack VC, Delphi Ventures, Animoca Brands, and OKX Ventures. With this investment, 0G Labs is rapidly becoming one of the leading solutions for data storage and management on the blockchain.
Why should you run a 0G Labs Node?
By running a 0G Labs Node, you not only contribute to maintaining and securing the network but also have the opportunity to earn rewards by participating in the ecosystem. You can choose to run a Storage Node, which helps store data and ensures the integrity of the information.
Detailed Steps to run a 0G Labs Node
Below is a step-by-step guide to help you install and operate a 0G Labs Storage Node in a detailed and easy-to-understand manner.
Phase 1: Prepare the required equipment and resources
First, you need to prepare a PC or VPS with the following minimum configuration:
- CPU: 4 Cores (to ensure robust processing capability)
- RAM: 16 GB (to support continuous operations)
- Storage: 500 GB NVMe (for fast and efficient data storage)
Note: You will need a brand new EVM wallet address. This wallet will be used to receive and send tokens on the 0G Labs testnet. Make sure to create and securely back up this wallet.
Phase 2: Install software and required resources
Step 1: Update the system and install essential software packages
Open the terminal and run the following commands to update the system and install the necessary tools:
sudo apt-get update
sudo apt-get install clang cmake build-essential pkg-config libssl-dev
Step 2: Install Rust – The required programming language for the Node
Rust is one of the crucial tools you need to install to run a 0G Labs Node. Execute the following command:
curl –proto ‘=https’ –tlsv1.2 -sSf https://sh.rustup.rs | sh
After installation, restart the terminal to apply the changes.
Step 3: Install Go – The supporting programming language
Go is also a necessary tool for running a 0G Labs Node. Install Go by running the following commands:
wget https://go.dev/dl/go1.23.0.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.23.0.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
The export command adds Go to the PATH environment variable so that you can use Go in the terminal.
Phase 3: Download source code and build the storage Node
Step 4: Clone the 0G Storage Node source code from GitHub
You need to download the 0G Storage Node source code by running the following command:
git clone -b v0.4.6 https://github.com/0glabs/0g-storage-node.git
This command will download the latest version of the Storage Node.
Step 5: Build the required resources
After downloading the source code, navigate to the source code directory and run the following command to build the necessary files:
cd 0g-storage-node
cargo build –release
This process will create executable files needed to start the Storage Node.
Phase 4: Configure and Start the Node
Step 6: Edit the Storage Node configuration
To ensure the Node operates correctly, you need to edit the config.toml configuration file. Run the following commands:
cd run
nano config.toml
In this file, you will see some lines prefixed with a # symbol. You need to remove the # from the necessary lines and fill in the following information:
- network_enr_address: Add your public IP address between the quotation marks (e.g., “123.456.78.90”).
- network_boot_nodes: Replace this value with the list of official 0G Labs nodes from their documentation.
- blockchain_rpc_endpoint: Enter your RPC information or use the available RPCs from the 0G Labs community.
- miner_key: Enter the private key of the EVM wallet you created during the preparation phase.
After completing the edits, save the file by pressing CTRL + O and exit nano by pressing CTRL + X.
Step 7: Start the Storage Node
You can start the Storage Node by running the following command in the terminal:
../target/release/zgs_node –config config-testnet.toml –miner-key [your private key] –blockchain-rpc-endpoint [the RPC you are using] –db-max-num-chunks 1000000000
This command will start your Node and connect it to the 0G Labs network.
Phase 5: Monitor and check the Node
Step 8: Monitor Node activity
After the Node has started, you need to monitor its activity to ensure that everything is running smoothly. Use the following command (replace the current date in the format YYYY-MM-DD):
tail -f ~/0g-storage-node/run/log/zgs.log.2024-09-02
This command will display the logs from your Node, helping you track its operation and identify any issues early on.
With this detailed guide, you now understand each step required to run a 0G Labs Node effectively and accurately. If you encounter any difficulties during the installation or operation process, join the 0G Labs community for support. Digital Economy Pulse wishes you the best of luck in running your Node and taking advantage of the potential of this ecosystem!