Cardano Shelley

Setting up a self node

The first step is to install and set up your self node. The node is the software that implements the underlying Ouroboros protocol that runs Cardano. Its role is to perform tasks to do with networking, transactions, blocks, and so on.

This node works on most platforms and allows you to connect easily to a blockchain. The Rust source code contains two tools: Jörmungander, the Cardano node, and the JCLI, its command line interface.

By installing Jörmungandr and JCLI from source you can be sure that you get the latest updates of the code. You can also install them from a release, which may be faster. There are video tutorials to help you set it up in both ways, or you can follow the instructions below. Currently, the minimum supported version of the Rust compiler is 1.35, but we recommend using the most recent stable version.

How to install Jörmungandr from source:

  1. Install rustup
  2. Run rustup install stable
  3. Run rustup default stable
  4. Enter sudo apt-get
  5. Enter sudo apt-get
  6. Clone this repository: git clone --recurse-submodules https://github.com/input-output-hk/jormungandr
  7. Enter the repository directory: cd jormungandr
  8. Install Jörmungandr: cargo install --path jormungandr
  9. Install JCLI: cargo install --path jcli

You will also need to do one of the following, depending on your platform:

  • on Windows, add /userProfile/.cargo/bin to the PATH;
  • on Linux and OSX, add ${HOME}/.cargo/bin to your ${PATH}
  • on Linux with systemd, to enable logging to journald, replace step 5 above with cargo install --path . --features systemd

How to install Jörmungander from a release:

  1. Go to the releases site.
  2. Choose the file that matches your hardware and operating system.
  3. Click the link to download the file.
  4. Uncompress the file.
  5. Add the executables to the PATH of your system.
  6. Go to the Scripts folder in the GitHub repository.
  7. Open thebootstrap script.
  8. Click the Raw button.
  9. Save it as a script (.sh) and give it executable permissions.
  10. Perform steps 7 to 9 for:

create-account-and-delegate.shtempl

faucet-send-certificate.shtempl

faucet-send-money.shtempl

send-transaction

  1. In Jcli-helpers,execute the bootstrap.sh file.
  2. To start the node, execute the following command:
jormungandr --genesis-block block-0.bin --config config.yaml --secret pool-secret1.yaml

If you use the bootstrap script you can expect the following results:

Results

The self node configuration includes a Yaml file (loaded to the bootstrap script) that allows you to build your own blockchain and set its parameters. It bootstraps your own genesis block and enables your machine to run a multi-node environment. Here you can experiment with your own version of Ouroboros Genesis, manually build transactions, and demonstrate the workings of the cryptocurrency.

If you want to create several nodes or stake pools, or implement and test more complex configurations, you can use a selection of Nix scripts that wrap some of the functions into a one-step process for ease of use.