Skip to content

Install from source

Prerequisites

Make sure to have Yarn installed. It is also recommended to install NVM (Node Version Manager) and use the LTS version (currently v18) of NodeJS.

Info

NodeJS versions older than the current LTS are not supported by Lodestar. We recommend running the latest Node LTS. It is important to make sure the NodeJS version is not changed after reboot by setting a default nvm alias default <version> && nvm use default.

Note

Node Version Manager (NVM) will only install NodeJS for use with the active user. If you intend on setting up Lodestar to run under another user, we recommend using Nodesource's source for NodeJS so you can install NodeJS globally.

Clone repository

Clone the repo locally and build from the stable release branch.

git clone -b stable https://github.com/chainsafe/lodestar.git

Switch to created directory.

cd lodestar

Install packages

Install across all packages. Lodestar follows a monorepo structure, so all commands below must be run in the project root. Use the --ignore-optional flag to prevent downloading the Ethereum Consensus spec tests.

yarn install --ignore-optional

Build source code

Build across all packages.

yarn run build

Or if you are using Lerna:

lerna bootstrap

Lodestar CLI

Lodestar should now be ready for use.

./lodestar --help

See Command Line Reference for further information.