Published on:

January 14, 2023
How to Deploy a Tezos Node?

Share

Tezos is a self upgradable PoS blockchain supporting Smart Contracts and On-chain Governance. The network is supported by two key components: Nodes and Bakers. Nodes exchange valuable information that keeps the Tezos network in check, adds stability to the system, and also helps you with specific applications you might have. Bakers are responsible for producing new blocks, though you can only participate if you run a node. Learn the step-by-step process for deploying a Tezos node. From setting up the infrastructure to configuring the node.

By running a node, you are helping to validate and propagate transactions, along with the ability to participate in the governance of the network by voting on protocol upgrades.

In this blog, we will walk you through the process of setting up a Tezos node, including the necessary hardware and software requirements and the steps involved in the process. Whether you are a developer, a business or an enthusiast, this guide will provide you with the information you need to get started with your own Tezos node. 

We’ve also included a bonus tip at the end to make the setup process even smoother!  But let’s start from the basics. 

System Requirements

Here are the basic but essential system requirements to deploy and run a Tezos Full node without hiccups. 

  • A reliable and fast internet connection of at least 100 MBPS.
  • Ubuntu operating system version 20.04 or newer.
  • 8 GB RAM.
  • 2 CPU cores.
  • 256 GB or higher SSD storage.

Getting Started

We will be using Serokell PPAs for installation on Ubuntu to deploy a Tezos Full Node on the Ghostnet network. The end goal is to use this node for receiving, validating and transmitting blocks and operations to other nodes on the network. Let’s start.

Step 1: Installation

To add stable release PPA to your system, use: 

REPO="ppa:serokell/tezos"

Next, install binaries by running the following commands;

: sudo add-apt-repository -y $REPO && sudo apt-get update
sudo apt-get install -y tezos-client
sudo apt-get install -y tezos-node

Step 2: Configure and run

Run the following command to configure the node for Ghostnet with Full mode. The installation will happen in  ~/tezos-ghostnet directory. 

tezos-node config init --data-dir ~/tezos-ghostnet --network=ghostnet --history-mode=full
  • In this command data-dir defines the directory where the data is stored. Here the installation will happen in  ~/tezos-ghostnet directory. 
  • –network=NETWORK is for selecting a particular network to run. We chose ‘ghostnet’. The default is mainnet though
  •  –history-mode=MODE is for selecting the kind of Node you want to set up. We went for a Full node which is recommended for baking. Depending upon your requirements, you can choose Archive, Full, or Rolling nodes. Possible values here are full (default), archive, full:N, rolling and rolling:N
  • Archive mode retains all the data since the genesis block: entire copy of the blockchain 
  • A Full mode also has all the details but with transactions rolled up. 
  • And the Rolling mode retains only the most recent data, deleting the older data. 

You can now run the node with the command;

tezos-node run --rpc-addr 127.0.0.1:8732 --log-output tezos.log --data-dir ~/tezos-ghostnet

In this command, 

  • –rpc-addr url:port activates the RPC interface allowing communication with the node. It runs on port 8732 by default, so specifying is not mandatory. 
  • –log-output tezos.log saves the logs of the node in the tezos.log file 
  • data-dir defines the directory where the data will be stored. 

Step 3: Check for synchronization.

After starting your node, you can check if it has finished synchronization by running the following command in another terminal. 

tezos-client -E http://127.0.0.1:8732/ bootstrapped

Here, -E option is equal to -endpoint option.

Next, your Tezos node is synchronized with the blockchain when you receive the message “Node is Bootstrapped.” We are done! 

To upgrade to the latest Octez version do the following,

sudo apt-get update

sudo apt-get upgrade

Configure the Systemd units:

In order to enhance the robustness of the node infrastructure against power and internet interruptions, the Systemd configuration can be used. This will automatically relaunch the daemons in case of failure or machine reboot without the need for manual intervention each time.

Start by creating a no shell access user and setup the data directory

sudo useradd --no-create-home --shell /bin/false octez
sudo mkdir <your-data-dir>
sudo chown -R octez:octez <your-data-dir>
Note: “Octez“ is a Tezos software that provides a client, node, baker, accuser, and other tools distributed with the Tezos economic protocols of Mainnet for convenience. 

Now create the systemd configuration file.

The file’s title can be: /etc/systemd/system/octez.service

[Unit]
Description=Octez Service File
Wants=network-online.target
After=network-online.target
[Service]
User=octez
Group=octez
Type=simple
Restart=always
RestartSec=5
ExecStart=tezos-node run \
--rpc-addr 127.0.0.1:8732 \
--log-output tezos.log \
--data-dir <your-data-dir>
[Install] 
WantedBy=multi-user.target

Note: replace <your-data-dir> with the directory of your node 

Register, enable & start the service by running: 

sudo systemctl daemon-reload
sudo systemctl start octez.service
sudo systemctl enable octez.service

Now, verify the service by running:

sudo systemctl status octez.service

And that’s it. You have successfully run the Octez node as a systemd service.

Check the logs by executing:

journalctl -f -u octez.service

For any reason, if you want to stop the service, you can run:

sudo systemctl stop octez.service

Once the node is deployed, make the most of it to create dApps, assets, or smart contracts. 

How can Zeeve help?

Zeeve is your one-stop destination for Tezos node services in the cloud. We offer support for deploying, monitoring, and securing Tezos mainnet and all testnets – ghostnet, jakartanet and katmandunet – over any cloud of your choice. Zeeve even provides detailed monitoring and sophisticated analytics to make sure you have everything necessary to build the best dApp.

With Zeeve on your side, concerns about NodeOps, response time, network upgrades and security are a thing of the past – our team of expert developers take care of it all so you can focus on what really matters.

So what are you waiting for? Book a free developer consultation today, and make the most of our services & expertise.

Join the Our Largest community!

Be one of the 15,000+ innovators who subscribe to our updates.

message