Portal
Search…
Setting Up a Node

1. Install build tools & libraries

Clover is the easiest to be set up on Unix-based operating systems like macOS or Linux. Here is the instruction on installing Rust's toolchains. If you have already done this, please go to the Step 3.

macOS

Open the Terminal application and execute the following commands:
1
# Install Homebrew if necessary https://brew.sh/
2
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
3
4
# Make sure Homebrew is up-to-date, install openssl and cmake
5
brew update
6
brew install openssl cmake
Copied!

Ubuntu/Debian

Use a terminal shell to execute the following commands:
1
sudo apt update
2
# May prompt for location information
3
sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl
Copied!

Arch Linux

Run these commands from a terminal:
1
pacman -Syu --needed --noconfirm cmake gcc openssl-1.0 pkgconf git clang
2
export OPENSSL_LIB_DIR="/usr/lib/openssl-1.0"
3
export OPENSSL_INCLUDE_DIR="/usr/include/openssl-1.0"
Copied!

2. Install Rust toolchain

This guide uses rustup to help manage the Rust toolchain. First, install and configure rustup:
1
# Install
2
curl https://sh.rustup.rs -sSf | sh
3
# Configure
4
source ~/.cargo/env
Copied!

3. Compile the node

Let's start by cloning the master branch of the Clover repo that you can find here: https://github.com/clover-network/clover
1
git clone [email protected]:clover-network/clover.git
2
cd clover
Copied!
Once you have followed all of the steps above, it's time to build the standalone node by running:
1
./scripts/init.sh
2
cargo build --release
Copied!
The initial build will take a while, depending on your hardware. It may take 30 minutes for the build process to complete.

4. Run the Node

Then you will want to run the node in dev mode using the following command:
1
./target/release/clover --dev --rpc-cors=all --unsafe-rpc-external --unsafe-ws-external --validator --tmp -lruntime=debug
Copied!
You should see an output that looks like the following, showing that blocks are being produced:
The local standalone Clover node provides two RPC endpoints:
    HTTP: http://127.0.0.1:9933
    WS: ws://127.0.0.1:9944

Connecting Polkadot JS Apps to a Local Clover Node

The locally-running Clover node is a Substrate-based node, so we can interact with it using standard Substrate tools. Let’s start by connecting it with Clover JS Apps. Visit https://apps.clover.finance/#/explorer and you will see Polkadot JS Apps and are automatically connected to the Polkadot MainNet.
Click on the top left corner to open the menu and configure the networks, then navigate down to open the Development sub-menu. Select the "Local Node" option which points Polkadot JS Apps to ws://127.0.0.1:9944. Next, click on the Switch button and the site should be successfully connected to your standalone Clover node.
With Polkadot JS Apps connected, you will see the standalone Clover node producing blocks.
Last modified 8mo ago