Cardano Node Installation process

After we have done all the prerequisites we are finally ready to do the installation process of Cardano Node!

Let's start by downloading the Cardano Node source code from git (github)

cd ~/git
git clone

[email protected]:~$ git clone Cloning into 'cardano-node'... remote: Enumerating objects: 18, done. remote: Counting objects: 100% (18/18), done. remote: Compressing objects: 100% (16/16), done. remote: Total 17996 (delta 3), reused 4 (delta 1), pack-reused 17978 Receiving objects: 100% (17996/17996), 5.66 MiB | 1.62 MiB/s, done. Resolving deltas: 100% (11955/11955), done.

You should have now a new folder - cardano-node with the source code of the cardano node, let's go to that directory and choose which version we would like to install (compile)

cd cardano-node
git fetch --all --recurse-submodules --tags && git tag

[email protected]:~/cardano-node$ cd cardano-node [email protected]:~$ git fetch --all --recurse-submodules --tags && git tag Fetching origin ....... 1.18.0 1.18.1 1.19.1 ....... 1.25.1

Currently (at the time I'm writing this tutorial) the latest Mainnet Tag is 1.26.2, so let's take it!

git checkout tags/1.26.2

Let's force the installation process to use the GHC version that we just installed.

cabal configure --with-compiler=ghc-8.10.2

Starting from tag 1.14.x we need to add libsodium libraries to Cardano node, so let's do that

echo "package cardano-crypto-praos" >> cabal.project.local
echo " flags: -external-libsodium-vrf" >> cabal.project.local

Now we are ready to start the installation (compilation) process (for those who are just updating and skipping to this page... I added cabal clean & cabal update command)! This will take a while... if you are installing this on the VPS server, then you can go and grab coffee/beer/wine/water... as it will take a while.

cabal clean
cabal update
cabal build all

as the last step in our installation process is to copy newly compiled bin (executive) files to an early created folder: .local/bin

if you had a previous version of cardano node running, then before you copy the new binary files, make sure that you have stopped your current cardano-node processes, otherwise, you will not be able to overwrite the new file.

mkdir -p ~/.local/bin/
cp -p dist-newstyle/build/x86_64-linux/ghc-8.10.2/cardano-cli-1.26.2/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin/
cp -p dist-newstyle/build/x86_64-linux/ghc-8.10.2/cardano-node-1.26.2/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin/

Let's check if we have installed the binary files in the correct location and the latest version

which cardano-node && which cardano-cli
cardano-node --version
cardano-cli --version

[email protected]:~$ cardano-node --version cardano-node 1.26.2 - linux-x86_64 - ghc-8.10 git rev 400d18092ce604352cf36fe5f105b0d7c78be074

[email protected]:~$ cardano-cli --version cardano-cli 1.26.2 - linux-x86_64 - ghc-8.10 git rev 400d18092ce604352cf36fe5f105b0d7c78be074

Great! We have installed the cardano node on our server!

Congratulations on running a Cardano Node (MainNet)!