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 September 30, 2022

Start Teku

You can run Teku as a beacon node and validator in a single process, or as separate processes.

We recommend you run the beacon node and validator as a single process if they are to run on the same machine.

Note

By default, Teku connects to mainnet. Use the --network command line option to specify an alternate network.

Start the clients in a single process

Start the beacon node and validator as a single process by specifying the validator options using the teku command.

Example

teku \
--ee-endpoint=http://localhost:8551                       \
--ee-jwt-secret-file=jwtsecret.hex                        \
--metrics-enabled=true                                    \
--rest-api-enabled=true                                   \
--validators-proposer-default-fee-recipient=0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73 \


Use the --validator-keys option to specify the directories or files to load the encrypted keystore file(s) and associated password file(s) from.

Run the clients separately

Validators must connect to a beacon node to publish attestations or propose blocks. The beacon node requires internet access, but the connected validators can run on machines without internet access.

Start the beacon node

Run Teku as a beacon node.

Example

teku \
--ee-endpoint=http://localhost:8551 \
--ee-jwt-secret-file=jwtsecret.hex  \
--metrics-enabled=true              \
--rest-api-enabled=true


Specify --rest-api-enabled to allow validators to connect to the beacon node.

Warning

Don’t pass the validator keys as a command line option to both the beacon node and validator client. This can cause a slashable offense.

By default, validator clients can connect to the beacon node at http://127.0.0.1:5051. Use the --rest-api-interface and --rest-api-port options to update the address.

You can specify --rest-api-host-allowlist to allow access to the REST API from specific hostnames.

Start the validator

To run a validator, connect to a running beacon node.

Use the validator-client or vc subcommand to run a Teku as a validator.

Example

teku validator-client \
--beacon-node-api-endpoint=http://192.10.10.101:5051,http://192.140.110.44:5051 \


Warning

Ensure that the validator keys are only provided to the validator. Don’t pass the validator keys as command line options to both the beacon node and validator client. This can a cause a slashable offense.

Specify one or more beacon nodes using the --beacon-node-api-endpoint option.

Important

You can supply multiple beacon node endpoints to the validator. The first one is used as the primary node, and others as failovers.

Confirm Teku is running

Use the /liveness endpoint to check whether the node is up.

The endpoint returns the status 200 OK if the node is up or syncing.

Example

curl -I -X GET "http://192.10.10.101:5051/teku/v1/admin/liveness"

HTTP/1.1 200 OK
Date: Fri, 05 Feb 2021 03:58:30 GMT
Server: Javalin
Content-Type: application/json
Cache-Control: max-age=0
Content-Length: 0

Questions or feedback? You can discuss issues and obtain free support on Teku Discord channel.