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 flags — see Keystore & Wallet below.
Choose the format matching your installation method:
- Binary
- Docker
- Source Files
./operator start \
--vault=0xf27...10ad9 \
--consensus-endpoints=https://consensus-node \
--execution-endpoints=https://execution-node
For Docker, mount the folder containing validator keystores and include the --data-dir flag:
docker run --restart on-failure:10 \
-u $(id -u):$(id -g) \
-v ~/.stakewise/:/data \
europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v3.1.10 \
src/main.py start-local \
--vault=0xf27...10ad9 \
--data-dir=/data \
--consensus-endpoints=http://localhost:5052 \
--execution-endpoints=http://localhost:8545
PYTHONPATH=. poetry run python src/main.py start-local \
--vault=0xf27...10ad9 \
--consensus-endpoints=http://localhost:5052 \
--execution-endpoints=http://localhost:8545
Setup 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
General
| Flag | Description |
|---|---|
--network | Network of the Vault: mainnet, hoodi, or gnosis. Default: network specified at init command |
--data-dir | Path where the Vault data will be placed. Default: ~/.stakewise |
--database-dir | Directory where the database will be created or read from. Default: ~/.stakewise/<vault> |
--execution-jwt-secret | JWT secret key used for signing and verifying JSON Web Tokens when connecting to execution nodes |
Keystore & Wallet
Only needed if you didn't use the Operator Service to generate keys and hot wallet.
| Flag | Description |
|---|---|
--keystores-dir | Directory 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-file | Path to the password file for decrypting keystores |
--hot-wallet-file | Path to the password-protected hot wallet private key file |
--hot-wallet-password-file | Path to the hot wallet password file |
--deposit-data-file | Path to deposit_data.json. Default: file generated with create-keys command |
Automation
Enable this flag to automate Vault state updates:
| Flag | Description |
|---|---|
--harvest-vault | Keeps 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.) |
Gas & Performance
Control transaction costs and resource usage:
| Flag | Description |
|---|---|
--max-fee-per-gas-gwei | Maximum gas fee per transaction. Default: 10 Gwei (Ethereum), 2 Gwei (Gnosis) |
--min-validators-registration | Minimum number of validators required to start registration |
--pool-size | Number of CPU cores used to load and create keystores. Default: all cores. For optimal performance, set to half your CPU cores to prevent overloading |
Logging
Configure log output and Prometheus metrics:
| Flag | Description |
|---|---|
--verbose | Enable debug mode, prints full output on error |
--log-level | Set logging level: fatal, error, warning, info, debug |
--log-format | Log record format: plain or json |
--enable-metrics | Enable Prometheus metrics server |
--metrics-host | Prometheus metrics host. Default: 127.0.0.1 |
--metrics-port | Prometheus metrics port. Default: 9100 |
--metrics-prefix | Prometheus metrics prefix. Default: sw_operator |
Environment 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)