I am trying to run my own cardano node and use cli wallets. When I run this command: cardano-cli query tip --mainnet

I am getting the following error: Command failed: query tip Error: Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: "CARDANO_NODE_SOCKET_PATH"

Can some one guide me please? I am very new to this

Thanks a Ton

1 Answer 1


Seems like you forgot to set the environment variable for CARDANO_NODE_SOCKET_PATH as mentioned in here while setting up the node.


  • I am now getting this error :(
    – Cardanofan
    Commented Mar 28, 2022 at 20:37
  • root@vmi828826:/home/cardano# cardano-node run \ > --topology path/to/mainnet-topology.json \ > --database-path path/to/db \ > --socket-path path/to/db/node.socket \ > --host-addr \ > --port 3001 \ > --config path/to/mainnet-config.json InvalidYaml (Just (YamlException "Yaml file not found: path/to/mainnet-config.json")) cardano-node: YAML exception: Yaml file not found: path/to/mainnet-config.jsonroot@vmi828826:/home/cardano#
    – Cardanofan
    Commented Mar 28, 2022 at 20:38
  • You have to change each of the values of 'path/to/...' to the actual path that suits your environment. Commented Mar 29, 2022 at 0:54
  • damn. i have no idea how to do that lol
    – Cardanofan
    Commented Mar 29, 2022 at 7:37

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.