Installation
The V3 Operator Service can be installed in several ways: as a binary, via Docker, deployed on Kubernetes with the Operator Helm Chart, or built from source. Choose your preferred method and follow the instructions below.
- Binary
- Docker Image
- Source Files
- Kubernetes (Advanced)
Binary Installation
Download
- Go to the releases page ↗ and find the latest version
- Select the binary file for your node's hardware
- Download and decompress the file
- Run commands from inside the
v3-operator
folder:
./operator COMMAND --flagA=123 --flagB=xyz
Optional Flags
The use of flags is optional.
Install Script (Linux and macOS)
To install the latest release, run:
curl -sSfL https://raw.githubusercontent.com/stakewise/v3-operator/master/scripts/install.sh | sh -s
The binary will be placed in ~/bin
. Add it to your PATH:
export PATH=$PATH:~/bin
To install a specific version to a custom location:
curl -sSfL https://raw.githubusercontent.com/stakewise/v3-operator/master/scripts/install.sh | sh -s -- -b <custom_location> vX.X.X
Run commands with:
operator COMMAND --flagA=123 --flagB=xyz
Docker Installation
Pull Official Image
docker pull europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v3.1.5
Build From Source
Alternatively, build the Docker image locally:
git clone https://github.com/stakewise/v3-operator.git
cd v3-operator
docker build --pull -t europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v3.1.5 .
Run Commands
Data Directory Required
When running the Operator Service through Docker, it is crucial to use the --data-dir
flag in all calls. This flag provides a directory path where essential data for the Operator Service is read from or written to, allowing for persistent data storage across Docker container instances.
docker run --rm -ti \
-u $(id -u):$(id -g) \
-v ~/.stakewise/:/data \
europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v3.1.5 \
src/main.py COMMAND \
--data-dir=/data \
--flagA=123 \
--flagB=xyz
Optional Flags
The use of additional flags is optional.
Source Installation
Requirements
Setup
Clone the repository and install dependencies:
git clone https://github.com/stakewise/v3-operator.git
cd v3-operator
poetry install --only main
Run Commands
Run commands from within the v3-operator
folder using the below format:
PYTHONPATH=. poetry run python src/main.py COMMAND --flagA=123 --flagB=xyz
Optional Flags
The use of flags is optional.
Kubernetes Installation
A dedicated guide is available for running Operator Service on Kubernetes, designed for large-scale validator deployments (up to 10,000 validators). Visit the Kubernetes setup → for more details.
Configuration Options
Environment Variables
The V3 Operator Service can be configured via environment variables instead of CLI flags. This approach is particularly useful for containerized deployments.
Environment Configuration
- Copy the example file ↗ and save it as
.env
- Adjust the configuration based on your node setup
- Load the environment variables before running the Operator Service:
export $(grep -v '^#' .env | xargs)
Verify variables are loaded correctly by running env
.
Performance Optimization
CPU Load Management
Use the --pool-size
flag with both start
and create-keys
commands to control CPU usage:
- Default: Uses 100% of available CPU cores
- Recommended: Set to
(number of CPU cores) / 2
to avoid impacting node performance - Example:
--pool-size=4
for an 8-core system
./operator start --pool-size=4 --vault=0x000...
Gas Fee Management
Gas Cost Control
To mitigate excessive gas costs, use the --max-fee-per-gas-wei
flag when starting the Operator Service:
./operator start --max-fee-per-gas-wei=50000000000 --vault=0x000...
This sets the maximum base fee you're willing to pay for validator registrations and vault harvests.
Verification
After installation, verify your setup by running the version command:
- Binary
- Docker
- Source
./operator --version
docker run --rm europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v3.1.5 src/main.py --version
PYTHONPATH=. poetry run python src/main.py --version
Troubleshooting
Common Issues
Permission Issues
If you encounter permission errors:
- Ensure the binary is executable:
chmod +x ./operator
- For Docker: Verify user ID mapping with
-u $(id -u):$(id -g)
- For source installs: Check Python and Poetry permissions
Network Connectivity
If the installation fails to download dependencies:
- Check firewall and proxy settings
- Verify internet connectivity to GitHub and package repositories
- For Docker: Ensure Docker daemon is running and has internet access
Support
For installation issues:
- Check the GitHub Issues ↗
- Review the troubleshooting documentation
- Contact the StakeWise team via Discord or Telegram
Installation complete! Next, proceed with Key Cration →.