Updating a live node, relay and or block producing

Curious, if I wanted to update say from 1.18.0 -> 1.18.1 would I just re git with the appropriate checkout tag, Update the cabal config, project settings, and reset build folder and then build from source and then Copy cardano-cli and cardano-node files into bin directory? Or are there any additional steps I should follow?

Would they need to be reconfigured or would the previous config persist?

I assume I should kill the node before doing the update.

How often should you update? Every increment or only main releases, from say 1.18 - 1.19? Or only when there is a bulletin across all social platforms saying UPDATE NOW URGENT!!!

Here’s how I do it:


cd cardano-node
cabal clean
cabal update
git fetch --all --tags
git tag (optional to see available tags)
git checkout tags/[the-tag-you-want]
cabal build all

cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin/

cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-cli-/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin/

*note some setups utilize ./cabal/bin/ instead of ./local/bin/


Unless the update is entails expectations of significant performance increases or strong community push to update, I prefer to wait a week or so as if there are issues we’ll know very soon from the first user feedback - I have saved myself countless hours during ITN using this tactic.

5 Likes

Awesome! Thank you.

My pleasure, Mark.

@ADAfrog was playing around / practicing with updating a relay today and for some reason it still is saying 1.18.0 instead of the new probably not quite ready yet 1.19.0. I have made a few attempts trying yours and several different similar methods but no joy. Any insight? Here is the most recent attempt. I do not get any errors when running this aside from not getting updated.

cd git
rm -rf cardano-node <-- I all ready have a copy of the current. Just wanted to be sure I got a fresh one.
git clone https://github.com/input-output-hk/cardano-node.git

cd cardano-node
git fetch --all --tags && git tag

git checkout tags/1.19.0

cabal clean
cabal update
cabal -V
ghc -V

cabal build all

killall cardano-node

sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name “cardano-cli”) /usr/local/bin/cardano-cli

sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name “cardano-node”) /usr/local/bin/cardano-node

cardano-node version
cardano-cli version

Hi Mark,

This is the command I use to copy over my binaries

cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin/

cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-cli-/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin/

Are your binaries located in /usr/local/… or /.local/bin/… ?

Also, I only use killall-cardano node in rare cases - I prefer to have a systemd service that can be stopped gracefully.

Your friend, FROG

/usr/local/bin

Hey Hey! You got me there indirectly. This did it for me. Thanks!

sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name “cardano-cli”) ~/.local/bin/

sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name “cardano-node”) ~/.local/bin/

1 Like

Hi Mark,

I was being indirectly direct lol!

Glad you figured it out!

FROG