How to Set Up EthStats Monitoring for Your Base Node: A Complete Guide

Configure the OP_GETH_ETH_STATS or OP_NETHERMIND_ETHSTATS_* environment variables in your .env.mainnet or .env.sepolia file, then restart your container to automatically publish metrics to your EthStats server.

Base nodes support real-time performance monitoring through EthStats, a network statistics dashboard that aggregates client metrics. The base/node repository provides Docker entrypoint scripts that automatically configure EthStats reporting for Geth and Nethermind clients through environment variables, eliminating manual flag configuration.

Prerequisites for EthStats Monitoring

Before configuring EthStats, ensure you have selected a supported execution client. The base/node repository supports EthStats integration for Geth and Nethermind through their respective entrypoint scripts. You will need access to an EthStats server (either self-hosted or third-party) with your node name and secret credentials.

Configuring EthStats for Geth

To enable EthStats monitoring with the Geth client, you must set the connection string environment variable.

Environment Variables

Edit your .env.mainnet or .env.sepolia file and uncomment the EthStats configuration line:

OP_GETH_ETH_STATS=YourNodeName:[email protected]:3000

Replace YourNodeName with your desired node identifier, yourSecret with your EthStats server secret, and stats.example.com:3000 with your EthStats server address.

How the Entrypoint Works

The geth/geth-entrypoint script automatically detects this variable and appends the --ethstats flag to the Geth command. As implemented in the source code at lines 33-35:

if [ "${OP_GETH_ETH_STATS+x}" = x ]; then
    ADDITIONAL_ARGS="$ADDITIONAL_ARGS --ethstats=$OP_GETH_ETH_STATS"
fi

Configuring EthStats for Nethermind

Nethermind requires separate environment variables to enable and configure EthStats reporting.

Environment Variables

Add the following variables to your .env.mainnet or .env.sepolia file:

OP_NETHERMIND_ETHSTATS_ENABLED=true
OP_NETHERMIND_ETHSTATS_ENDPOINT=stats.example.com:3000
OP_NETHERMIND_ETHSTATS_NODE_NAME=MyNethermindNode

The OP_NETHERMIND_ETHSTATS_NODE_NAME variable is optional and defaults to "NethermindNode" if not specified.

How the Entrypoint Works

The nethermind/nethermind-entrypoint script constructs the appropriate command-line arguments when these variables are present. According to the implementation at lines 37-44, the script appends:

if [ "${OP_NETHERMIND_ETHSTATS_ENABLED}" = "true" ]; then
    ADDITIONAL_ARGS="$ADDITIONAL_ARGS --EthStats.Enabled true"
    ADDITIONAL_ARGS="$ADDITIONAL_ARGS --EthStats.NodeName ${OP_NETHERMIND_ETHSTATS_NODE_NAME:-NethermindNode}"
    ADDITIONAL_ARGS="$ADDITIONAL_ARGS --EthStats.Endpoint ${OP_NETHERMIND_ETHSTATS_ENDPOINT}"
fi

Starting the Node with EthStats Enabled

After configuring your environment variables, start your Base node using Docker Compose with the appropriate network environment file.

For Mainnet:

NETWORK_ENV=.env.mainnet docker compose up --build

For Sepolia testnet:

NETWORK_ENV=.env.sepolia docker compose up --build

Once the container starts, the entrypoint scripts will automatically configure your client to report metrics to the specified EthStats server.

Summary

  • Geth users set OP_GETH_ETH_STATS=nodename:secret@host:port in their .env file to enable automatic metric reporting.
  • Nethermind users set OP_NETHERMIND_ETHSTATS_ENABLED=true, OP_NETHERMIND_ETHSTATS_ENDPOINT, and optionally OP_NETHERMIND_ETHSTATS_NODE_NAME.
  • The geth/geth-entrypoint and nethermind/nethermind-entrypoint scripts automatically translate these environment variables into client-specific command-line flags.
  • Restart your node with NETWORK_ENV=.env.mainnet docker compose up --build to apply the configuration changes.

Frequently Asked Questions

What is EthStats and why should I use it with Base?

EthStats is a network monitoring dashboard that collects real-time metrics from Ethereum and Layer 2 nodes. When you set up EthStats monitoring for your Base node, you gain visibility into block propagation, peer counts, and system performance, which helps ensure your node stays healthy and synchronized with the Base network.

Can I use EthStats with the Reth client?

Currently, the base/node repository only provides EthStats integration for Geth and Nethermind through the geth/geth-entrypoint and nethermind/nethermind-entrypoint scripts. The Reth entrypoint does not include EthStats configuration variables, so you would need to manually configure Reth's built-in monitoring or use a different observability solution.

How do I troubleshoot connection issues to EthStats?

If your node fails to report to the EthStats server, verify that the OP_GETH_ETH_STATS or OP_NETHERMIND_ETHSTATS_ENDPOINT variables point to the correct host and port. Check that your firewall allows outbound connections to the EthStats server on the specified port. You can also inspect the container logs for connection errors; the entrypoint scripts in geth/geth-entrypoint and nethermind/nethermind-entrypoint log the flags they append, confirming whether EthStats was enabled.

Is EthStats monitoring available on Base Sepolia testnet?

Yes, EthStats monitoring works on both Base Mainnet and Base Sepolia. The configuration process is identical for both networks; simply edit the appropriate environment file (.env.sepolia for Sepolia or .env.mainnet for Mainnet) and set the same EthStats variables before starting your node with NETWORK_ENV=.env.sepolia docker compose up --build.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →