Skip to main content

Running Initia Node

Prerequisites

The minimum hardware requirements for running an Initia node are:
  • CPU: 16 cores
  • Memory: 32GB RAM
  • Disk: 2 TB NVMe/SSD Storage with Write Throughput > 1000 MiBps
  • Bandwidth: 100 Mbps
It is recommended to use Linux OS to run Initia nodes. Running Initia node has not been tested on other OS environments, and same environment settings and running conditions cannot be guaranteed.

Install Initia

Installing Initia can be done in 2 different ways.
  1. Downloading the source and directly building Initia.
1

Build essential package

To build Initia, essential utilities must be installed.These utilities are provided on Linux distribution, and package components for Ubuntu can be found in the following link:
2

Install Golang

golang v1.22 or above is required.Refer to the link to find out how to install Golang and use the command below to check the version.
3

Clone and Build Initia

Clone and build the Initia source code repo.
Use the command below to check if the installation is successful.
If initiad is not found, run go env and check if $GOBIN or $GOPATH/bin directories are included in $PATH.
  1. Using prebuilt binaries
You can download pre-built binaries for each of Testnet or Mainnet from the initia repository. Download the compression file for your OS.

Set Up Environment

On Linux, the number of files that can be opened in a single process can be set on configuration. Many Linux distributions limit the number to 1024, which is smaller than the number of files opened by Initia. To use Initia, this configuration has to be modified. The current value can be checked with ulimit -n command, and root /etc/security/limits.conf file can be modified to change this parameter. By adding the below to limits.conf the maximum for all accounts can be increased to 65535. To only modify the number for the account running Initia, enter the account name instead of *.

Boot an Initia Node

Initia basic setup

The HOME directory used in this section is the default value ${HOME}/.initia. To set a different directory, add --home <YOUR_INITIA_HOME> option on each command and use a different directory as Initia’s HOME directory.
1

Initialization

Use the command below to initialize the Initia Node.
A moniker is a human-readable name for your node. Moniker can contain only ASCII characters, and cannot exceed 70 characters.Your private key is generated during the initialization, and is saved in ${HOME}/.initia/config/priv_validator_key.json.
Remember to backup your private key if you are running a validator node. If a private key is lost, node may never be recoverable from a hardware failure. Plan your back up through running a Testnet node, and secure your private key safely for the mainnet.
2

Setting Endpoints

Initia supports the below endpoints for external communications.
Validator nodes are not recommended to open any of these endpoints.
  • REST: RESTful HTTP API
  • gRPC/gRPC-WEB: gRPC API
  • RPC: Tendermint/CometBFT provided API
  • P2P: Gossip P2P with outher Initia nodes
You can modify the below config values to turn on/off each Endpoint and change ports.The below is a config example which enables all endpoints and listens to 0.0.0.0 as a default port. Modify your config accordingly.
  • ~/.initia/config/app.toml
  • ~/.initia/config/config.toml
3

Set up External Address

To allow access from external nodes to your node through P2P network, config.toml has to be modified. By entering public IP/Port to p2p.external_address field, the network settings will allow external nodes to access your node.The below is an example, and the values can be modified through sed, jq, and curl command lines.
Below command line requires sed, curl and jq to be installed, and sets all ports to the default value: 26656.
4

Run Initia

All local settings are completed. But to run initiad as a blockchain node, the node has to fetch genesis block information and be set to communicate with other nodes.Refer to Connect to Initia Network section for more information.The below section is optional, but contains information on how to register the Initia daemon to the service to make it easier to run and manage. Note that this can help you run smoothly.
5

Registering Initia as a Service (Optional)

Easily run and manage Initia by registering it as a Linux Service. The below example uses initiad as a service name.
  1. Open /etc/systemd/system/initiad.service as root permission and enter the below information:
  • Modify the Service section to match your env settings before saving
    • User: Account name to run initiad (Below example: ubuntu)
    • ExecStart: Directory where initiad is installed + start (Below example: /user/bin initiad start)
  1. Run the below command line to activate initiad service. root permission might be required.
  1. The below command line can be used to start or stop Initia service. root permission might be required.
  • Start: systemctl start initiad
  • Stop: systemctl stop initiad
  1. To apply the changes to /etc/systemd/system/initiad.service, run the below command line. This might require root permission, and to apply changes to a running node, a restart is required.
  1. All logs from initiad resulting from step 1 are recorded on syslog. Use the below commands to check initiad’s logs.

Connect to Initia Network

To establish a connection with the Initia Mainnet or Testnet, it is essential to obtain information about the genesis block and nodes currently connected to these networks. The necessary information on known peers can be accessed through initia-registry. By adhering to the subsequent steps outlined in this document, you will be able to operate an Initia node and monitor logs pertaining to block synchronization.

Genesis File

For genesis.json, you can use the below command line:

Accessing Network Information

For network connectivity, utilize the publicly available persistent peer information, or alternatively, gather peer information from the addrbook.json file of a node that is already operational.

Persistent Peer Configuration

Information on known peers for each network is available within the network-specific repositories linked above. Choose an appropriate network, then apply the corresponding values to p2p.persistent_peers in the ~/.initia/config/config.toml file. The below is an example:

State Sync & Snapshot

Validators on Initia can now join the network using state sync and snapshot. For more details, please visit below sites.

Address Book

We highly recommend to copy addrbook.json to $INITIA_HOME/config/addrbook.json for fast peer connection.