Node Guide

Learn how to run your 0G Node or Validator

As the traditional way of running node is very well covered in the official docs and by other community member, we only focus on running node using Docker.

we have developed a docker setup to easily run a node without dealing with build requirements, systemd and opening firewall ports.

Requirements

You need a linux machine with docker installed on it. many VPS providers have an option to setup Docker through order interface, otherwise you should install it manually.

The official docker docs are pretty straight forward

Run the node using docker

Clone 0G-docker repository on your server

copy .env.sample to .env and fill it with your variables

build the image

docker compose --profile node build

run and exec into an ephemeral container:

docker compose --profile node run --rm --entrypoint /bin/bash node

inside the container run init script

/init.sh

if you want modify config files further edit the config manually

nano $HOME/.0gchain/config/config.toml

then create a new wallet or import one

0gchaind keys add $WALLET_NAME --recover