When following the instruction here https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/building-running.md I get an error at the last line

PGPASSFILE=config/pgpass-mainnet db-sync-node/bin/cardano-db-sync \
    --config /home/user/relay/mainnet-config.yaml \
    --socket-path /home/user/relay/node.socket \
    --state-dir /home/user/relay/db \
    --schema-dir schema/

the error is

FatalError {fatalErrorMessage = "readSyncNodeConfig: Error parsing config: AesonException \"Error in $: key \\\"NetworkName\\\" not found\""}

Any any help or direction is appreaciated. Thank you

2 Answers 2


Make sure you are using the right config file. The error is indicating that the config file you are using does not have the NetworkName parameter.

  • how do I determine if it is the right one? its the one that comes default with cardano-node latest release repo.
    – noone392
    Jan 10, 2022 at 2:33
  • I linked the proper one in my answer. You need the config for db-sync not cardano-node
    – adjuric
    Jan 10, 2022 at 2:34
  • thank you that was pretty dumb of me for not check for that file name ....
    – noone392
    Jan 10, 2022 at 2:41

You need to use a db-sync config file, not a cardano-node one. You can get the correct configuration file for mainnet/testnet networks here: https://hydra.iohk.io/build/8111119/download/1/index.html. That link is found in the cardano-node release notes under downloads -> configuration files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.