Testnets

Building the node using Nix

Nix is a purely functional, cross-platform package manager for Linux and Unix systems. It is the package manager of choice for IOHK's internal development teams, and thus the recommended method for building a Cardano node to run on your machine.

Note: The following instructions assume you are using Linux and have curl installed. See the supported platforms page for more details about supported platforms for the Shelley testnet.

  1. Download and install the Nix package manager by running the following commands from a terminal:
curl -L https://nixos.org/nix/install -o install-nix.sh
chmod +x ./install-nix.sh
  1. Create a file with name nix.conf and add the following into the file:

    extra-sandbox-paths = /etc/nsswitch.conf /etc/protocols substituters = https://iohk.cachix.org https://hercules-ci.cachix.org https://cache.nixos.org/ https://cache.nixos.org https://hydra.iohk.io https://cache.nixos.org/ trusted-substituters = trusted-public-keys = iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= hercules-ci.cachix.org-1:ZZeDl9Va+xe9j+KqdzoBZMFJHVQ42Uu/c/1/KMC5Lw0= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

  2. Run:

./install-nix.sh --daemon --nix-extra-conf-file nix.conf
  1. Follow the instructions presented as part of the Nix installation process. Ensure that you give the install-nix.sh file executable permissions:

    $ chmod +x install-nix.sh

  2. Once Nix is installed, open a new nix-shell session and enter the following commands, which will clone the Cardano node GitHub repository, open the node file directory, build the node itself, and then run it:

git clone https://github.com/input-output-hk/cardano-node
cd cardano-node
nix-build -A scripts.testnet.node -o testnet-node
./ff-node-local

Please be aware that the process of building the node may take some time, possibly several hours.

You should now have a Cardano node running on your machine, connected to the Shelley testnet.

© IOHK 2015 - 2021


Cardano is an open-source project.

Cardano is a software platform ONLY and does not conduct any independent diligence on, or substantive review of, any blockchain asset, digital currency, cryptocurrency or associated funds. You are fully and solely responsible for evaluating your investments, for determining whether you will exchange blockchain assets based on your own judgement, and for all your decisions as to whether to exchange blockchain assets with Cardano. In many cases, blockchain assets you exchange on the basis of your research may not increase in value, and may decrease in value. Similarly, blockchain assets you exchange on the basis of your research may fall or rise in value after your exchange.

Past performance is not indicative of future results. Any investment in blockchain assets involves the risk of loss of part or all of your investment. The value of the blockchain assets you exchange is subject to market and other investment risks