Ubuntu Installation

Installing Cardano Settlement Layer on Ubuntu 16.04:

The following is a guide for those interested in running their own Cardano Settlement Layer node. None of the below is necessary to stake with Icarus Pool!

Cardano Settlement Layer is the core of the Cardano network. It is the technology that achieves consensus and upon which the many uses of Cardano are built.

There is currently no simple Linux installation method for the Cardano Settlement Layer. It has to be compiled from source code in terminal.

We had some issues with the Cardano-SL compilation instructions listed on Github, especially when running the LTS version of Ubuntu, so we decided to share our version of these instructions.

The bulleted commands below need to be entered into terminal.

First, we will install curl, npm, nano, haskell-stack, and nix:

  • sudo apt install curl npm nano -y
  • curl -sSL https://get.haskellstack.org/ | sh
  • curl https://nixos.org/nix/install | sh
  •  . /home/$USER/.nix-profile/etc/profile.d/nix.sh
  • export PATH=$PATH:/home/$USER/local/bin

Now we install cardano-sl. Once we’ve entered the cardano-sl directory, keep in mind that commands will need to be run from that directory:

  • git clone https://github.com/input-output-hk/cardano-sl.git
  • cd cardano-sl
  • git checkout master
  • sudo mkdir -p /etc/nix
  • sudo nano /etc/nix/nix.conf

Copy and paste into conf:

binary-caches            = https://cache.nixos.org https://hydra.iohk.io
binary-cache-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

Press ctrl+x to exit. Press “Y” and then enter to save changes.

The last steps will be done from the nix-shell:

  • nix-shell
  • stack setup
  • nano ~/.stack/config.yaml

Add these two lines to the end of stack’s configuration file ~/.stack/config.yaml:

nix:
  enable: true

Press ctrl+x to exit. Press “Y” and then enter to save changes.

Lastly:

  • export TMPDIR=/tmp
  • ./scripts/build/cardano-sl.sh

Connecting to Mainnet:

We are just following the official documentation if you’d prefer to read it there.

First, we need to build the connect-to-mainnet script.

If you’re in the nix-shell, enter the command “exit” to leave it. There have been bugs running nix-build from the nix-shell in the past.

  • cd ~/cardano-sl
  • nix-build -A connectScripts.mainnetWallet -o connect-to-mainnet

You’ve now built the connect-to-mainnet script. From now on, you can connect simply by entering this command while in the cardano-sl directory:

  • ./connect-to-mainnet

The first time you launch this, it will take some time for Cardano SL to recover all of the blockchain data it needs in order to be caught up.