Building a shard node
How to run a replica node
Step 1: Clone the adventure-layer-l2-scripts repository
git clone https://github.com/AdventureGoldDao/adventure-layer-l2-scripts.git
- Use the
git clonecommand to clone theadventure-layer-l2-scriptsrepository from GitHub. This will download all files from the repository to your local machine.
Step 2: Initialize the environment configuration
cp .envrc.example .envrc
- Copy the
.envrc.examplefile to.envrc. This file contains example configurations for environment variables that you can modify as needed.
Step 3: Update configuration and run
sudo apt install direnv
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
source ~/.bashrc
direnv allow
- Install the
direnvtool, which automatically loads and unloads environment variables specific to the directory. - Add the
direnvhook to your.bashrcfile and reload.bashrcto enabledirenvin the current shell session. - Run
direnv allowto allowdirenvto load environment variables from the.envrcfile.
Step 4: Run the Replica Node
cd ./repolica-node
# init
./init.sh
# run
./run-all.sh
# stop
./stop.sh
-
Navigate to the directory: Use the
cd ./repolica-nodecommand to navigate to therepolica-nodedirectory. -
Initialize:
./init.sh- Run the
./init.shscript to initialize the Replica Node. This typically involves setting up necessary files and configurations.
- Run the
-
Run:
./run-all.sh- Run the
./run-all.shscript to start the Replica Node. This script will start all necessary processes and services, allowing the node to begin running and handling requests.
- Run the
-
Stop:
./stop.sh- Run the
./stop.shscript to stop the Replica Node. This script will stop all related processes and services, ensuring the node shuts down safely.
- Run the
Was this page helpful?

