Skip to main content

Core Configuration

INX-Indexer uses a JSON standard format as a config file. If you are unsure about JSON syntax, you can find more information in the official JSON specs.

You can change the path of the config file by using the -c or --config argument while executing inx-indexer executable.

For example:

inx-indexer -c config_defaults.json

You can always get the most up-to-date description of the config parameters by running:

inx-indexer -h --full

1. Application

NameDescriptionTypeDefault value
checkForUpdatesWhether to check for updates of the application or notbooleantrue
shutdownConfiguration for shutdownobject

Shutdown

NameDescriptionTypeDefault value
stopGracePeriodThe maximum time to wait for background processes to finish during shutdown before terminating the appstring"5m"
logConfiguration for logobject

Log

NameDescriptionTypeDefault value
enabledWhether to store self-shutdown events to a log filebooleantrue
filePathThe file path to the self-shutdown logstring"shutdown.log"

Example:

{
"app": {
"checkForUpdates": true,
"shutdown": {
"stopGracePeriod": "5m",
"log": {
"enabled": true,
"filePath": "shutdown.log"
}
}
}
}

2. Logger

NameDescriptionTypeDefault value
levelThe minimum enabled logging levelstring"info"
disableCallerStops annotating logs with the calling function's file name and line numberbooleantrue
disableStacktraceDisables automatic stacktrace capturingbooleanfalse
stacktraceLevelThe level stacktraces are captured and abovestring"panic"
encodingThe logger's encoding (options: "json", "console")string"console"
outputPathsA list of URLs, file paths or stdout/stderr to write logging output toarraystdout
disableEventsPrevents log messages from being raced as eventsbooleantrue

Example:

{
"logger": {
"level": "info",
"disableCaller": true,
"disableStacktrace": false,
"stacktraceLevel": "panic",
"encoding": "console",
"outputPaths": ["stdout"],
"disableEvents": true
}
}

3. INX

NameDescriptionTypeDefault value
addressThe INX address to which to connect tostring"localhost:9029"
maxConnectionAttemptsThe amount of times the connection to INX will be attempted before it fails (1 attempt per second)uint30
targetNetworkNameThe network name on which the node should operate on (optional)string""

Example:

{
"inx": {
"address": "localhost:9029",
"maxConnectionAttempts": 30,
"targetNetworkName": ""
}
}

4. Indexer

NameDescriptionTypeDefault value
dbConfiguration for Databaseobject

Database

NameDescriptionTypeDefault value
engineDatabase engine (sqlite, postgresql)string"sqlite"
sqliteConfiguration for SQLiteobject
postgresqlConfiguration for PostgreSQLobject

SQLite

NameDescriptionTypeDefault value
pathThe path to the database folderstring"database"

PostgreSQL

NameDescriptionTypeDefault value
databaseDatabase namestring"indexer"
usernameDatabase usernamestring"indexer"
passwordDatabase passwordstring""
hostDatabase hoststring"localhost"
portDatabase portuint5432

Example:

{
"indexer": {
"db": {
"engine": "sqlite",
"sqlite": {
"path": "database"
},
"postgresql": {
"database": "indexer",
"username": "indexer",
"password": "",
"host": "localhost",
"port": 5432
}
}
}
}

5. RestAPI

NameDescriptionTypeDefault value
bindAddressThe bind address on which the Indexer HTTP server listensstring"localhost:9091"
advertiseAddressThe address of the Indexer HTTP server which is advertised to the INX Server (optional)string""
maxPageSizeThe maximum number of results that may be returned for each pageint1000
debugRequestLoggerEnabledWhether the debug logging for requests should be enabledbooleanfalse

Example:

{
"restAPI": {
"bindAddress": "localhost:9091",
"advertiseAddress": "",
"maxPageSize": 1000,
"debugRequestLoggerEnabled": false
}
}

6. Profiling

NameDescriptionTypeDefault value
enabledWhether the profiling plugin is enabledbooleanfalse
bindAddressThe bind address on which the profiler listens onstring"localhost:6060"

Example:

{
"profiling": {
"enabled": false,
"bindAddress": "localhost:6060"
}
}

7. Prometheus

NameDescriptionTypeDefault value
enabledWhether the prometheus plugin is enabledbooleanfalse
bindAddressThe bind address on which the Prometheus HTTP server listens onstring"localhost:9312"
goMetricsWhether to include go metricsbooleanfalse
processMetricsWhether to include process metricsbooleanfalse
restAPIMetricsWhether to include restAPI metricsbooleantrue
inxMetricsWhether to include INX metricsbooleantrue
promhttpMetricsWhether to include promhttp metricsbooleanfalse

Example:

{
"prometheus": {
"enabled": false,
"bindAddress": "localhost:9312",
"goMetrics": false,
"processMetrics": false,
"restAPIMetrics": true,
"inxMetrics": true,
"promhttpMetrics": false
}
}
  • 1. Application
    • Shutdown
    • Log
  • 2. Logger
  • 3. INX
  • 4. Indexer
    • Database
    • SQLite
    • PostgreSQL
  • 5. RestAPI
  • 6. Profiling
  • 7. Prometheus