Linux

We used Ubuntu 21.04 but other Ubuntu or Debian distributions are also applicable.

Open a terminal and install the dependencies of the libraries you need for the Tezos node:

sudo apt-get install build-essential git m4 unzip rsync curllibev-dev libgmp-dev pkg-config libhidapi-dev

Type your password, press Enter and wait till the installation is finished.

Then install Bubblewrap, a utility for running applications in sandbox containers separately from the system. Running a Tezos node in a sandbox will keep it safe from possible hacking:

sudo apt install bubblewrap

Create a new user called Tezos with administrator rights and switch to it. Be sure to give it a password that you won't forget. You can skip filling in the work phone number and other details by pressing Enter:

sudo adduser tezossudo adduser tezos sudosudo su tezos

Download the source code for a Tezos node:

git clone https://gitlab.com/tezos/tezos.gitcd tezosgit checkout latest-release

Install the package manager opam:

wget https://github.com/ocaml/opam/releases/download/2.0.7/opam-2.0.7-x86_64-linuxsudo mv opam-2.0.7-x86_64-linux /usr/local/bin/opamsudo chmod a+x /usr/local/bin/opamopam init --comp=4.09.1 --disable-sandboxingopam switch 4.09.1opam updateeval $(opam env)

If the terminal returns an invalid field opam-root-version error, uninstall opam with sudo apt-get remove opam. Then reinstall it.

Install the Rust compiler:

wget https://sh.rustup.rs/rustup-init.shchmod +x rustup-init.sh./rustup-init.sh --profile minimal --default-toolchain 1.52.1 -ysource $HOME/.cargo/env

Compile your Tezos node:

make build-depsmake

If the terminal returns an error about a missing repository, re-download tezos.git and then run make build-deps:

git clone https://gitlab.com/tezos/tezos.gitmake build-deps

Generate the node identity:

./tezos-node identity generate

Installation is now complete, follow the instructions for setting up the node and running the baking.

Installing a node

Windows Linux macOS