# Speed-Installation Party
## How to install a octez-node and a baker in less than 20 mins
<!--
When installing software for critical applications like **Tezos/Octez**, ensuring a **secure** and **stable** environment is essential.
- **Compiling from Source**: Allows customization but adds complexity and risk.
- **Docker images**: Fully self contained. Ideal for automatic deployments
- **Binary Packages**: Easy installation, integrated with the OS, enhanced security.
---
## Today we talk about debian Packages
- Pre-compiled and **thoroughly tested**, reducing vulnerabilities.
- All packages are **signed**, with a strictly monitored supply chain.
- Uses components **vetted** by the engineering team.
- **Compiled in clean environments** using up-to-date LTS distributions.
---
## User experience
- Binary packages are installed via **standard package managers** (e.g., apt).
- Allows package signing and automatic **verification** during installation.
- Provides flexibility for **different use cases** ( including unsupervised installations ).
- **Tested upgrade process** ensures near-zero downtime for users.
-->
---
## Documentation for today
Every piece of information in these slides is already published :
Install : https://tezos.gitlab.io/introduction/howtoget.html#installing-binaries
Configure: https://tezos.gitlab.io/introduction/services.html
---
## Before we start
```
sudo dpkg-reconfigure debconf
```
Choose `medium` : this should be the default, but it depends on your installation. Otherwise you are going to miss a few questions.
And ... do you have sudo configured for your current user ?
---
## Regarding our installtion matrix
Here I'm using debian bookworm, but we have many other combinations
- debian bookworm
- debian unstable
- ubuntu noble
- ubuntu jammy
both for amd64 and arm64
---
## Let's add the apt sources
```
sudo vi /etc/apt/sources.list.d/octez.list
```
```
deb [arch=amd64] https://packages.nomadic-labs.com/next/RC/debian bookworm main
```
```
curl "https://packages.nomadic-labs.com/next/RC/debian/octez.asc" \
| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/octez-official.gpg
```
Notice the `RC` part of the url, as we're going to use the latest released RC version for this demo.
---
## Verify if everything is ok.
```
sudo apt update
```
```
$ apt show octez-node
Package: octez-node
Version: 21.0-rc3
Priority: optional
Section: devel
Source: octez
Maintainer: Nomadic Labs <pkg@nomadic-labs.com>
Installed-Size: 279 MB
Depends: adduser, logrotate, octez-zcash-params, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.35), libev4 (>= 1:4.04), libgcc-s1 (>= 4.2), libgmp10 (>= 2:6.2.1+dfsg1), libstdc++6 (>= 10.2), zlib1g (>= 1:1.1.4), systemd
Recommends: octez-client (= 21.0-rc3)
Suggests: lz4, curl
Homepage: https://gitlab.com/tezos/tezos
Download-Size: 44.3 MB
APT-Sources: https://packages.nomadic-labs.com/next/RC/debian bookworm/main amd64 Packages
Description: L1 Octez node for the Tezos network
This package serves as the core implementation for the Tezos blockchain node.
It contains the fundamental components required for protocol execution,
consensus, and network communication within the Tezos blockchain network
.
This package installs the Octez node.
```
Success (1) !
---
## We are ready to install the octez-node
```
sudo apt install octez-node
```
<div style="text-align: left">
and we can check :
</div>
```
octez-node --version
```
Success (2) !
---
## Configuration: preliminaries
https://tezos.gitlab.io/user/snapshots.html#snapshot-providers
https://snapshots.tzinit.org/
```
curl https://snapshots.eu.tzinit.org/ghostnet/rolling.json
```
```
curl https://snapshots.eu.tzinit.org/ghostnet/rolling \
--output rolling
```
```
sudo su tezos -c "octez-node snapshot import \
--no-check /home/nomadic/rolling"
```
Since the node and all other octez service are run using the `tezos` user we must use this little incantation `sudo su tezos -c "<command>"`
---
## Run the octez-node service
```
sudo systemctl enable octez-node
sudo systemctl start octez-node
sudo tail -f /var/log/tezos/node.log
```
---
## We want to bake as well today ( well ... maybe not today )
```
sudo apt install octez-baker octez-signer
```
```
mkdir -p ~/.config/systemd/user/
```
```
cat ~/.config/systemd/user/octez-signer.service
# This is a systemd user Service
# Must be placed in ~/.config/systemd/user/
# Start the signer as : `systemctl --user start octez-signer`
# Enable to run it permanently as : `systemctl --user enable octez-signer`
# Allow to run unsupervised: loginctl enable-linger ubuntu
# See the logs using : `journalctl --user -u octez-signer.service`
[Unit]
Description=Octez-signer
Documentation=https://tezos.gitlab.io/
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/bin/octez-signer --require-authentication launch socket signer -a 127.0.0.1
[Install]
WantedBy=default.target
```
---
## Key hadling
```
octez-signer gen keys alice
```
`alice` is our signing key. stored as the current user
```
sudo su tezos -c "octez-client gen keys auth"
```
`auth` is our signing key stored in the wallet of the octez-client of the tezos user
```
sudo su tezos -c "octez-client show address auth"
Hash: tz1SiA6LQ77TRzeup33YKkLcuhrg47tA1L7r
Public Key: edpkvTxbjQsixVNqqyd8VKxfzUzBba26cPVTveeUPWV8CJSriZWipe
```
---
## Signer coniguration
```
octez-signer add authorized key \
edpkvTxbjQsixVNqqyd8VKxfzUzBba26cPVTveeUPWV8CJSriZWipe --name auth
```
we configure the signer to accept only request from the auth user and we pass a public key
```
systemctl --user start octez-signer
```
```
journalctl -q --user-unit octez-signer
Oct 11 08:30:33 p2p-monitoring systemd[807073]: Started octez-signer.service - Octez->
Oct 11 08:30:33 p2p-monitoring octez-signer[810691]: Oct 11 08:30:33.331: accepting T>
```
---
## Run the baker
```
sudo su tezos -c \
"octez-client -R tcp://localhost:7732 import \
secret key alice remote:tz1b9cJABuuzqg4o14kX9ELTmCaCJCHMBfMT"
Tezos address added: tz1b9cJABuuzqg4o14kX9ELTmCaCJCHMBfMT
```
we configure the client/baker runing as the tezos user to ask the remote signer to sign
packages for alice with `tz1b9cJABuuzqg4o14kX9ELTmCaCJCHMBfMT` tz1 addr
```
sudo systemctl enable octez-baker-active.service
```
```
sudo systemctl start octez-baker-active.service
```
Success (3) !
{"description":"i","title":"i","contributors":"[{\"id\":\"e967c8a3-5a48-4899-a235-2737a65d1709\",\"add\":7145,\"del\":714}]"}