In this section, we will talk about how to run a node for production. At the moment we will focus on Linux (RPM based) only.
terrad does not require super user account. We strongly recommend to run
terrad as a normal user. However, during the setup process, we need super user permission for creating/modifying files.
This guide is for general purpose only. We recommend to read Validator section for operating a validator node.
terrad uses several TCP ports for each purposes.
26656 is the default port for P2P protocol. This port has to be opened to communicate with other nodes. This port must be opened for joining the network. However, it does not have to be opened to the public. For validator nodes, we recommend to configure
persistent_peers and close this port to the public.
26657 is the default port for RPC protocol. This port is used for querying / sending transactions. In other words, this port needs to be opened for serving queries from
terracli. It is safe NOT to open this port to the public unless you are planning to run public node.
1317 is the default port for Lite Client Daemon(LCD), which can be executed by
terracli rest-server. LCD provides HTTP RESTful API layer to interact with
terrad node(RPC). You can check
https://lcd.terra.dev/swagger-ui/ out for examples. Again, you don't need to open this port unless you have use of it.
26660 is the default port for interacting with the Prometheus database which can be used for monitoring the environment. This port is not opened in the default configuration.
terrad can open more than 1024 files (which is default maximum) concurrently. We should increase this limit. Modify
/etc/security/limits.conf to raise the
* soft nofile 65535* hard nofile 65535
There are several ways to run a node, we recommend to register
terrad as a
We have to make a service definition file in
[Unit]Description=Terra DaemonAfter=network.target[Service]Type=simpleUser=terraExecStart=/data/terra/go/bin/terrad startRestart=on-abort[Install]WantedBy=multi-user.target[Service]LimitNOFILE=65535
Service Section from the above given sample to suit your settings. Note that even if we raised the number of open files for a process, we still need the
After creating a service definition file, you need to execute
Use systemctl to control (start, stop, restart)
systemctl start terrad
systemctl stop terrad
systemctl restart terrad
journalctl -t terrad
Entire log reversed:
journalctl -t terrad -r
Latest and continuous:
journalctl -t terrad -f