How to connect cardano-node 8.1.2 to Pre-prod or Preview testnet using cardano-cli
The cardano-node prebuilt binary for the Linux distro can be accessed via the cardano-node release page here
Download cardano-node 8.1.2 prebuilt binary
From any Ubuntu or Linux distro, create a new dir and cd into then:
wget https://github.com/input-output-hk/cardano-node/releases/download/8.1.2/cardano-node-8.1.2-linux.tar.gz
Extract the zip
tar -xzf cardano-node-8.1.2-linux.tar.gz
Next, make the files executable
chmod +x *
Download the configuration files for the respective environments
Note: all configuration files for each of the environments can be found here.
Download the pre-prod configuration files from Cardano World here.
wget https://raw.githubusercontent.com/input-output-hk/cardano-world/master/docs/environments/preprod/alonzo-genesis.json
wget https://raw.githubusercontent.com/input-output-hk/cardano-world/master/docs/environments/preprod/byron-genesis.json
wget https://raw.githubusercontent.com/input-output-hk/cardano-world/master/docs/environments/preprod/config.json
wget https://raw.githubusercontent.com/input-output-hk/cardano-world/master/docs/environments/preprod/shelley-genesis.json
wget https://raw.githubusercontent.com/input-output-hk/cardano-world/master/docs/environments/preprod/topology.json
Run the following command using the cardano-node cli to launch the node
./cardano-node run --config ~/{dir}/config.json --database-path ~/{dir}/db --socket-path ~/{dir}/node.socket --topology ~/{dir}/topology.json
Run the following command to export the node.socket
export CARDANO_NODE_SOCKET_PATH=~/{dir}/node.socket
Run cardano-cli to query the tip of the chain
./cardano-cli-node query tip --testnet-magic 1