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 October 14, 2020

Using the Teku configuration file

To specify command line options in a file, use a YAML configuration file.

To specify the configuration file, use the --config-file option.

To override an option specified in the configuration file, either specify the same option on the command line or as an environment variable. For options specified in more than one place, the order of precedence is command line, environment variable, configuration file.

YAML specification

The configuration file must be a valid YAML file composed of key/value pairs. Each key is the corresponding command line option name without the leading dashes (--).

Values must conform to YAML specifications for strings, numbers, arrays, and booleans. Specific differences between the command line and the YAML file format are:

  • Comma-separated lists on the command line are string arrays in the YAML file.
  • Enclose all string values (including but not limited to file paths, hexadecimal numbers, URLs) in quotes.


The command line reference includes configuration file examples for each option.

Sample YAML configuration file

# network
network: "medalla"

# p2p
p2p-enabled: true
p2p-port: 9000

# validators
validator-keys: "/Users/me/node/medalla/validator/keys:/Users/me/node/medalla/validator/passwords"
validators-graffiti: "Teku validator"

# Eth 1
eth1-endpoint: "http://localhost:8545"

# metrics
metrics-enabled: true
metrics-categories: ["BEACON","LIBP2P","NETWORK"]

# database
data-path: "~/tekudata"
data-storage-mode: "archive"

# rest api
rest-api-port: 5051
rest-api-docs-enabled: true
rest-api-enabled: true

# logging
log-include-validator-duties-enabled: true
Questions or feedback? You can discuss issues and obtain free support on Teku Discord channel.
For paid professional support by Consensys, contact us at