Skip to main content
Version: 1.29.0

Installing Nethermind

Nethermind can be installed in several ways:

Prerequisites

info

Does not apply to Docker distributions.

Before installing Nethermind, your specific platform might need the following prerequisites.

None

Package managers

Package managers are the easiest and fastest way of installing Nethermind.

tip

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.

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
note

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

For further instructions, see Running a node.

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.

Configuring 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:

note

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.

  1. 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
  2. Download Nethermind and extract the package contents to the ~/build directory.

  3. Configure options in the ~/.env file:

    ~/.env
    # 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 a node.

Docker container

The Docker images of Nethermind are available on Docker Hub.

This registry provides production versions of Nethermind with 3 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.
  • nethermind/nethermind:<version>-chiseled is a rootless and chiseled image with the specific version of Nethermind where <version> is either latest or the actual version of Nethermind.
    For security reasons, this image contains only the absolutely necessary components and is intended to run as a non-root app user with UID/GID of 64198.

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 interface
  • 8551: TCP, for the consensus client JSON-RPC interface
  • 30303: TCP and UDP, for P2P networking
tip

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 a node.

To build the Docker image yourself, see Building Docker image.