Skip to main content

Quickstart

This guide gets a full Ethereum node running on one machine: an execution client, a Prysm beacon node, and, optionally, a Prysm validator client. Pick your setup below and every command on the page updates to match it.

Your setup

Operating system
Network
Execution client
Engine API connection
What you want to run
Initial sync
  1. Install Prysm

    Everything goes into an ethereum folder in your home directory, on your SSD. The programs live in consensus and execution, and everything the clients store goes into ethereum/data, one folder per network. The commands below use this layout:

    ethereum/
    ├── consensus/
    ├── execution/
    └── data/
        └── mainnet/
            ├── execution/
            └── beacon/

    Create the folders, then download the Prysm launcher script into consensus:

    mkdir -p $HOME/ethereum
    cd $HOME/ethereum
    
    mkdir -p \
      consensus \
      execution \
      data/mainnet/execution \
      data/mainnet/beacon
    
    cd consensus
    curl https://raw.githubusercontent.com/OffchainLabs/prysm/master/prysm.sh --output prysm.sh && chmod +x prysm.sh

    prysm.sh downloads the latest release binaries on first run and verifies their checksums and signatures. Pin a release with USE_PRYSM_VERSION.

  2. Create a JWT secret

    The beacon node and execution client authenticate each other with a shared secret. Generate it from the consensus folder into ethereum/data, where both clients read it:

    ./prysm.sh beacon-chain generate-auth-secret --output-file=$HOME/ethereum/data/jwt.hex
  3. Start your execution client

    Install Besu into your execution folder, then start it from there:

    ./besu \
      --network=mainnet \
      --data-path=$HOME/ethereum/data/mainnet/execution \
      --engine-jwt-secret=$HOME/ethereum/data/jwt.hex

    The execution client waits for a beacon node before it starts syncing, so don't worry if it looks idle. Leave it running in its own terminal.

  4. Start your beacon node

    From the consensus folder, start the beacon node. The first run asks you to accept the terms of use.

    ./prysm.sh beacon-chain \
      --mainnet \
      --datadir=$HOME/ethereum/data/mainnet/beacon \
      --jwt-secret=$HOME/ethereum/data/jwt.hex \
      --checkpoint-sync-url=https://sync-mainnet.beaconcha.in \
      --beacon-db-pruning

    Checkpoint sync fetches a recent finalized state, so the node follows the chain within minutes. By default, the beacon node doesn't backfill blocks older than the checkpoint; if you need them, add --enable-backfill.

    https://sync-mainnet.beaconcha.in is one of several community endpoints; any one you trust works.

    --beacon-db-pruning deletes blocks and states older than about 5 months, the oldest data other nodes can still ask for, so the database stops growing. Leave it out if you need the full history.

    Check progress with curl http://localhost:3500/eth/v1/node/syncing.

Check that it works

Leave both programs running and open a new terminal. Ask the beacon node whether it has caught up:

curl -s http://localhost:3500/eth/v1/node/syncing
curl -s http://localhost:3500/eth/v1/node/peer_count

Your node is ready when the first command shows all three of these:

  • "is_syncing":false: the beacon node has caught up with the chain.
  • "is_optimistic":false: the execution client has caught up too. It stays true while the execution client is still syncing, which can take hours.
  • "el_offline":false: the beacon node can reach the execution client.

The second command should show a connected count that grows over the first minutes. Tens of peers is normal; Prysm aims for up to 70.

In the beacon node's terminal, a synced node logs one line per block, about every 12 seconds:

INFO blockchain: Synced new block block=0x5b7dd003... epoch=385801 finalizedEpoch=385799 finalizedRoot=0xcdeff59f... sinceSlotStartTime=1.9s slot=12345650

Every minute it also logs Connected peers with the current total. If you see few peers, open your P2P ports: 13000 (TCP and UDP) and 12000 (UDP).