This is a Homebrew tap to install the Cardano node, and some associated tools.
You only need to have previously installed Homebrew, which supports MacOS and Linux.
Precompiled binaries are provided for MacOS Tahoe and Sequoia on Silicon (ARM), and Ubuntu (x86 and ARM). On some other platforms installation may require about 20 minutes if it entails compiling from source.
This formula installs:
- the Cardano Haskell node (11.0.1)
- the Cardano CLI
- the Cardano environments (configuration files)
- a launchd/systemd service to run cardano-node as a daemon
To install
brew trust notunrandom/cardano
brew install notunrandom/cardano/cardano-nodeTo start the service:
brew services start notunrandom/cardano/cardano-nodeWith these two commands a preprod, non-block-producing node is now running as a (user) daemon, and will automatically re-start every time you log back in.
To interact with the preprod node using the Cardano CLI, first set an environment variable which points to the running node's socket:
export CARDANO_NODE_SOCKET_PATH=$(brew --prefix)/var/cardano/11.0.1/preprod/node.socketThen use any CLI commands, e.g.:
cardano-cli query tip --testnet-magic 1To look at its log file:
tail -f $(brew --prefix)/var/cardano/logThe environments (configurations) are the unmodified, official ones from https://book.play.dev.cardano.org/environments.html. They are located here:
ls -R $(brew --prefix)/etc/cardano
The log file and database files are located here:
ls -R $(brew --prefix)/var/cardanoTo run e.g. a mainnet node rather than preprod, stop the service if it has been started:
brew services stop notunrandom/cardano/cardano-nodeThen create a configuration file:
echo "NETWORK=mainnet" >> $(brew --prefix)/etc/cardano/11.0.1/cardano-node-service.confThen start the service as above.
Similarly, to modify the port (default is 3001):
echo "PORT=3002" >> $(brew --prefix)/var/cardano/11.0.1/cardano-node-service.confFor more advanced modifications, something like this should work:
pushd $(brew --prefix)/etc/cardano/11.0.1
echo "NETWORK=custom" > cardano-node-service.conf
cp -r mainnet customthen modify the contents of the custom directory.
To understand how this works look at the service's start script:
cat $(brew --prefix)/opt/cardano-node/libexec/cardano-node-service.shFor even more control, use the cardano-node command directly without starting
the service.
There is also a formula for Kupo:
brew install notunrandom/cardano/kupoThis provides both the kupo binary (v2.12.0) and man kupo.
The official "Cardano Environments" (configuration files) for the 11.0.1 node
can be installed separately (N.B. they are already included with the cardano-node
formula, so installing them separately could be useful for example if you installed
cardano-node manually from its GitHub repo):
brew install notunrandom/cardano/cardano-environmentsYou fill find the files here:
ls -R $(brew --prefix)/etc/cardanoTo install these tools to analyse, manipulate or generate chain and ledger DB's (for a 11.0.1 node):
db-analysersnapshot-converterdb-synthesizerdb-truncaterdb-immutaliserimmdb-server
brew install notunrandom/cardano/consensus-db-toolsTo install only the C libraries upon which the Haskell code of the node depends (e.g. because you are developing for Cardano):
brew install notunrandom/cardano/{blst,libsodium-cardano,secp256k1@0.3.2}The 10.7.1 node (with corresponding environments) can be installed this way:
brew install notunrandom/cardano/cardano-node@10.7.1The 10.6.2 node (with corresponding environments) can be installed this way:
brew install notunrandom/cardano/cardano-node@10.6.2Similarly, there are 10.7.1 and 10.6.2 versions of the cardano-environments and consensus-db-tools formulae, and a 2.11 version of Kupo.
cardano-node --help, cardano-cli --help or check Cardano Developer
Portal
How to contribute to this tap.
brew help, man brew or check Homebrew's
documentation.