Basic Usage
Command Line Usage and Basic Erigon Configuration
Erigon is mainly operated through the command line. The commands may vary based on your installation method.
Open your terminal and simply start Erigon with the command:
erigon [options]You can use Docker Compose like in this example
Alternatively you can use the Docker syntax, for example:
docker run -it erigontech/erigon:v3.2.2 [options]
Open your terminal and move to the directory where you installed Erigon
cd erigonYou can then start Erigon with the below command:
./build/bin/erigon [options]To run Erigon after a native compilation, enter the following command in your Command Prompt or PowerShell:
erigon.exe [options]Note: When you first start Erigon, Windows Firewall may prompt you to allow internet access. Select "YES" to proceed.
To gracefully stop Erigon simply press CTRL + C.
All-in-One Client
The all-in-one client is the preferred option for most users:
./build/bin/erigon [options]This CLI command allows you to run an Ethereum full node where every process is integrated and no special configuration is needed.
The default Consensus Layer utilized is Caplin, the Erigon flagship embedded CL.
Example of configuration
To run Erigon with RPCDaemon, TxPool, and other components in a single process is the simplest way to get started. For better performance and load management, you might consider distributing these components across multiple machines.
./build/bin/erigon --datadir=/desired/path/to/datadir \
--chain=mainnet \
--port=30304 \
--http.port=8546 \
--torrent.port=42068 \
--private.api.addr=127.0.0.1:9091 \
--http \
--ws \
--http.api=eth,debug,net,trace,web3,erigon \
--log.dir.path=/desired/path/to/logs
--torrent.download.rate=512mbFlags of Interest
Default data directory is
/home/usr/.local/share/erigon. If you want to store Erigon files in a non-default location, use the flag:The
--chain=mainnetflag is set by default for Erigon to sync with the Ethereum mainnet. To explore other network options, check the Supported Networks section. For quick testing, consider selecting a testnet.--log.dir.pathdictates where logs will be output - useful for sending reports to the Erigon team when issues occur.Based on the sync mode you want to run you can add
--prune.mode=archiveto run a archive node,--prune.mode=fullfor a full node (default value) or--prune.mode=minimalfor a minimal node.--http.addr="0.0.0.0" --http.api=eth,web3,net,debug,trace,txpoolto use RPC Service and e.g. be able to connect your wallet.--torrent.download.rate=512mbto increase download speed. While the default downloading speed is 128mb, with this flag Erigon will use as much download speed as it can, up to a maximum of 512 megabytes per second. This means it will try to download data as quickly as possible, but it won't exceed the 512 MB/s limit you've set.
To stop the Erigon node you can use the CTRL+C command.
Additional flags can be added to configure the node with several options.
CLI ReferenceHelp
To learn about the available commands, open your terminal in your Erigon 3 installation directory and run:
This command will display a list of convenience commands available in the Makefile, along with their descriptions.
For example, from your Erigon 3 installation directory, run:
This will execute the clean target in the Makefile, which cleans the go cache, build directory, and libmdbx db directory.
Last updated
Was this helpful?