Nethermind client guides and options

One-page interactive complete guide to configurate and operate Nethermind client.

Disclaimer

This guide is for informational purposes only. The author nor website owner does not guarantee accuracy of the information in this guide and is not responsible for any damages or losses incurred by following the guide.

Individual guides

Chains support

Supported Ethereum
Supported Gnosis

On-page actions for Nethermind client

Nethermind client can be used for staking on various supported chains. Client installation is always only one, used by services with an individual configuration (different service name, data path and ports in use).

Install Nethermind client

Installing Nethermind client

Nethermind documentation: https://docs.nethermind.io/

  1. Find the latest stable version of Nethermind on Github

  2. Download Nethermind version 1.29.1-dfea5240 to your node

    cd ~/downloads && curl -LO https://github.com/NethermindEth/nethermind/releases/download/1.29.1/nethermind-1.29.1-dfea5240-linux-x64.zip
  3. Install package for unzipping

    sudo apt-get install -y unzip
  4. Unzip the downloaded file

    unzip nethermind-1.29.1-dfea5240-linux-x64 -d nethermind
  5. Copy the client to /usr/local/bin/

    sudo cp -a nethermind /usr/local/bin/nethermind
  6. Remove downloaded files

    cd ~/downloads && rm nethermind-1.29.1-dfea5240-linux-x64.zip && rm -r nethermind

Configurate service

Create a system user and data directory for Nethermind service

  • Create a user

    :
    sudo useradd --system --no-create-home --shell /bin/false nethermind
  • Create a folder for Nethermind data

    :
    sudo mkdir -p /var/lib/nethermind
  • Set access permission and ownership for the Nethermind data folder

    sudo chown -R nethermind:nethermind /var/lib/nethermind

Configurate & Run Nethermind service

  • Choose ports for communication

    Change the default ports below if you are going to stake on more chains simultaneously (e.g. Ethereum and Gnosis at once) on the same machine. If you are going to stake only, you can keep the default ports. If you are changing the default ports, be sure that the newly selected port is not already in used. A port in used may be checked with following code:

    ss -tuln | grep ':PORT'
    • If it returns empty response, the port is free and can be used.

    Ports selection

    • (Default port: 30303)
    • (Default port: 8545)
    • (Default port: 8551)

    If needed, check JSON RPC server and fundamentals in Nethermind documentation.

  • Enable port for P2P communication (execution client)

    To allow execution client synchronization, there's need to enable P2P traffic to TCP (allows the node to connect to peers) and UDP (allows node discovery) port 30303. It may be done with following UFW setup:

    $ sudo ufw allow 30303
  • Create configuration file for Nethermind service

    1. Open Nethermind configuration file

      sudo nano /etc/systemd/system/nethermind.service
    2. Copy the configuration below into the file. If needed, check flags documentation.

      [Unit]
      Description=Nethermind Execution Client (Ethereum Mainnet)
      After=network.target
      Wants=network.target
      
      [Service]
      User=eth-nethermind
      Group=eth-nethermind
      Type=simple
      Restart=always
      RestartSec=5
      WorkingDirectory=/var/lib/nethermind
      Environment="DOTNET_BUNDLE_EXTRACT_BASE_DIR=/var/lib/nethermind"
      ExecStart=/usr/local/bin/nethermind/nethermind \
        --config mainnet \
        --datadir /var/lib/nethermind \
        --Sync.SnapSync true \
        --Sync.AncientBodiesBarrier 11052984 \
        --Sync.AncientReceiptsBarrier 11052984 \
        --JsonRpc.JwtSecretFile /var/lib/jwtsecret/ethereum.hex \
        --Network.P2PPort 30303 \
        --Network.DiscoveryPort 30303 \
        --JsonRpc.EnginePort 8551 \
        --JsonRpc.Port 8545
      
      [Install]
      WantedBy=default.target
      [Unit]
      Description=Nethermind Execution Client (Gnosis chain)
      After=network.target
      Wants=network.target
      [Service]
      User=gno-nethermind
      Group=gno-nethermind
      Type=simple
      Restart=always
      RestartSec=5
      WorkingDirectory=/var/lib/nethermind
      Environment="DOTNET_BUNDLE_EXTRACT_BASE_DIR=/var/lib/nethermind"
      ExecStart=/usr/local/bin/nethermind/nethermind \
        --config gnosis \
        --datadir /var/lib/nethermind \
        --JsonRpc.JwtSecretFile /var/lib/jwtsecret/gnosis.hex \
        #--Sync.SnapSync false \ Supported since v 1.28
        #--Sync.FastSync true \
        --Sync.SnapSync true \ 
        --Network.P2PPort 30303 \
        --Network.DiscoveryPort 30303 \
        --JsonRpc.EnginePort 8551 \
        --JsonRpc.Port 8545
        #--Network.ActivePeersMaxCount 25 \
        #--Blocks.TargetBlockGasLimit 17000000
      [Install]
      WantedBy=default.target
      *Note: Update JsonRpc.JwtSecretFile, if you use different
    3. Press CTRL + X then Y then ENTER to save and exit the config file.
  • Start the Nethermind service

    sudo systemctl daemon-reload
    sudo systemctl start nethermind
  • Check the service

    systemctl status nethermind
    journalctl -fu nethermind

    If you see message "Waiting for Forkchoice message from Consensus Layer to set fresh pivot block", you can move on a Consensis Client setup.

  • Start the service automatically on system startup

    sudo systemctl enable nethermind

Update Nethermind client

Updating Nethermind client

Nethermind documentation: https://docs.nethermind.io/

Check current version of Nethermind running on the server

$ /usr/local/bin/nethermind/./nethermind-cli
$ node.switch("127.0.0.1:8545")
$ web3.clientVersion
  1. Find the latest stable version of Nethermind on Github

  2. Download Nethermind version 1.29.1-dfea5240 to your node

    cd ~/downloads && curl -LO https://github.com/NethermindEth/nethermind/releases/download/1.29.1/nethermind-1.29.1-dfea5240-linux-x64.zip
  3. Unzip the downloaded file

    unzip nethermind-1.29.1-dfea5240-linux-x64 -d nethermind
  4. Stop running clients

    $ journalctl -fu nethermind
    $ sudo systemctl stop nethermind && systemctl status nethermind
  5. Remove the old client

    sudo rm -r /usr/local/bin/nethermind
  6. Copy the client to /usr/local/bin/

    sudo cp -a nethermind /usr/local/bin/nethermind
  7. Start the client again

    $ sudo systemctl start nethermind && systemctl status nethermind
    $ journalctl -fu nethermind
  8. Remove downloaded files

    cd ~/downloads && rm nethermind-1.29.1-dfea5240-linux-x64.zip && rm -r nethermind