Skip to main content

Configure general settings

The following information describes the most important node configuration settings found in the ~/.terra/config/ directory. It is recommended that you update these settings with your own information.

Structure of .terra/config


_8
~/.terra/config
_8
│-- addrbook.json # a registry of peers to connect to
_8
│-- app.toml # terrad configuration file
_8
│-- client.toml # configurations for the cli wallet (ex terracli)
_8
│-- config.toml # Tendermint configuration file
_8
│-- genesis.json # gensesis transactions
_8
│-- node_key.json # private key used for node authentication in the p2p protocol (its corresponding public key is the nodeid)
_8
└-- priv_validator_key.json # key used by the validator on the node to sign blocks

Initialize and configure moniker

Initialize the node with a human-readable name:


_1
terrad init <your_custom_moniker> # ex., terrad init validator-joes-node

Moniker characters

Monikers can only contain ASCII characters; using Unicode characters will render your node unreachable by other peers in the network.

You can update your node's moniker by editing the moniker field in ~/.terra/config/config.toml

Update minimum gas prices

  1. Open ~/.terra/config/app.toml.

  2. Modify minimum-gas-prices and set the minimum price of gas a validator will accept to validate a transaction and to prevent spam.

Recomended setting is: minimum-gas-prices = "0.15uluna"

Example:


_18
# The minimum gas prices a validator is willing to accept for processing a
_18
# transaction. A transaction's fees must meet the minimum of any denomination
_18
# specified in this config (e.g. 0.25token1;0.0001token2).
_18
minimum-gas-prices = "0.01133uluna"
_18
_18
## Start the light client daemon (LCD)
_18
_18
For information about the available Fluid REST API endpoints, see the [Swagger documentation](https://phoenix-lcd.terra.dev/swagger/). To enable the REST API and Swagger, and to start the LCD, complete the following steps:
_18
_18
1. Open `~/.terra/config/app.toml`.
_18
_18
2. Locate the `API Configuration` section (`[api]`).
_18
_18
3. Change `enable = false` to `enable = true`.
_18
_18
```toml
_18
# Enable defines if the API server should be enabled.
_18
enable = true

  1. Optional: Swagger defines if swagger documentation should automatically be registered. To enable Swagger, change swagger = false to swagger = true.


    _1
    swagger = true

  2. Restart the service via systemctl restart terrad. Once restarted, the LCD will be available (by default on port 127.0.0.1:1317)

Set up external_address in config.toml

In order to be added to the address book in seed nodes, you need to configure external_address in config.toml. This addition will prevent continuous reconnections. The default P2P_PORT is 26656.


_1
sed -i -e 's/external_address = \"\"/external_address = \"'$(curl httpbin.org/ip | jq -r .origin)':26656\"/g' ~/.terra/config/config.toml