# How to run an Ethereum node

## System Requirements

Follow the [Prerequisites](https://docs.erigon.tech/erigon/v2/basic-usage/getting-started#prerequisites):

* For an [archive node](https://docs.erigon.tech/erigon/v2/basic-usage/usage/type-of-node#archive-node) of Ethereum mainnet: 3.5 TB
* For a [full node](https://docs.erigon.tech/erigon/v2/basic-usage/usage/type-of-node#full-node) of Holesky testnet : 190 GB

{% hint style="info" %}
**DO NOT USE HDD**: Hard Disk Drives (HDD) are not recommended for running Erigon, as it may cause the node to stay N blocks behind the chain tip and lead to performance issues.

**USE SSD or NVMe**: Solid State Drives (SSD) or Non-Volatile Memory Express (NVMe) drives are recommended for optimal performance. These storage devices provide faster read/write speeds and can handle the demanding requirements of an Erigon node.
{% endhint %}

## Install Erigon[​](https://wiki.polygon.technology/docs/pos/operate/node/erigon-client/#install-erigon-client) <a href="#install-erigon-client" id="install-erigon-client"></a>

For MacOS and Linux, run the following commands to build the latest Erigon version from source:

{% code overflow="wrap" %}

```bash
git clone --branch v2.61.3 --single-branch https://github.com/erigontech/erigon.git
cd erigon
make erigon
```

{% endcode %}

This should create the binary at `./build/bin/erigon`.

{% hint style="info" %}
If you are using Windows follow first the dedicated [installation](https://docs.erigon.tech/erigon/v2/basic-usage/getting-started/windows)[ guide](https://docs.erigon.tech/erigon/v2/basic-usage/getting-started/windows) or use [Docker](https://docs.erigon.tech/erigon/v2/basic-usage/getting-started/docker).
{% endhint %}

## Start Erigon[​](https://wiki.polygon.technology/docs/pos/operate/node/erigon-client/#start-erigon-client) <a href="#start-erigon-client" id="start-erigon-client"></a>

Alongside Erigon you must use a  [Consensus Layer](https://docs.erigon.tech/erigon/v2/advanced-usage/consensus-layer) like **Prysm** or **Lighthouse**. This will also allow you to access the Ethereum blockchain directly and give you the possibility to stake your GNO and do [block production](https://docs.erigon.tech/erigon/v2/advanced-usage/consensus-layer/block-production).

{% tabs %}
{% tab title="Erigon with Prysm" %}
Start Erigon&#x20;

```
./build/bin/erigon
```

Install and run **Prysm:**

{% embed url="<https://docs.prylabs.network/docs/install/install-with-script>" %}
Prysm installation instructions
{% endembed %}

Prysm must fully synchronize before Erigon can start syncing, since Erigon requires an existing target head to sync to. The quickest way to get Prysm synced is to use a public checkpoint synchronization endpoint from the list at <https://eth-clients.github.io/checkpoint-sync-endpoints>.

In order to communicate with Erigon the execution endpoint `<erigon address>:8551` must be specified, where `<erigon address>` is either `//localhost` or the IP address of the device running Erigon.&#x20;

Prysm must point to the [JWT secret](https://docs.erigon.tech/erigon/v2/advanced-usage/consensus-layer/jwt-secret) automatically created by Erigon in the [datadir](#configure-erigon-client) directory (in the below example the default data directory is used).

{% code overflow="wrap" %}

```
./prysm.sh beacon-chain --execution-endpoint=http://localhost:8551 --mainnet --jwt-secret=/home/admin/.local/share/erigon/jwt.hex --checkpoint-sync-url=https://beaconstate.info --genesis-beacon-api-url=https://beaconstate.info
```

{% endcode %}

If your Prysm is on a different device, add `--authrpc.addr 0.0.0.0` ([Engine API](https://github.com/ethereum/execution-apis/tree/main/src/engine) listens on localhost by default) as well as `--authrpc.vhosts <CL host>`.
{% endtab %}

{% tab title="Erigon with Lighthouse" %}
Start Erigon

```
./build/bin/erigon
```

Install and run **Lighthouse**:

{% embed url="<https://lighthouse-book.sigmaprime.io/installation.html>" %}
Lighthouse installation instructions
{% endembed %}

Because Erigon needs a target head in order to sync, Lighthouse must be synced before Erigon may synchronize. The fastest way to synchronize Lighthouse is to use one of the many public checkpoint synchronization endpoints at <https://eth-clients.github.io/checkpoint-sync-endpoints>.

In order to communicate with Erigon the execution endpoint `<erigon address>:8551` must be specified, where `<erigon address>` is either `//localhost` or the IP address of the device running Erigon.

Lighthouse must point to the [JWT secret](https://docs.erigon.tech/erigon/v2/advanced-usage/consensus-layer/jwt-secret) automatically created by Erigon in the [datadir](#configure-erigon-client) directory (in the below example the default data directory is used).

```
lighthouse bn \
  --network mainnet \
  --execution-endpoint http://localhost:8551 \
  --execution-jwt /home/admin/.local/share/erigon/jwt.hex \
  --checkpoint-sync-url https://mainnet.checkpoint.sigp.io \
```

{% endtab %}
{% endtabs %}

## Basic Configuration[​](https://wiki.polygon.technology/docs/pos/operate/node/erigon-client/#configure-erigon-client) <a href="#configure-erigon-client" id="configure-erigon-client"></a>

* If you want to store Erigon files in a non-default location, add flag `--datadir=<your_data_dir>`
  * Default data directory is */home/admin/.local/share/erigon*.
* `--prune=hrtc` to run a [full node](https://docs.erigon.tech/erigon/v2/basic-usage/usage/type-of-node#full-node) with latest 90'000 blocks instead of an [archive node](https://docs.erigon.tech/erigon/v2/basic-usage/usage/type-of-node#archive-node). If you change your mind remember to delete the `--datadir` folder content.
* Default chain is `--chain=mainnet`, add the flag:
  * `--chain=sepolia` for Sepolia testnet;
  * `--chain=holesky` for Holesky testnet.
* `--http.addr="0.0.0.0" --http.api=eth,web3,net,debug,trace,txpool` to use [RPC](https://docs.erigon.tech/erigon/v2/advanced-usage/rpc-daemon) and e.g. be able to connect your [wallet](https://docs.erigon.tech/erigon/v2/basic-usage/wallet).
* To increase download speed add `--torrent.download.rate=512mb` (default is 16mb)

To stop the Erigon node you can use the `CTRL+C` command. Additional flags can be added to [configure](https://docs.erigon.tech/erigon/v2/advanced-usage/configure-erigon) the node with several [options](https://docs.erigon.tech/erigon/v2/advanced-usage/options).
