Installing Nethermind
Nethermind can be installed in several ways:
Prerequisites
Does not apply to Docker distributions.
Before installing Nethermind, your specific platform might need the following prerequisites.
- Linux
- Windows
- macOS
On Linux systems, Snappy is a required dependency. Below are the installation instructions for the supported distros.
Ubuntu and Debian-based distros
sudo apt-get install libsnappy-dev
CentOS, Fedora, and RHEL-like distros
sudo dnf install snappy
On RHEL-like systems, Nethermind also requires the following symlink to bzip2:
sudo ln -s `find /usr/lib64/ -type f -name "libbz2.so.1*"` /usr/lib64/libbz2.so.1.0
Although the modern versions of Windows are bundled with a recent version of Microsoft Visual C++ Redistributable, in some cases, it may need an update:
winget install Microsoft.VCRedist.2015+.x64
Package managers
Package managers are the easiest and fastest way of installing Nethermind.
If you're using a package manager, it's highly recommended to set the -dd, --datadir
flag to specify the data directory. Otherwise, Nethermind will use the default data directory where the package is installed, which may not be preserved on further updates or uninstall.
- Linux
- Windows
- macOS
On Ubuntu and other Linux distros supporting PPA, Nethermind can be installed via Launchpad PPA.
First, add the Nethermind repository:
sudo add-apt-repository ppa:nethermindeth/nethermind
If the command is not found, run:
sudo apt-get install software-properties-common
Then, install Nethermind as follows:
sudo apt-get update
sudo apt-get install nethermind
On Windows, Nethermind can be installed via Windows Package Manager as follows:
winget install nethermind
On macOS, Nethermind can be installed via Homebrew.
First, add the Nethermind repository:
brew tap nethermindeth/nethermind
Then, install Nethermind as follows:
brew install nethermind
For further instructions, see Running Nethermind.
Standalone downloads
Standalone downloads give users more flexibility by allowing them to install a specific version of Nethermind, choose the installation location, and prevent automatic updates.
Standalone downloads are available on GitHub Releases and at downloads.nethermind.io as ZIP archives for x64 and AArch64 (ARM64) CPU architectures for Linux, Windows, and macOS.
Confuguring as a Linux service
To install Nethermind as a Linux service, see the nethermind.service unit file as an example. As it's configured to run Nethermind as the specific user and group and looks for the executable in a predefined location, the following steps need to be fulfilled:
Any of these steps can be omitted by replacing them with corresponding changes in the unit file.
For instance, if you want to run Nethermind as a different user, change the User
and Group
options in the unit file.
- Create a new user and group:
# Create a new user and group
sudo useradd -m -s /bin/bash nethermind
# Increase the maximum number of open files
sudo bash -c 'echo "nethermind soft nofile 100000" > /etc/security/limits.d/nethermind.conf'
sudo bash -c 'echo "nethermind hard nofile 100000" >> /etc/security/limits.d/nethermind.conf'
# Switch to the nethermind user
sudo su -l nethermind
# Create required directories
# Note that the home directory (~) is now /home/nethermind
mkdir ~/build
mkdir ~/data
- Download Nethermind and extract the package contents to the
~/build
directory. - Configure options in the
~/.env
file:
# Required
NETHERMIND_CONFIG="mainnet"
# Optional
NETHERMIND_HEALTHCHECKSCONFIG_ENABLED="true"
Now, let's set up the Linux service:
# Download the unit file
curl -L https://raw.githubusercontent.com/NethermindEth/nethermind/master/scripts/nethermind.service -o nethermind.service
# Move the unit file to the systemd directory
sudo mv nethermind.service /etc/systemd/system
# Reload the systemd daemon
sudo systemctl daemon-reload
# Start the service
sudo systemctl start nethermind
# Optionally, enable the service to start on boot
sudo systemctl enable nethermind
To ensure the service is up and running, check its status as follows:
sudo systemctl status nethermind
To monitor the Nethermind output, run:
journalctl -u nethermind -f
For further instructions, see Running Nethermind.
Docker container
The Docker images of Nethermind are available on Docker Hub.
This registry provides production versions of Nethermind with two types of tags:
nethermind/nethermind:latest
is the latest version of Nethermind (the default tag)nethermind/nethermind:<version>
is the specific version of Nethermind where<version>
is the actual version of Nethermind.
To download the image from the registry, run:
docker pull nethermind/nethermind
Starting a node is achieved by:
docker run -it nethermind/nethermind
The following ports are exposed by default:
8545
: TCP, for the JSON-RPC interface8551
: TCP, for the consensus client JSON-RPC interface30303
: TCP and UDP, for P2P networking
It's highly recommended to mount data volumes as the Nethermind's data directories to ensure the synced data is preserved between the container restarts.
The following volume mount points are available by default:
/nethermind/nethermind_db
: used to store the database/nethermind/logs
: used to store the logs/nethermind/keystore
: used to store the keys
To mount separate volumes for each directory listed above, run:
docker run -it \
--mount type=bind,source=path/to/db,target=/nethermind/nethermind_db \
--mount type=bind,source=path/to/logs,target=/nethermind/logs \
--mount type=bind,source=path/to/keystore,target=/nethermind/keystore \
nethermind/nethermind
Alternatively, a single volume can be specified as the Nethermind data directory as follows:
docker run -it \
--mount type=bind,source=path/to/data_dir,target=/nethermind/data_dir \
nethermind/nethermind -dd /nethermind/data_dir
Note that any Nethermind-specific configuration option can be specified at the end. For instance, the -dd
option in this case. For further instructions, see Running Nethermind.
To build the Docker image yourself, see Building Docker image.
Running Nethermind
- A consensus client of your choice must be running before you start Nethermind.
- Please check out the security considerations before using Nethermind for critical operations.
Nethermind is mainly controlled by command line options (aka arguments or flags).
The full list of options can be displayed by running:
nethermind -h
For instance, to launch the client with the default configuration for the Mainnet and custom data directory, run:
nethermind -c mainnet -dd path/to/data/dir
For detailed info about the available configuration options, see Configuration.
Supported networks
To run Nethermind on a specific network, use the -c, --config
command line option. Currently, the following networks are supported out of the box:
- Ethereum
- Base
- Base Mainnet
- Base Goerli (testnet)
- Base Sepolia (testnet)
- Energy Web Chain
- Energy Web
- Volta (testnet)
- Gnosis Chain
- Optimism
- OP Mainnet
- OP Goerli (testnet)
- OP Sepolia (testnet)