Skip to content
You are reading the Teku development version documentation and some features may not be available in the stable release. You can switch to the stable version using the version box at the bottom of the screen.

Updated on April 8, 2022

Connect to a testnet


This documentation has been updated in line with the name changes recommended by the Ethereum Foundation. The execution layer was previously known as “Ethereum 1.0.” The consensus layer was previously known as “Ethereum 2.0.”

The following instructions describe the process to connect Teku to a consensus layer testnet.


This example connects to the Prater testnet. If connecting to a different testnet, update the --network option in the examples accordingly.

See this guide on testing Teku and Besu on the Kiln Merge testnet.

Networks can experience stability issues and are prone to regular resets. We recommend you regularly check network and client documentation for updates.


Teku allows you run a beacon node only, or you can run the beacon node with validators on a public testnet.

Run validators on a testnet

Consensus layer validators need to access an execution client to onboard new validators. New validators make deposits on the execution layer testnet, and existing consensus layer validators must process the deposits to allow the validators to join.

Deposits are made into a deposit contract on the Goerli execution layer testnet.

The steps to run a consensus layer validator on a testnet are:

  1. If using a local execution client, sync the execution layer network containing the deposit contract.


    This step is only required if using a local execution client such as Besu. If using a cloud-based service such as Infura, proceed to fund your deposit account.

  2. Fund the execution layer deposit account.

  3. Generate the validator keys and send the deposit to the deposit contract.

  4. Create a password file for each validator key.

  5. Start Teku with the validator keys.

Sync the execution layer network

This step is only required if running your own execution client.

This example uses Besu as an execution client, but any client can be used. Configure Besu to connect to Goerli and expose the RPC-HTTP APIs.


besu --network=goerli --data-path=./goerli --rpc-http-enabled=true --rpc-http-port=8545 \
--rpc-http-api=ETH,NET,WEB3 --sync-mode=FAST --fast-sync-min-peers=2

Load the deposit account with ETH

You need an execution layer Goerli testnet account that contains the amount of Goerli ETH (plus gas) required to activate the validator. The prater testnet requires 32 Goerli ETH per validator.


You can create an account on Goerli using Metamask, and use a faucet to fund the account.

Generate the validators and send the deposits

Use the Prater Launchpad to guide you through a step-by-step process to generate your keys and send the deposits.


Remember the passwords that you used to create the validator keys, because you need it to create the validator password files.

Create a password file for each validator key

For each validator key, create a text file containing the password to decrypt the key. The password file must have the same name as the key, but use the .txt extension.


If the Launchpad creates a key named keystore-m_12381_3600_0_0_0-1596485378.json, then the password file must be named keystore-m_12381_3600_0_0_0-1596485378.txt.


The password file format follows EIP-2335 requirements (UTF-8 encoded file, unicode normalization, and control code removal).

Start the validator

Run Teku and specify the validator key files created earlier, and the text files containing the password to decrypt the validator key.


teku --network=prater --eth1-endpoint=http://localhost:8545 \
--validator-keys=validator/keys/validator_888eef.json:validator/passwords/validator_888eef.txt \
--rest-api-enabled=true --rest-api-docs-enabled=true \


If using a cloud-based service such as Infura, then set --eth1-endpoint to the supplied URL. For example,<Project_ID>.

Alternatively, use --validator-keys to specify the directory to load multiple keys and passwords from.


teku --network=prater --eth1-endpoint=http://localhost:8545 \
--validator-keys=validator/keys:validator/passwords \
--rest-api-enabled=true --rest-api-docs-enabled=true \

Once the validator is activated, view it on the Beacon Chain explorer at<validatorPublicKey>.

Run a beacon node only

You can run a Teku beacon node on a network without any validators.


teku --network=prater --metrics-enabled --rest-api-enabled --rest-api-docs-enabled

Finding help

  • The #prater channel on the Ethereum Foundation Discord. Invite link

  • The #teku channel on the ConsenSys Discord. Invite link

  • Please raise any bugs or errors on the Teku GitHub repository.

Questions or feedback? You can discuss issues and obtain free support on Teku Discord channel.
For paid professional support by Consensys, contact us at [email protected].