![Logo](images/tzlogo.png)
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.
Report Bug
·
Request Feature
Table of Contents
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.
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...).
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?token=GHSAT0AAAAAABUJMUQH77COOYNXH5XPFHWIYT6EJ4A -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
- Clone this repository
git clone https://github.com/somaticbits/tezos-infra
- Switch to the
tezos-infra
folder - Add execution permission to scripts
chmod +x install-*
- Install the RPC (node)
./install-node.sh
- Install TzKT
./install-tzkt.sh
- Install NGINX
./install-nginx.sh
- (optional) Install monitoring stack
./install-monitoring.sh
-
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 withTEZOS_VERSION=TEZOS_VERSION sudo docker-compose up -d
in the repo folder.TEZOS_VERSION
in this case is the one defined in theconfig.sh
file (example v12.0-rc1). It relies on thedocker-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 theconfig.sh
file (an example would be: https://monitor.somaticbits.xyz).
Password is set in theconfig.monitoring
file which can be found in themonitoring
folder. Current default password:TezosIsTheBest
. Login:admin
The RPC node is monitored via theTezos
dashboard, generic container metrics can be found underDocker Prometheus Monitoring
dashboard. An additional datasource has been added and can be used to access directly the PostgreSQL Database from TzKT.
David Pettersson - @somaticbits - [email protected]
Project Link: https://github.com/somaticbits/tezos-infra
- br0kenlink for the post-install script
- BakingBad for their blockchain indexer