Boot an Initia Node
Guide to running an Initia Node.
Initia basic setup
The HOME directory used in this section is the default value ~/.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.
Initialize Initia
The below command can be used to Initialize Initia node.
initiad init <moniker>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 ~/.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.
Set Minimum Gas Prices
Open ~/.initia.config.app.toml on an editor and modify minimum-gas-prices to set the minimum gas price accepted by the validator to process a transaction and prevent spamming. Multiple fees can be modified by using comma (,) between each fee types.
The below is an example:
minimum-gas-prices = "0.15uinit,0.01uusdc"minimum-gas-prices parameter is managed altogether with Move module parameters which can be viewed on this section.
Setting Endpoint per protocol
Initia supports the below endpoints for external communications.
LCD: RESTful API
GRPC/GRPC-WEB: GRPC API
RPC: Tendermint/CometBFT provided API
P2P: Gossip P2P with other Initia nodes
You can modify the below config values to turn on/off each Endpoint and change ports.
LCD
~/.initia/config/app.toml
api.enable: Enable / disable LCD api.swagger: Enable / disable swagger api.address: Listen address for LCD
GRPC/RPC-WEB
~/.initia/config/app.toml
grpc.enable: Enable / disable GRPC grpc.address: Listen address for GRPC grpc-web.enable: Enable / disable GRPC-WEB grpc-web.address: Listen address for GRPC-WEB
RPC
~/.initia/config/config.toml
rpc.laddr: Listen address for RPC
P2P
~/.initia/config/config.toml
p2p.laddr: Listen address for P2P
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
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.
Set up Oracle
To start oracle feeding from your validator node, app.toml has to be modified. By entering sidecar oracle process address, validator will start feeding the oracle prices.
To start sidecar oracle process, please refer Oracle.
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.
Registering Initia as a Service
Easily run and manage Initia by registering it as a Linux Service. The below example uses initiad as a service name.
Open
/etc/systemd/system/initiad.serviceasrootpermission 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
initiadis installed +start(Below example:/user/bin initiad start)
Run the below command line to activate
initiadservice.rootpermission might be required.
The below command line can be used to start or stop Initia service.
rootpermission might be required.Start:
systemctl start initiadStop:
systemctl stop initiad
To apply the changes to
/etc/systemd/system/initiad.service, run the below command line. This might requirerootpermission, and to apply changes to a running node, a restart is required.
All logs from
initiadresulting from step 1 are recorded on syslog. Use the below commands to checkinitiad's logs.
Last updated