Skip to main content

Start Operator

Run the Operator Service using the start command with your Vault address and node endpoints. If you did not use Operator Service to generate keys or the hot wallet, you will need to provide the relevant paths via --keystores-dir, --hot-wallet-file, and --deposit-data-file flags. Choose the format matching your installation method:

./operator start \
--vault=0xf27...10ad9 \
--consensus-endpoints=https://consensus-node \
--execution-endpoints=https://execution-node
IconConfigure via Environment Variables

Instead of CLI flags, you can configure the Operator Service using environment variables. Copy this example file ↗ and save it as .env. Load them before running:

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

Optional Flags

FlagDescription
--networkNetwork of the Vault: mainnet, hoodi, or gnosis. Default: network specified at init command
--data-dirPath where the Vault data will be placed. Default: ~/.stakewise
--database-dirDirectory where the database will be created or read from. Default: ~/.stakewise/<vault>
--execution-jwt-secretJWT secret key used for signing and verifying JSON Web Tokens when connecting to execution nodes
--keystores-dirDirectory with validator keys in EIP-2335 ↗ format. Must contain a single password.txt or per-keystore password files (e.g., keystore1.json, keystore1.txt)
--keystores-password-filePath to the password file for decrypting keystores
--hot-wallet-filePath to the password-protected hot wallet private key file
--hot-wallet-password-filePath to the hot wallet password file
--deposit-data-filePath to deposit_data.json. Default: file generated with create-keys command
--harvest-vaultKeeps your Vault synced by calling updateState every 12 hours, reducing gas costs for users. The Vault state is also updated whenever users interact with it (deposits, withdrawals, etc.)
--max-fee-per-gas-gweiMaximum gas fee per transaction. Default: 10 Gwei (Ethereum), 2 Gwei (Gnosis)
--min-validators-registrationMinimum number of validators required to start registration
--pool-sizeNumber of CPU cores used to load and create keystores. Default: all cores. For optimal performance, set to half your CPU cores to prevent overloading
--verboseEnable debug mode, prints full output on error
--log-levelSet logging level: fatal, error, warning, info, debug
--log-formatLog record format: plain or json
--enable-metricsEnable Prometheus metrics server
--metrics-hostPrometheus metrics host. Default: 127.0.0.1
--metrics-portPrometheus metrics port. Default: 9100
--metrics-prefixPrometheus metrics prefix. Default: sw_operator