Build Komodo DeFi Framework From Source

Install Rust and Cargo (Rust's package manager):

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

source "$HOME/.cargo/env"

rustc --version

cargo --version

Update Rust

rustup update

sudo apt update

sudo apt install -y build-essential pkg-config

sudo apt install -y protobuf-compiler

cd ~/Downloads

wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip

unzip protoc-21.12-linux-x86_64.zip -d protoc_tmp

sudo mv protoc_tmp/bin/protoc /usr/local/bin/

sudo mv protoc_tmp/include/* /usr/local/include/

sudo chmod +x /usr/local/bin/protoc

sudo apt install -y git

cd ~

git clone https://github.com/KomodoPlatform/komodo-defi-framework.git

cd komodo-defi-framework

cargo build --release

On fail...

cd ~/komodo-defi-framework

cargo clean

cargo build --release

warning: the following packages contain code that will be rejected by a future version of Rust: fs_extra v1.2.0, nom v6.1.2

note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`

ls target/release/kdf

target/release/kdf

./target/release/kdf

26 09:51:47, mm2:300] Komodo DeFi Framework 2.5.0-beta_fbab8ec85 DT 2025-07-26T08:42:38.514475365+00:00

26 09:51:47, mm2:303] File '/home/x/.kdf/MM2.json' is not present.

mkdir -p /home/x/.kdf

nano /home/x/.kdf/MM2.json

{

"gui": "BNB_ZEC_Swap",

"netid": 8762,

"seednodes": [

"seed01.kmdefi.net",

"seed02.kmdefi.net",

"seed03.kmdefi.net",

"seed04.kmdefi.net"

],

"passphrase": "YOUR_SECURE_SEED_PHRASE_HERE", e.g scissors prepare replace rate destroy average pledge leg case ankle brave fatal

"rpc_password": "YourUniqueP@ssw0rd123!",

"allow_weak_password": false,

"dbdir": "/home/x/.kdf/DB",

"enable_hd": true

}

Go to https://iancoleman.io/bip39/ and create a bip39 seed phrase to place into nano /home/x/.kdf/MM2.json

chmod 600 /home/x/.kdf/MM2.json

export PATH=$PATH:~/komodo-defi-framework/bin

export KOMODEFI_CLI_ROOT=/home/x/.kdf

./target/release/kdf

26 10:04:19, mm2:300] Komodo DeFi Framework 2.5.0-beta_fbab8ec85 DT 2025-07-26T08:42:38.514475365+00:00

26 10:04:19, mm2:303] File '/home/x/.kdf/coins' is not present.

cd /home/x/.kdf

wget https://raw.githubusercontent.com/KomodoPlatform/coins/master/coins -O coins

chmod 600 coins

export MM_CONF_PATH=/home/x/.kdf/MM2.json

export MM_COINS_PATH=/home/x/.kdf/coins

cd ~/komodo-defi-framework/

./target/release/kdf

  

📝 📜 ⏱️ ⬆️