0x4r45h / 0g-docker

Zero Gravity node tool set

Home Page:https://docs.emberstake.xyz/networks/0g-zero-gravity/guide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0G Dockerized

This repository is starting point to run a Zero-Gravity Node/Validator using docker compose

Storage node and KV nodes will be added soon


Getting started

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

build the image

docker compose build

run and exec into an ephemeral container:

docker compose 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

Now exit the container and run node service in background

docker compose up -d

Restore snapshot or use state sync

first stop the running service

docker compose stop node

run an ephemeral container again

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

inside this container run your snapshot/state sync commands, then exit and run service again

docker compose up -d

Run arbitrary commands inside the node container

to run any commands using 0gchaind, just exec into running node service

docker compose exec node bash

here you have access to 0gchaind binary

About

Zero Gravity node tool set

https://docs.emberstake.xyz/networks/0g-zero-gravity/guide


Languages

Language:Shell 58.4%Language:Dockerfile 41.6%