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 clone
command to clone theadventure-layer-l2-scripts
repository 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.example
file 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
direnv
tool, which automatically loads and unloads environment variables specific to the directory. - Add the
direnv
hook to your.bashrc
file and reload.bashrc
to enabledirenv
in the current shell session. - Run
direnv allow
to allowdirenv
to load environment variables from the.envrc
file.
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-node
command to navigate to therepolica-node
directory. -
Initialize:
./init.sh
- Run the
./init.sh
script to initialize the Replica Node. This typically involves setting up necessary files and configurations.
- Run the
-
Run:
./run-all.sh
- Run the
./run-all.sh
script 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.sh
script 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?