Skip to content

Deploy a Ethereum Node in your macbook ​

Prerequisite Hardware πŸ’» ​

To run a blockchain node, your laptop needs to meet certain hardware requirements:

  • Processor: A multi-core processor like an Intel i5 or Apple M1/M2 is sufficient for lightweight nodes.
  • Memory (RAM): At least 8GB, though 16GB is ideal for better performance.
  • Storage: Blockchain nodes require significant storage. For example:
    • Bitcoin: ~500GB+
    • Ethereum: ~1TB+ Use an external SSD if your internal storage is limited.
  • Internet Connection: A stable connection with no data caps is crucial, as nodes regularly sync data.

Run a Blockchain Node on Your MacBook πŸ› οΈ ​

Here’s a step-by-step guide to running an Ethereum node (as an example):

  1. Install Homebrew

Homebrew is a package manager for macOS. Open your terminal and install it:

bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install Ethereum client
bash
brew install erigon
  1. Start the ethereum node

The following command will launch the ethereum blockchain node and will save the data in data directory.

bash
erigon --internalcl --prune=hrtc --datadir=data --http.addr="0.0.0.0" --http.api=eth,web3,net,debug,trace,txpool
  1. Interact with the node when it is ready
bash
curl -X POST http://localhost:8545 -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Et voila, that's it! Welcome to the world of decentralized finance!

Released under the MIT License.