# Getting started

In order to use Erigon, the software has to be installed first. There are several ways to install Erigon, depending on the operating system and the user's choice of installation method, e.g. using a package manager, container or building from source.

The current stable and production-ready version, which is fully documented in these pages, is **Erigon 2**.

## Hardware Requirements

For an [archive node](https://docs.erigon.tech/erigon/v2/usage/type-of-node#archive-node) of Ethereum Mainnet it is recommended at least 3TB of storage space: 1.8TB state, 400GB temp files (can symlink or mount folder `<datadir>/temp` to another disk).

* For an Archive node of Ethereum Mainnet we recommend >=3.5TB storage space: 2.3TiB state (as of March 2024), 643GiB snapshots (can symlink or mount folder `<datadir>/snapshots` to another disk), 200GB temp files (can symlink or mount folder `<datadir>/temp` to another disk). Ethereum Mainnet Full node (see [Pruned Node](https://docs.erigon.tech/erigon/v2/basic-usage/usage/type-of-node)): 1.5TiB not including temp files (April 2024).
* Gnosis Chain Archive: 1.7TiB (March 2024). Gnosis Chain Full node (see [Pruned Node](https://docs.erigon.tech/erigon/v2/basic-usage/usage/type-of-node)): 530GiB (March 2024).
* Polygon Mainnet Archive: 8.5TiB (December 2023). Polygon Mainnet Full node (see [Pruned Node](https://docs.erigon.tech/erigon/v2/basic-usage/usage/type-of-node)) with `--prune.*.older 15768000`: 5.1Tb (September 2023). Polygon Mumbai Archive: 1TB. (April 2022).

A locally mounted SSD or NVMe disk is recommended for storage. HDD is not recommended because it will cause Erigon to always stay N blocks behind the chain tip, but not fall behind. In addition, SSD performance degrades when close to full capacity.

{% hint style="info" %}
When using multiple hard drives, a RAID0 configuration is recommended as it offers high performance and efficient use of space. Raid ZFS is not recommended.
{% endhint %}

More details on disk storage [here](https://erigon.substack.com/p/disk-footprint-changes-in-new-erigon?s=r) and [here](https://ledgerwatch.github.io/turbo_geth_release.html#Disk-space).

* **CPU**: 64-bit architecture. Number of core and threads is not really important, you don't need a super powerful computer to run Erigon.
* **RAM**: ≥ 16GB
* **On Linux**: kernel > v4

### Tips for Faster Sync[​](https://wiki.polygon.technology/docs/pos/operate/node/erigon-client/#tips-for-faster-sync) <a href="#tips-for-faster-sync" id="tips-for-faster-sync"></a>

* Use the machine with low latency (not throughput) disk and RAM for the faster initial sync.
* Memory optimized nodes are recommended for faster sync. For example, AWS EC2 `r5` or `r6` series instances.

## Software Prerequisites

Before we start, please note that building software from source can be complex. If you're not comfortable with technical tasks, you might want to check [Docker](https://docs.erigon.tech/erigon/v2/basic-usage/getting-started/docker) installation.

Erigon works only from command line interface (CLI), so it is advisable to have a good confidence with basic commands.

Please ensure that the following prerequisites are met by checking your operating system tab.

{% tabs %}
{% tab title="Linux" %}
Install **Build-essential**, **Cmake** and **Git**:

{% code overflow="wrap" %}

```bash
sudo apt install build-essential cmake -y
```

{% endcode %}

* #### Git <a href="#git" id="git"></a>

  Git is a tool that helps download and manage the Erigon source code. To install Git, visit:

  <https://git-scm.com/downloads>.
* **Go Programming Language**
  * Go (also called Golang) version 1.21 or newer is used to write part of Erigon.
  * It is recommended to have a new Go installation. In case you have a previous version delete the `/usr/local/go` folder (you will probably need to use`sudo`), and re-extract the new version in its place.
  * Visit <https://golang.org/doc/install> for installation instructions.
* **C++ Compiler**

  This turns the C++ part of Erigon's code into a program your computer can run. You can use either **Clang** or **GCC**.

  * For Clang follow the instructions at <https://clang.llvm.org/get_started.html>.
  * For GCC (version 10 or newer): <https://gcc.gnu.org/install/index.html>

You can now proceed with Erigon installation.

{% content-ref url="getting-started/linux-and-macos" %}
[linux-and-macos](https://docs.erigon.tech/erigon/v2/basic-usage/getting-started/linux-and-macos)
{% endcontent-ref %}
{% endtab %}

{% tab title="MacOS" %}

* **Git**

  Git is a tool that helps download and manage the Erigon source code. To install Git, visit: <https://git-scm.com/downloads>
* **Go Programming Language**
  * Go (also called **Golang**) is used to write part of Erigon.
  * It is recommended to have a new Go installation. In case you have a previous version delete the `/usr/local/go` folder (you will probably need to use`sudo`), and re-extract the new version in its place.
  * You need version 1.21 or newer. Visit <https://golang.org/doc/install> for installation instructions.
* **C++ Compiler**
  * This turns the C++ part of Erigon's code into a program your computer can run.
  * You can use either **GCC** or **Clang**:
    * For GCC (version 10 or newer): <https://gcc.gnu.org/install/index.html>
    * For Clang: <https://clang.llvm.org/get_started.html>
  * Choose one and follow its installation guide.

You can now proceed with Erigon installation.

{% content-ref url="getting-started/linux-and-macos" %}
[linux-and-macos](https://docs.erigon.tech/erigon/v2/basic-usage/getting-started/linux-and-macos)
{% endcontent-ref %}
{% endtab %}

{% tab title="Windows" %}
Check the **Windows** dedicated section.

{% content-ref url="getting-started/windows" %}
[windows](https://docs.erigon.tech/erigon/v2/basic-usage/getting-started/windows)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
