Skip to main content

Node upgrade

In this chapter, we will see the CLI command lines to install the necessary dependencies to upgrade a Tezos node.

Upgrade an Octez node

As you may know, Tezos is an evolving blockchain. Through its on-chain governance mechanism, Tezos smoothly evolves to become more secure and scalable over time.

The following commands help to upgrade your node to the latest Octez version.

caution

That version 14.0 changes the storage format. A octez-node upgrade storage is mandatory to update your storage. This upgrade is instantaneous but the data-directory used by your node can no longer be used with version 13.0 once upgraded (if you are using docker, see upgrade instructions in Bonus: Quick synchronization from a snapshot).

Docker and docker-compose

Upgrade the docker image
To upgrade your node to the lastest Octez version, replace your previous image version (probably v13.0) by the lastest: v20.2. Note that if you run the image latest, a restart of your container is sufficient.

To use the v20.2 image, execute the following command:

docker run tezos/tezos:v20.2 ...

APT binaries with Tezos packages

Upgrade tezos packages

To fetch the latest node version, run the following command:

sudo apt-get update
sudo apt-get upgrade

From source

From scratch

Upgrade from scratch

Execute the following commands in your tezos repository:

git fetch
git checkout v20.2
opam switch remove .
rm -rf _opam _build
make build-deps
eval $(opam env)
make
caution

A opam switch remove . is only needed if you are updating an already compiled repository, not if you are compiling from a freshly cloned repository.

Tezos opam packages

Upgrade using opam

Run the following commands:

opam update
opam depext
opam upgrade
caution

Be careful when closing terminal windows because this stops the node.

tip

Use screen, or nohup to keep the node running in the background.