Skip to main content
Validators
Running a Full Node

Running a Full Node

This document outlines the process for running a full ZetaChain node. It is intended for those who are familiar with the Linux operating system and the command line interface.

Please refer to Technical Requirements for more details on the technical requirements for running a ZetaChain node.

Getting Started

Set Limits on Open Files and Number of Processes

To better manage the resources of your nodes, we recommend setting some limits on the maximum number of open file descriptors (nofile) and maximum number of processes (nproc).

Edit /etc/security/limits.conf to include or modify the following parameters:

*       soft    nproc   262144
* hard nproc 262144
* soft nofile 262144
* hard nofile 262144

Edit /etc/sysctl.conf to include the following:

fs.file-max=262144

Create zetachain User Account

We recommend running ZetaChain binary files with a user account rather than as root.

useradd -m -s /bin/bash zetachain

Create ZetaChain Directory Structure

This is needed to store ZetaChain binary and configuration files.

sudo su zetachain
mkdir -p /home/zetachain/.zetacored/bin
mkdir /home/zetachain/.zetacored/config

Download and Install the zetacored binary

Binaries are built based on OS version and CPU architecture. You can download the latest binaries from our ZetaChain Node GitHub Repo

Install it in your PATH:

/usr/local/bin/zetacored

General Settings

Install ZetaChain Configuration Files

ZetaChain configuration files can be downloaded from the Athens3 Github Repo

Install it as follows:

/home/zetachain/.zetacored/config/app.toml
/home/zetachain/.zetacored/config/client.toml
/home/zetachain/.zetacored/config/config.toml
/home/zetachain/.zetacored/config/genesis.json

Create a Systemd Unit File

We recommend using Systemd to start and stop ZetaChain binary files and view the logs. You can create a Systemd unit file at the following location /etc/systemd/system/zetacored.service:

[Unit]
Description=Zetacored Service
After=multi-user.target
StartLimitIntervalSec=0
[Install]
WantedBy=multi-user.target
[Service]
Type=simple
Restart=always
RestartSec=90
User=zetachain
LimitNOFILE=262144
ExecStart=zetacored start --home /home/zetachain/.zetacored/ --log_format json --log_level info --moniker <YOUR_NODE_NAME_HERE>

Then start the service with systemctl start zetacored.

You can view the logs with journalctl -o cat -f -u zetacored.

CLI

ZetaChain Core is built with the Cosmos SDK. There is an —help flag that can be used with any subcommand to learn its use and syntax.

zetacored --help

Monitoring

In a production environment we recommend monitoring the node resources (CPU load, Memory Usage, Disk usage and Disk IO) for any performance degradation.

ZetaChain Core generates a log that can be monitored for errors and used for troubleshooting. If you install Zetacore as a Systemd service using the instructions above you can view this log with journalctl -o cat -f -u zetacored.

Prometheus can be enabled to serve metrics which can be consumed by Prometheus collector(s). Telemetry include Prometheus metrics can be enabled in the app.toml file. See the CosmosSDK Telemetry Documentation for more information.

See more about your Validator Monitoring here.