Setup Tezos Baking Node
How to compile Tezos from source and run node software in "screen" sessions.

Prepare to install Tezos node

This guide starts with the latest Ubuntu 20.10 server version but it should work on all Debian based distributions and older (not ancient) versions.

Install operating system prerequisites

sudo apt update
sudo apt install -y curl xz-utils jq screen build-essential git m4 unzip rsync curl bubblewrap libev-dev libgmp-dev pkg-config libhidapi-dev jbuilder software-properties-common opam autoconf libffi-dev

Install Tezos prerequisites

Install Rust

cd /tmp
wget https://sh.rustup.rs/rustup-init.sh
chmod +x rustup-init.sh
./rustup-init.sh --profile minimal --default-toolchain 1.52.1 -y

Install Zcash Parameters

cd /tmp
wget https://raw.githubusercontent.com/zcash/zcash/master/zcutil/fetch-params.sh
chmod +x fetch-params.sh
./fetch-params.sh

Download Tezos blockchain snapshot

You can can work on next step while this one runs
Use one of the sources below to obtain a full or rolling (both work for baking) snapshot of the Tezos blockchain. A rolling snapshot will get you started the fastest and is completely fine to use for baking nodes.
XTZ-Shots
MIDL
https://snaps.teztools.io/
TezTools

Compile Tezos node & import snapshot

Download Tezos source code, initialize opam and build Tezos binaries

cd ~ && git clone https://gitlab.com/tezos/tezos.git && cd tezos && git checkout latest-release
opam init --bare
# (answer yes to questions)
make build-deps
eval $(opam env)
make

Generate Tezos node identity

cd ~/tezos && ./tezos-node identity generate

Import chain snapshot and verify its legitimacy

The import of the snapshot will take a no more than an hour on most systems. If you're importing a full snapshot, the process may take up to a full day if you're running on a slow VM or fanless system
cd ~/tezos && ./tezos-node snapshot import /path/to/chain.full --block <ENTER_BLOCK_HASH_HERE>
Replace the made up path to where your downloaded and uncompressed the Tezos chain snapshot. Navigate to any Tezos blockchain explorer like https://tzstats.com and https://tzkt.io and look up the block number referenced by the snapshot website. The block will have a hash # associated with it, which you will need to copy into the <ENTER_BLOCK_HASH_HERE> portion. This verifies the integrity of the chain and saves you many hours of synchronization and waiting.

Start Tezos node and baking executables

Run First Time Only to Add Ledger Support, Import Baker’s Key and register as baker

During setup have the Ledger Nano S Tezos baker application open for all steps until the last one, for which open the Tezos wallet application. After this, you will never need to use the Tezos wallet app to bake and you should ALWAYS have the Tezos baker applic
First add udev rules then import ledger signer info.
wget -q -O - https://raw.githubusercontent.com/LedgerHQ/udev-rules/709581c85db97bf6ea12e472aa4e350bf0eabfb7/add_udev_rules.sh | sudo bash
udevadm trigger
udevadm control --reload-rules
cd ~/tezos
./tezos-client list connected ledgers
./tezos-client import secret key baker "ledger://<4-words-here>/ed25519/0h/0h"
(note: replace ledger://<4-words-here> commands below with YOUR unique ledger path)
./tezos-client register key baker as delegate
./tezos-client setup ledger to bake for baker --main-hwm 0
(note: replace 0 with the current block if you've even baked with this ledger device before)

Run Every Time: Start Ledger/Node/Baker/Endorser/Accuser Processes

cd ~/tezos
screen -S TezosNode
./tezos-node run --rpc-addr 127.0.0.1
CTRL+A then H to log/record session CTRL+A then d to disconnect from Screen session
screen -S TezosBaker012
export TEZOS_LOG='* -> debug'
./tezos-baker-012-Psithaca run with local node ~/.tezos-node baker
CTRL+A then H to log/record session CTRL+A then d to disconnect from Screen session
screen -S TezosAccuser012
export TEZOS_LOG='* -> debug'
./tezos-accuser-012-Psithaca run
CTRL+A then H to log/record session CTRL+A then d to disconnect from Screen session
You can monitor your node by running:
cd ~/tezos
tail -f screen*
🙏 Donate & help us grow. All proceeds go to more baking capacity. tz1S5WxdZR5f9NzsPXhr7L9L1vrEb5spZFur
Export as PDF
Copy link
Edit on GitHub
On this page
Prepare to install Tezos node
Install operating system prerequisites
Install Tezos prerequisites
Install Zcash Parameters
Download Tezos blockchain snapshot
Compile Tezos node & import snapshot
Download Tezos source code, initialize opam and build Tezos binaries
Generate Tezos node identity
Import chain snapshot and verify its legitimacy
Start Tezos node and baking executables
Run First Time Only to Add Ledger Support, Import Baker’s Key and register as baker
Run Every Time: Start Ledger/Node/Baker/Endorser/Accuser Processes