Cardano Node 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 be download the latest default configuration and genesis files from here: https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/index.html

Let's download them from our server's console (currently we are using 40962351 MainNet configuration files)

#checking the latest built for configs
export LAST_BUILD=$(curl -s https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/index.html | grep -e "This item has moved" | sed -e 's/.*build\/\(.*\)\/download.*/\1/')
#downloading configs
wget -q -O mainnet-config.json https://hydra.iohk.io/build/${LAST_BUILD}/download/1/mainnet-config.json
wget -q -O mainnet-byron-genesis.json https://hydra.iohk.io/build/${LAST_BUILD}/download/1/mainnet-byron-genesis.json
wget -q -O mainnet-shelley-genesis.json https://hydra.iohk.io/build/${LAST_BUILD}/download/1/mainnet-shelley-genesis.json
wget -q -O mainnet-topology.json https://hydra.iohk.io/build/${LAST_BUILD}/download/1/mainnet-topology.json
#list downloaded files
ls -al mainnet*

Now let's tweak a little bit and switch the default output to LiveView (graphical output, but if you like to see text-only output - leave both entries as they are)

nano mainnet-config.json

find a row with "ViewMode": "SimpleView", and change id to to "ViewMode": "LiveView", and do the same with this one - find TraceBlockFetchDecisions : false and change to TraceBlockFetchDecisions : true

Save the changes by pressing: ctrl+o and then Enter exit editor: ctrl+x

By default you have IOG (relays-new.cardano-mainnet.iohk.io) relay in your topology file, let's add one more: relays.stakepool247.eu

cat mainnet-topology.json << EOF
{
"Producers": [
{
"addr": "relays-new.cardano-mainnet.iohk.io",
"port": 3001,
"valency": 2
},
{
"addr": "relays.stakepool247.eu",
"port": 3001,
"valency": 1
}
]
}
EOF

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