Skip to main content

Run a Node and Stake ETH using Prysm

Prysm v2.1.3-rc.5

This quickstart will be published alongside Prysm v2.1.3-rc.5. Please refer to the current Quickstart for the latest recommended guidance, which includes instructions for v2.1.3-rc.4. Join our Discord server to share your feedback.

Prysm is an implementation of the Ethereum proof-of-stake consensus specification [1]. In this quickstart, you’ll use Prysm to run an Ethereum node [2] and optionally a validator [3]. This will let you stake 32 ETH using hardware that you manage [4].

This is a beginner-friendly guide. Familiarity with the command line is expected, but otherwise this guide makes no assumptions about your technical skills or prior knowledge. Beginners are encouraged to follow the footnotes throughout this guide [5].

At a high level, we'll walk through the following flow:

  1. Configure an execution node using an execution-layer client.
  2. Configure a beacon node using Prysm, a consensus-layer client.
  3. Configure a validator and stake ETH using Prysm (optional).


Knowledge Check

Not familiar with nodes, networks, and related terminology? Consider reading Nodes and networks before proceeding.

Step 1: Review prerequisites#

Node typeBenefitsRequirements
Execution + beacon
  • Contributes to the security of Ethereum's ecosystem [4].
  • Lets you access the Ethereum network directly without having to trust a third party service [7].
  • Lets you run a validator post-Merge [6].
  • Software: Execution client, beacon node client (instructions for clients below), curl
  • OS: 64-bit Linux, Mac OS X 10.14+, Windows 10+ 64-bit
  • CPU: Something relatively modern. Intel Core i5-760 is a good min-bar.
  • Memory: 16GB+ RAM
  • Storage: SSD with at least 2TB free space
  • Network: 8 MBit/sec broadband
ValidatorLets you stake ETH, propose + validate blocks, and earn staking rewards + transaction fees.
  • Everything above, plus...
  • Software: Validator client, browser-based crypto wallet (instructions below)
  • Hardware: (Recommended) A new machine that has never been connected to the internet that you can use to securely generate your mnemonic phrase and keypair
  • 32 ETH (Mainnet)
  • 32 GöETH / rETH (Testnets - instructions for acquiring testnet ETH are provided below)

Other options
Don't have 32 ETH? Pooled staking lets you stake with less than 32 ETH. Can't run a node? Staking as a service lets you delegate hardware management to a third party.

Step 2: Review best practices#

Step 3: Create directories, generate secret#

First, create a folder called ethereum on your SSD [9], and then two subfolders within it: consensus and execution:

📂ethereum┣ 📂consensus┣ 📂execution
Ropsten/Sepolia HTTP only

Ropsten and Sepolia are the only networks that currently require JWT-authenticated HTTP. You can skip the rest of this step if you're running on Goerli-Prater or Mainnet. Note that these networks will soon require JWT. You can also skip the rest of this step if you're connecting your beacon node to your execution node over IPC instead of HTTP (this quickstart uses HTTP).

A secret JWT token will allow your beacon node to form an authenticated HTTP connection with your execution node. Let's download Prysm and create the JWT token.

Mac M1 ARM chips currently require users to run Prysm through Rosetta. See our open bug for details.

Navigate to your consensus directory and run the following two commands:

mkdir prysm && cd prysmcurl https://raw.githubusercontent.com/prysmaticlabs/prysm/v2.1.3-rc.5/prysm.sh --output prysm.sh && chmod +x prysm.sh

This will download the Prysm client and make it executable. Tell Prysm to use the release candidate by setting a new environment variable as follows: USE_PRYSM_VERSION=v2.1.3-rc.5. Use the following command to create your secret JWT token:

./prysm.sh beacon-chain jwt generate-jwt-secret

Prysm will then output a jwt.hex file path. Record this - we'll use it in the next step.

Step 4: Run an execution client#

In this step, you'll install an execution-layer client that Prysm's beacon node will connect to [2].

Download the latest stable release of Nethermind for your operating system from the Nethermind downloads page. Extract the contents into your execution folder. Run the following command to start your execution node using your secret JWT file:

Nethermind.Runner --config mainnet --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true

See Nethermind's command-line options for parameter definitions.

Your Nethermind execution node will begin syncing. This can take a long time - from hours to days. You can check your Nethermind execution node's sync status by navigating to http://localhost:8545/healthchecks-ui or by running the following command from a separate terminal window:

curl localhost:8545/health 

A sync status of false indicates that your node is fully synced. You can proceed to the next step while Nethermind syncs.

Congratulations - you’re now running an execution node in Ethereum’s execution layer.

Step 5: Run a beacon node using Prysm#

In this step, you'll run a beacon node using Prysm. First, navigate to your consensus directory.

Use the following command to start a beacon node that connects to your local execution node:

./prysm.sh beacon-chain --http-web3provider=http://localhost:8545 --mainnet --suggested-fee-recipient=0x01234567722E6b0000012BFEBf6177F1D2e9758D9

Be sure to replace the --suggested-fee-recipient wallet address with a real address. Your beacon node will now begin syncing. This usually takes a couple days, but it can take longer depending on your network and hardware specs.

You can check your beacon node's sync status by running the following command from a separate terminal window:

curl http://localhost:3500/eth/v1/node/syncing

This should produce the following output:

{"data":{"head_slot":"6944","sync_distance":"3003133","is_syncing":true,"is_optimistic":true}}

When you see "is_syncing":false, your beacon node is fully synchronized. When you see "is_optimistic":false, your execution node is fully synchronized. Note that only Prysm v2.1.3-rc.4+ displays is_optimistic.

You can verify that your beacon node has successfully connected to your execution node by running the following command from a separate terminal window:

curl http://localhost:3500/eth/v1alpha1/node/eth1/connections

Congratulations - you’re now running a full Ethereum node. Your full node consists of an execution node in Ethereum’s execution layer, and a beacon node in Ethereum’s consensus layer.

Step 6: Run a validator node using Prysm#

ETH Required

Running a validator requires 32.1 ETH (for Mainnet) or 32.1 GöETH / rETH / SepplETH (for Testnets). Instructions for acquiring testnet ETH are provided below.

Next, we'll create your validator keys with the Ethereum Staking Deposit CLI. Before proceeding, we recommend temporarily moving over to a new machine that has never been connected to the internet if possible. This will reduce the risk that your validator private key is exposed to an adversary. We'll carry an encrypted version of your private key to your primary machine after creating your keys on this "airgapped" machine.

Download the latest stable version of the deposit CLI from the Staking Deposit CLI Releases page.

Run the following command to create your mnemonic phrase and keys:

./deposit new-mnemonic --num_validators=1 --mnemonic_language=english

Follow the CLI prompts to generate your keys. This will give you the following artifacts:

  1. A new mnemonic seed phrase. This is highly sensitive and should never be exposed to other people or networked hardware.
  2. A validator_keys folder. This folder will contain two files:
    1. deposit_data-*.json - contains deposit data that you’ll later upload to the Ethereum launchpad.
    2. keystore-m_*.json - contains your public key and encrypted private key [13].
Copy the validator_keys folder to your primary machine's consensus folder. Run the following command to import your keystores, replacing <YOUR_FOLDER_PATH> with the full path to your consensus/validator_keys folder:
./prysm.sh validator accounts import --keys-dir=<YOUR_FOLDER_PATH>

You’ll be prompted to specify a wallet directory twice. Provide the path to your consensus folder for both prompts. You should see Successfully imported 1 accounts, view all of them by running accounts list when your account has been successfully imported into Prysm.

Next, go to the Mainnet Launchpad’s deposit data upload page and upload your deposit_data-*.json file. You’ll be prompted to connect your wallet.

You can then deposit 32 ETH into the Mainnet deposit contract via the Launchpad page. Exercise extreme caution throughout this procedure. Finally, run the following command to start your validator node, replacing <YOUR_FOLDER_PATH> with the full path to your consensus folder:

./prysm.sh validator --wallet-dir=<YOUR_FOLDER_PATH>

Congratulations!

You’re now running a full Ethereum node and a validator node.


It can a long time (from days to months) for your validator to become fully activated. To learn more about the validator activation process, see Deposit Process. You can paste your validator's public key (available in your deposit_data-*.json file) into a blockchain explorer to check the status of your validator:

In the meantime, you should leave your execution client, beacon node, and validator client terminal windows open and running. Once your validator is activated, it will automatically begin proposing and validating blocks.


Frequently asked questions#

Why do you recommend putting everything on a single machine?
Keeping all of your client software on a single machine keeps things simple, which aligns with our security best practices.

Do I need to configure my firewall?
We recommend closing TCP port 8545 to the internet and keeping TCP and UDP ports 30303 open to support other execution nodes [8].

Can you mix and match networks between execution layer and consensus layer?
The network pairs marked with a ✔️ are compatible. See Nodes and networks for more information.

 EL-MainnetEL-GoerliEL-SepoliaEL-Ropsten
CL-Mainnet✔️❌❌❌
CL-Prater❌✔️❌❌
CL-Sepolia❌❌✔️❌
CL-Ropsten❌❌❌✔️

Can I use an external SSD connected via USB?
Yes, but your USB connection introduces a possible point of failure. If you do this, avoid connecting your SSD to your computer through a USB hub - instead, connect it directly.

Can I use a light client as my local execution client so I don't have to download so much data?
No, a full execution node is needed.

Why do I need to run my own execution client?
The Merge introduces a new Engine API that allows consensus-layer clients to communicate with execution-layer clients. Teku docs contain a great explainer here: The Merge.

What happens if my execution client goes down? Will I be penalized?
Yes. Downtime penalties are minimal [14] but we recommend having uptime and downtime alerts configured for your execution, beacon, and validator nodes if possible.

My beacon node is taking a long time to sync. Is there any way I can speed it up?
Yes - you can use checkpoint sync to start your beacon node's synchronization from a checkpoint rather than from genesis. This is actually a more secure way to run your beacon node.

My attestations are working, but proposals aren’t. Why not?
This is usually an indication that your validator isn't able to communicate with your beacon node, or your beacon node isn't able to connect to your execution node.

How long does it take for my validator node to be selected to propose a new block?
At the time of this writing, a ballpark estimate is around a week. Every 12 seconds a new block is proposed, and your validator has a one in [total number of active validators] chance of being chosen, so this duration can vary significantly from one validator node to the next.


Footnotes:

1. Prysm is written entirely in the Go programming language. It's under active development by Prysmatic Labs, a grant-funded team working closely with a variety of groups across the Ethereum ecosystem including the Ethereum Foundation.
2. In Prysm docs, a full Ethereum node refers to a node that's running both an execution-layer execution client (like Nethermind, Besu, or Geth) and a consensus-layer beacon node client (like Prysm, Lighthouse, or Nimbus). Execution clients process transactions, while beacon node clients manage the Beacon Chain. Validators use another piece of software - a validator client - that requires both execution client and beacon node client software. Although we provide execution-layer guidance for your convenience, this guidance is not an official endorsement or recommendation.
3. A validator node is a particular type of Ethereum node that runs Ethereum's proof-of-stake consensus protocol. Validator client software like Prysm allows you to stake 32 ETH as collateral in an agreement with the Ethereum network to honestly propose and attest to blocks. Running a validator node makes you a validator. Post-merge, validators will replace miners, and proof-of-stake will replace proof-of-work.
4. "Staking at home" with your own hardware reduces our dependency on centralized cloud providers and increases the decentralization and security of the Ethereum ecosystem. Staking at home is a serious responsibility that comes with serious risks. Read our Security Best Practices to learn how to minimize those risks.
5. Understanding how things work can help you minimize risk and troubleshoot issues. Staking at home may one day be point-and-click. But until then, you should understand the major components, their relationships with each other, and their responsibilities over time. This understanding is currently a prerequisite to staking with Prysm, and it's why we identify continuous self-education as a security best practice.
6. See Nodes and Clients: Why should I run an Ethereum node? for a more detailed exploration of node-running benefits.
7. Self-sufficient participation in Ethereum aligns with the ecosystem's "don't trust, verify" mantra. Running your own node removes the need to trust another node operator, and allows you to directly verify the authenticity of blockchain data.
8. Keeping TCP port 30303 open is the Ethereum equivalent of seeding torrent data to peers. This will allow other execution nodes to fetch data from your node, and is a great way to support Ethereum's decentralization. Consult the documentation for your firewall, operating system, and/or device for port configuration instructions.
9. Throughout this guide, we use ethereum, consensus and execution as directory names that reflect the logical separation between client software components. Feel free to use your own directory names.
10. Post-merge, you'll need to run an execution client locally if you want to run a beacon node or validator node. Geth is currently the supermajority execution client, so we encourage you to use an alternative like Nethermind or Besu. See Applying the "Five Why's" to the Client Diversity Problem to learn more.
11. This guide uses a basic, default configuration for all execution clients, which should work well for most people. If you'd like to customize your configuration, detailed guidance is available for each client: Nethermind, Besu, Geth.
12. Your execution client needs to download the entire blockchain - every block that's been produced after the genesis block.
13. Your keystore file contains your public key and your private key encrypted with a password. To learn more about how keystores work, see What is an Ethereum keystore.
14. BitMex recently posted research that provides hard numbers on penalties and rewards: Ethereum's Proof of Stake System - Calculating Penalties and Rewards. Collin Myers has also created an Ethereum calculator.