Skip to main content

Run Validator: Lodestar


The Validator requires a Consensus Client (also known as Beacon Node) in order to operate. See Step 3: Run Beacon Node - Lodestar for more information.

Option 1: Run as System Process

Refer to Guide

Option 2: Run using Docker

1. Folder Structure

Create new folders:

mkdir /home/$USER/gnosis/consensus/keystores
├── jwtsecret/
├── execution/
└── consensus/
├── data/
└── keystores/

2. Docker Compose

Modify your docker-compose file with your favorite text editor and add the validator container. You will also need to add the command --suggestedFeeRecipient=$FEE_RECIPIENT to your consensus container. The file should now look like:

version: "3"

# From Step 2
# ...

# From Step 3
# ...

container_name: validator
image: chainsafe/lodestar:latest
restart: always
- gnosis_net
- 5064:5064/tcp
- /home/$USER/gnosis/consensus/validators:/data/validators
- /home/$USER/gnosis/consensus/keystores:/keystores
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- NODE_OPTIONS=--max-old-space-size=4096
command: |
driver: "local"

name: gnosis_net

3. Environment Variables

Add an .env file with your fee recipient (your Gnosis address) and graffiti in /home/$USER/gnosis/.env.


Replace suggestedFeeRecipient with your Gnosis address. This fee recipient address will receive tips from user transactions from the block the validator proposed. If not set, the tips will be sent to zero address, that is burnt competely. It is strongly recommended that you configure this value in your setup. Learn more about suggestedFeeRecipient flag in Lodestar docs.

Replace graffiti with your own graffiti. It is an optional field that can be used to add a message to the block by the proposer.

4. Keystore Location

Add your keystores in /home/$USER/gnosis/consensus/keystores/ and their password in a file /home/$USER/gnosis/consensus/keystores/password.txt to get this file structure:

├── docker-compose.yml
├── .env
├── jwtsecret/
├── execution/
└── consensus/
├── data/
└── keystores/
   ├── keystore-001.json
  ├── keystore-002.json
   └── password.txt

5. Import Keystores

Import your validators:

When the Lodestar validator container starts, it will search the directories for the keystores and password, and import them automatically.

6. Start Containers

Start the validator service listed in the compose file:

cd /home/$USER/gnosis
docker-compose up -d

7. Monitor Logs

Check your logs for each service (execution, consensus, or validator) with:

docker logs -f --tail 500 execution

8. Make a Deposit

Make deposit once your node is fully synced (this can take a few hours depending on setup).


At this stage you should have your EL and CL fully synced and validators must be imported to your CL.

See the Validator Deposits section.

9. Updating your Node

To update, just pull the new images, then stop and restart your docker-compose file:

cd /home/$USER/gnosis
docker-compose pull
docker-compose stop
docker-compose up -d