Moving and installing cardano-cli to cold environment

Hey everyone, just a quick question I’m currently trying to build a testnet stake pool and i’m at the point of configuring my cold environment. Currently I have a bootable USB with Ubuntu on it. What I don’t understand is how do I install cardano-cli onto this cold environment without connecting it to the internet, I understand you move the cardano-cli directory from your BP to your cold environment but that doesn’t have an install executable. I only have cardano-cli.cabal that i can see. This just opens up a rabbit hole because to run that you need to have cabal, which you need to have Libsodium, which you need MakeFile. After not finding anything on the forms with a straight forward answer I started the painful process of getting the source code of each dependency and moving it over to my cold environment to install it but that just led to more issues with errors with it complaining about missing C compilers.

But back to the point, surely I’m missing something really obvious here and you don’t need to go through this painful process of installing all the other crap.

Any insight would be much appreciated,
Thankyou, Zach.

Just copy the cardano-cli binary over to your cold environment via a usb drive.

You mean the cardano-cli folder correct? I did that and then what? how do i run it? if I try use cardano-cli normally it tells me command not found

Also export the path, compare the bashrc feom live node with the offline one

1 Like

Hey Alex, this will sound dumb but what do you mean by that exactly? How do you export the path. and what bashrc file?

What guide did u used to build the node?

coincashew

Chapter 6.

echo export NODE_HOME=$HOME/cardano-my-node >> $HOME/.bashrc
source $HOME/.bashrc
mkdir -p $NODE_HOME

Copy from your hot environment , also known as your block producer node, a copy of the cardano-cli binaries to your cold environment , this air-gapped offline machine.

In order to remain a true air-gapped environment, you must move files physically between your cold and hot environments with USB keys or other removable media.

Hey,

Yeah ive done that but that doesn’t make me understand how I’m meant to install cardano-cli.

U don’t need to install

U will need to copy the binari files via usb from live Producer to the offline node

The files should be located in:
cd ~/.cabal/bin
ls -l

but wont I need cardano-cli commands to create keys?

Yes u will but when u installed the node on live producer it generated/compiled some binari files like cardano-cli, cardano-node, etc

Moved those files from live node to the offline node

These are the only two directories I have that I think your talking about, they where in home/git/cardano-node. Are these the correct binaries? or are they meant to be files not folders?

Should be here: /usr/local/bin/

copy all bin folder and upload on offline node in
/usr/local

ahhhhhhhhh okay thankyou I found them. So just to reiterate, I copy them over and put them where exactly? in my cardano-my-node directory or?

Should be located in the same folder

/usr/local here paste the bin folder which u copied

If not copied the all bin folder then create the bin folder and put the files inside bin

at the end u should have them in /usr/local/bin

Yep sweet thanks mate, one last thing. So now I’ve done that correctly will I just be able to run cardano-cli commands or do I now have to install it somehow?

U should be able to run the commands… go to cardano-my-node folder and type
cardano-node - -version
cardano-cli - -version

but first update the path

Just use these commands


echo PATH="$HOME/.local/bin:$PATH" >> $HOME/.bashrc
echo export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" >> $HOME/.bashrc
echo export NODE_HOME=$HOME/cardano-my-node >> $HOME/.bashrc
source $HOME/.bashrc

1 Like

Hey Alex. finally found some time to try this thanks for your help. I still seem to get command not found when trying to see the versions. is it possible that this line you sent here:

echo export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" >> $HOME/.bash

is meant to be bashrc and not bash?

tried this and it didnt change anything…