Set Up a Node
You can find the source code for Bee in the official Bee repository. Before you can install Bee from the source, you will need to install some required dependencies.
Installing from Source
Dependency Packages
Before starting the installation process, you should make sure your system has all the required dependencies.
- Debian
- macOS
- Windows
To run a Bee node in a Debian base system you will need to install the following packages:
To install all of these packages, you can run the following commands:
apt-get update
apt-get upgrade
apt-get install git build-essential cmake pkg-config librocksdb-dev llvm clang libclang-dev libssl-dev
To run a Bee node in a macOS system, you will need to install the following packages using the brew package manager:
You can run the following command to install brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After the installer finishes, you can use brew to install the required packages by running:
brew install cmake
To run a Bee node in a Windows system, you will need to install the following packages using the chocolatey package manager:
To install chocolatey, open Powershell and execute the following command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
After the installer finishes, you can use chocolatey to install the required packages by running:
choco install git --params '/NoAutoCrlf' cmake --installargs 'ADD_CMAKE_TO_PATH=System' llvm
You will need to restart Powershell for your changes to take effect.
Installing Rust
You will need to install Rust to run a Bee node. You should install version 1.51, or above.
- Debian
- macOS
- Windows
You can install Rust in a Debian system by running the following commands:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
You can install Rust in a macOS system by running the following commands:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
You can find installation instructions for the Windows system in the official Rust documentation.
Updating Rust
You can use rustup to update your Rust version by running the following command:
rustup update
Compiling the Bee Node
Download the Source
Once you have installed all the required dependencies, you can start compiling the Bee Node. To get started, you should clone the source code by running the following command.
git clone https://github.com/iotaledger/bee.git --branch mainnet-develop
Compiling
Before you start compiling Bee, you should change your current directory to bee/bee-node
. You can do so by running the following command from the same directory where you downloaded the source:
cd bee/bee-node
You can compile Bee in two manners:
With Dashboard
If you want to build Bee with its Dashboard, you should run the following commands:
cargo build --release --features dashboard
Without dashboard
If you want to build Bee without its Dashboard, you should run the following command:
cargo build --release
Running
Once you have downloaded and compiled Bee, you should make a copy of the example config file. Be sure to review and update your configuration. You can find more information on configuring Bee in the configuration section.
To copy the example configuration file, you should run the following command:
cp config.template.json config.json
Once you have copied and updated the configuration, you can run your Bee node by executing the following command:
../target/release/bee