Skip to main content

Start Operator

You are ready to run the Operator Service using the start command, passing your Vault address and consensus and execution endpoints as flags.

Prerequisites

If you did not use Operator Service to generate validator keys, you will need to add the following flag:

  • --keystores-dir - The directory with validator keys in the EIP-2335 ↗ standard. The folder must contain either a single password.txt password file for all keystores or separate password files for each keystore with the same name as keystore, but ending with .txt (e.g., keystore1.json, keystore1.txt)

If you did not use Operator Service to generate the hot wallet, you will need to add the following flags:

  • --hot-wallet-file - Path to the password-protected .txt file containing your hot wallet private key
  • --hot-wallet-password-file - Path to a .txt file containing the password to open the protected hot wallet private key file

If you did not use Operator Service to generate deposit data file, or you use combined deposit data file from multiple operators, you will need to add the following flag:

  • --deposit-data-file - Path to the deposit data file (Vault directory is default)

There are several ways to run the Operator Service, depending on how you store private keys.

Running Options

Depending on your installation method, use the appropriate command format:

Using Binary

./operator start \
--vault=0xf27...10ad9 \
--consensus-endpoints=https://consensus-node \
--execution-endpoints=https://execution-node
IconSetup Complete

Congratulations 🎉! Your Operator Service is now running and ready to trigger validator registrations within your Vault. Monitor the logs to ensure validators are being registered successfully.

Optional Flags

FlagDescription
--min-validators-registrationMinimum number of validators required to start registration
--pool-sizeNumber of processes in a pool
--log-levelThe log level. Options: fatal, error, warning, info, debug
--log-formatThe log record format. Options: plain or json
--hashi-vault-parallelismHow many requests to K/V secrets engine to do in parallel
--hashi-vault-key-prefixKey prefix(es) in the K/V secret engine under which validator signing keys are stored
--hashi-vault-key-pathKey path(s) in the K/V secret engine where validator signing keys are stored
--hashi-vault-tokenAuthentication token for accessing HashiCorp Vault
--hashi-vault-urlThe base URL of the vault service (e.g., http://vault:8200)
--remote-signer-urlThe base URL of the remote signer (e.g., http://signer:9000)
--vaultAddress of the Vault to register validators for
--consensus-endpointsComma separated list of API endpoints for consensus nodes
--execution-jwt-secretJWT secret key used for signing and verifying JSON Web Tokens when connecting to execution nodes
--execution-endpointsComma separated list of API endpoints for execution nodes
--harvest-vaultWhether to submit vault harvest transactions. Default: false
-v, --verboseEnable debug mode. Default: false
--metrics-portThe Prometheus metrics port. Default: 9100
--metrics-prefixThe Prometheus metrics prefix. Default: sw_operator
--metrics-hostThe Prometheus metrics host. Default: 127.0.0.1
--enable-metricsWhether to enable metrics server. Default: disabled
--networkThe network of the Vault. Options: mainnet, hoodi, gnosis, chiado. Default: network specified at init command
--deposit-data-filePath to the deposit_data.json file. Default: file generated with create-keys command
--keystores-dirAbsolute path to the directory with all the encrypted keystores. Default: directory generated with create-keys command
--keystores-password-fileAbsolute path to the password file for decrypting keystores. Default: file generated with create-keys command
--hot-wallet-fileAbsolute path to the hot wallet. Default: file generated with create-wallet command
--hot-wallet-password-fileAbsolute path to the hot wallet password file. Default: file generated with create-wallet command
--max-fee-per-gas-gweiMaximum fee per gas for transactions. Default: 10 Gwei for Ethereum, 2 Gwei for Gnosis
--database-dirThe directory where the database will be created or read from. Default: ~/.stakewise/<vault>
--data-dirPath where the vault data will be placed. Default: ~/.stakewise
IconReduce CPU Load

The --pool-size flag can be passed with both start and create-keys commands. This flag defines the number of CPU cores used to load and create keystores. By default, Operator Service will use 100% of the CPU cores. Setting --pool-size to (number of CPU cores) / 2 is a safe way to ensure that Operator Service does not take up too much CPU load and impact node performance during the creation and loading of keystores.

IconEnvironment Variables

Operator Service can be configured via environment variables instead of CLI flags. Copy this example file ↗ and save it as .env. Adjust as necessary based on your node configuration.

Load environment variables before running Operator Service:

export $(grep -v '^#' .env | xargs)

You can check the environment variables are set and loaded correctly by running env.

Next Steps

Continue to Additional Actions → to explore optional configurations and integrations to enhance your Operator Service setup, including validator performance tracking with Rated Network.