Cardano Relay Configuration

Let's create a simple configuration for your core/relay node (for core node you will need to register keys/certificates which we will touch later)

Let's start by creating a folder structure for our nodes:

cd 
mkdir -p cnode
cd cnode
mkdir -p config db sockets keys logs scripts  
cd config

We will download the latest default configuration and genesis files from here:

https://book.world.dev.cardano.org/environments.html#production-mainnet

Let's download them from our server's console:

#downloading configuration files
curl -o config.json https://book.world.dev.cardano.org/environments/mainnet/config.json
curl -o topology.json  https://book.world.dev.cardano.org/environments/mainnet/topology.json
curl -o byron-genesis.json https://book.world.dev.cardano.org/environments/mainnet/byron-genesis.json
curl -o shelley-genesis.json https://book.world.dev.cardano.org/environments/mainnet/shelley-genesis.json
curl -o alonzo-genesis.json https://book.world.dev.cardano.org/environments/mainnet/alonzo-genesis.json
curl -o conway-genesis.json https://book.world.dev.cardano.org/environments/mainnet/conway-genesis.json

#list downloaded files
ls -al *

you should now have 6 files in the config folder:

We are almost done - I know that you are eager to test what we have done so far :) So let's test and run our Node on port 3000

Let's start with the core node:

cardano-node run --database-path /home/cardano/cnode/db --socket-path /home/cardano/cnode/sockets/node.socket --port 3000 --config /home/cardano/cnode/config/mainnet-config.json  --topology /home/cardano/cnode/config/mainnet-topology.json

If you followed the guide, you should see this:

great! The node is syncing! You can now exit this by pressing ctrl+c and continuing to the next chapter!