Nethermind

Installing and configuring Nethermind as a systemd service.

Nethermind

Nethermind is a high-performance Ethereum execution client built on the .NET core. It is highly favored by validators and MEV searchers due to its optimized execution speeds and flexible configuration.

🛡️ Role: Nethermind serves as a direct alternative to Geth. It contributes to Client Diversity, protecting your node (and the network) from potential bugs in the Go-Ethereum codebase.


1. Install Dependencies

Nethermind requires the .NET runtime libraries and a few system utilities to run efficiently on Linux.

Bash

# Update repositories
sudo apt update

# Install required libraries (Snappy compression & libc)
sudo apt install -y libsnappy-dev libc6-dev libc6

2. Download & Install

Unlike Geth (which is a single binary), Nethermind consists of a suite of libraries. We will download the latest release and extract it to a dedicated directory.

A. Create the Application Directory

Bash

# Create a folder for the binary
sudo mkdir -p /usr/local/lib/nethermind

# Download the latest Linux release (Check https://downloads.nethermind.io/ for newer versions)
sudo wget https://github.com/NethermindEth/nethermind/releases/download/1.25.4/nethermind-1.25.4-8692657e-linux-x64.zip -O nethermind.zip

# Unzip into the directory
sudo unzip nethermind.zip -d /usr/local/lib/nethermind

# Cleanup
rm nethermind.zip

B. Set Permissions Ensure the ethereum user can execute the runner.

Bash

sudo chown -R ethereum:ethereum /usr/local/lib/nethermind
sudo chmod +x /usr/local/lib/nethermind/Nethermind.Runner

3. Configure Systemd Service

We will configure Nethermind to run as a background service, utilizing the data directories we created in Step 2.

Create the service file:

Bash

sudo nano /etc/systemd/system/nethermind.service

Paste the following configuration:

Ini, TOML

[Unit]
Description=Nethermind Execution Client
After=network.target

[Service]
User=ethereum
Group=ethereum
Type=simple
Restart=always
RestartSec=5

# Execution Command
ExecStart=/usr/local/lib/nethermind/Nethermind.Runner \
  --config mainnet \
  --datadir /home/ethereum/execution \
  --JsonRpc.Enabled true \
  --JsonRpc.Host 0.0.0.0 \
  --JsonRpc.Port 8545 \
  --JsonRpc.JwtSecretFile /home/ethereum/jwt/jwt.hex \
  --JsonRpc.EngineHost 127.0.0.1 \
  --JsonRpc.EnginePort 8551 \
  --Network.DiscoveryPort 30303 \
  --HealthChecks.Enabled true

# Resource Limits
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target

🔍 Flag Explanation:

  • --config mainnet: Loads the default mainnet presets (Snap Sync, etc.).

  • --JsonRpc.JwtSecretFile: The shared secret for the Engine API (Connection to Consensus Client).

  • --JsonRpc.Host 0.0.0.0: Allows external access (protected by Firewall).


4. Start the Service

Reload the systemd daemon and start the node.

Bash

# Reload systemd configuration
sudo systemctl daemon-reload

# Enable Nethermind to start on boot
sudo systemctl enable nethermind

# Start the service
sudo systemctl start nethermind

5. Verify Status

Check the logs to ensure Nethermind is running and attempting to peer.

Bash

sudo journalctl -fu nethermind

Expected Output:

  1. Old Blocks: You might see it quickly importing "Old Headers" or "State" via Snap Sync.

  2. Waiting for CL: You will see messages like Waiting for Consensus Client... or Engine API: New Payload. This confirms it is ready for Step 4.

⚡ Performance Note: Nethermind is very fast at syncing but consumes significant RAM during the initial sync. Ensure your machine has at least 32GB RAM.

Last updated