Cross-platform setup script for running Klever blockchain nodes locally. Works on Linux, macOS, and Windows.
- Docker Desktop (version 20.10+)
- Linux: Install Docker Engine
- macOS: Docker Desktop for Mac
- Windows: Docker Desktop for Windows
- Python 3.7+ (for configuration generation scripts)
- Verify:
python --versionorpython3 --version
- Verify:
Maybe you need to give permissions to dbs/ logs/ and keys/ to the nodes have permissions after setup localnet.
chmod -R 777 dbs/* keys/* logs/*The easiest way to get started:
# Linux/macOS
python3 setup.py setup-all
# Windows
python setup.py setup-allThis automatically:
- ✓ Checks all requirements
- ✓ Generates validator and wallet keys
- ✓ Creates necessary directories
- ✓ Generates configuration files
after execution of setup-all you can run your localnet
# Linux/macOS
python3 setup.py start
# Windows
python setup.py start# Setup with 3 validators
python setup.py setup-all -n 3
# Setup with custom max supply
python setup.py setup-all -n 5 -s 10000000000000000# Check container status
python setup.py status
# View logs (CTRL+C to exit)
python setup.py logs
# View logs of specific node
docker logs -f node-0# Complete automated setup
python setup.py setup-all
# Individual steps
python setup.py check-requirements # Verify dependencies
python setup.py generate-keys -n 3 # Generate keys for 3 validators
python setup.py generate-dirs -n 3 # Create directories
python setup.py create-localnet -n 3 # Generate configs# Start containers
python setup.py start
# Stop containers
python setup.py down
# Restart containers
python setup.py restart
# Check status
python setup.py status
# View logs
python setup.py logs
# View logs without following
python setup.py logs --no-follow# Remove generated configs only
python setup.py clean
# Remove EVERYTHING (keys, dbs, logs, configs) - DESTRUCTIVE!
python setup.py clean-all# Show all commands and options
python setup.py -hTo completely reset the blockchain state:
# Clean everything and start fresh
python setup.py clean-all
python setup.py setup-allYou can modify generated files before starting:
# Generate everything but don't start
python setup.py generate-keys -n 3
python setup.py generate-dirs -n 3
python setup.py create-localnet -n 3
# Modify configs/genesis.json or docker-compose.yaml as needed
# Edit configs/nodesSetup.json to change startTime if needed
# Then start
python setup.py startfast-node-setup/
├── keys/ # Generated validator and wallet keys
│ ├── node-0/
│ │ ├── validatorKey.pem
│ │ └── walletKey.pem
│ ├── node-1/
│ └── ...
├── dbs/ # Blockchain databases
│ ├── node-0/
│ ├── node-1/
│ └── ...
├── logs/ # Node logs
│ ├── node-0/
│ ├── node-1/
│ └── ...
├── configs/ # Generated configuration files
│ ├── genesis.json
│ ├── nodesSetup.json
│ └── ...
├── scripts/ # Helper scripts
├── docker-compose.yaml # Generated Docker Compose file
├── setup.py # Cross-platform setup script
└── readme.md