Skip to content

About

Setup scripts for a self-hosted Tezos node, TzKT indexer and Grafana/Prometheus monitoring on CentOS 7. Built 2022 for serialCore.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation


Logo

Tezos Infrastructure for the serialCore project

This repository outlines the necessary steps to setup a Tezos Node, a TzKT blockchain indexer aswell as the necessary monitoring framework with Grafana and Prometheus.

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Status
  5. License
  6. Contact

About The Project

The infrastructure is part of a bigger project of generative art called serialCore. The scripts in this repository are regrouping the knowledge that has been acquired through experimentation and learning. It allows to setup a whole Tezos blockchain stack comprised of a non-baking node (RPC), with a blockchain indexer called TzKT and a monitoring stack to keep watch over the Docker instances.

The goal of having one's own Tezos stack is to be able to interact more freely with the blockchain, without having the limitations of the publicly accessible services. When a high load is requested, it's not rare of having slow downs or freezes on the public instances.

All credits have been added where they were due.

(back to top)

Built With

(back to top)

Getting Started

First and foremost step is to get either a VPS, or a dedicated server to host the Tezos Node, the TzKT blockchain indexer and the monitoring stack. Current preferred provider is Servdiscount. Recommended specifications: 8(v)Cores / 16GB RAM / 500GB+ (SSD is recommended)

Note: these steps are valid on a CentOS 7 distribution but can be reproduced with some changes on any other distro (Ubuntu, Debian...).

Prerequisites

A general knowledge of *nix system is a prerequisite.

This script will add a few necessary things to your CentOS installation (Development tools, Docker Community Edition and Docker Compose, NTP Syncing)

Downloading and running the script (run as root/sudo):

cd ~
curl -L https://raw.githubusercontent.com/somaticbits/tezos-infra/main/CentOS-post-install.sh -o post-install.sh
chmod +x post-install.sh
./post-install.sh

If this error occurs: Failed to set locale, defaulting to C, refer to this post: unixstackexchange

Once everything installed, create a new account (here tezos), add a password and grant root permissions:

adduser tezos
passwd tezos
usermod -aG wheel tezos

Installation

  1. Clone this repository
    git clone https://github.com/somaticbits/tezos-infra
  2. Switch to the tezos-infra folder
  3. Add execution permission to scripts
    chmod +x install-*
  4. Install the RPC (node)
    ./install-node.sh
  5. Install TzKT
    ./install-tzkt.sh
  6. Install NGINX
    ./install-nginx.sh
  7. (optional) Install monitoring stack
    cp .env.example .env, set the passwords in .env, then
    ./install-monitoring.sh

(back to top)

Usage

  • Node: once installed, you need to exchange the RPC Url in your wallet of choice. In Temple, open the settings and under Network, you can set your freshly installed node. Forget about overcrowded public nodes.
    If the container crashes, fire it back up with TEZOS_VERSION=TEZOS_VERSION sudo docker-compose up -d in the repo folder. TEZOS_VERSION in this case is the one defined in the config.sh file (example v12.0-rc1). It relies on the docker-compose.yml to restart the container, and will at this point restart automatically if it crashes again.

  • TzKT: this part of the infrastructure allows you to use the TzKT api under your own address of choice. For more documentation, please relate to the official documentation: TzKT API Docs

  • Monitoring stack: This part can be accessed via the MONITOR_URL variable you set in the config.sh file (an example would be: https://monitor.somaticbits.xyz).
    Login: admin. The password is GF_SECURITY_ADMIN_PASSWORD in your .env file (see .env.example), which is never committed.
    The RPC node is monitored via the Tezos dashboard, generic container metrics can be found under Docker Prometheus Monitoring dashboard. An additional datasource has been added and can be used to access directly the PostgreSQL Database from TzKT.

(back to top)

Status

Built 2022 for serialCore on CentOS 7, which reached end of life in 2024. Kept as a reference project; not maintained.

(back to top)

License

Distributed under the MIT License. See LICENSE for details.

(back to top)

Contact

David Pettersson - @somaticbits - david@somaticbits.com

Project Link: https://github.com/somaticbits/tezos-infra

(back to top)

Acknowledgments

(back to top)

About

Setup scripts for a self-hosted Tezos node, TzKT indexer and Grafana/Prometheus monitoring on CentOS 7. Built 2022 for serialCore.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages