S2 Node Configuration

Introduction

An Ixian S2 node's behavior is managed through a configuration file (by default, ixian.cfg) and command-line arguments. The node first reads the configuration file on startup, and any settings provided as command-line flags will override the corresponding options in the file.

This document provides a comprehensive guide to all configuration parameters for running and maintaining an Ixian S2 node.


Configuration File (ixian.cfg)

The configuration file uses a simple key = value format. Each option must be on its own line. Lines starting with a semicolon (;) are treated as comments.

Example ixian.cfg:

; Set the S2 P2P port for the mainnet
s2Port = 10235

; Set the JSON-RPC API port
apiPort = 8001

; Allow API access from the local machine
apiAllowIp = 127.0.0.1

; Set the network type to testnet
networkType = testnet

General Options

ParameterTypeDescription
networkTypestringSets the network to operate on. Can be mainnet, testnet, or regtest.
externalIpstringThe node's public IP address. Overrides the node's automatic detection.
checksumLockstringA custom string for the seeding checksum. This is only necessary when setting up a private network.

Network & API Options

ParameterTypeDescription
s2PortintegerThe TCP port for S2 peer-to-peer (P2P) network communication.
testnetS2PortintegerThe S2 P2P port to use when operating in testnet mode.
apiPortintegerThe TCP port for the JSON-RPC API server.
testnetApiPortintegerThe API port to use when operating in testnet mode.
apiAllowIpstringWhitelists an IP address for API access. This parameter can be used multiple times.
apiBindstringBinds the API server to a specific local IP address. Can be specified multiple times.
addApiUserstringAdds a required user:password credential for API access. Can be specified multiple times.
addPeerstringAdds a seed node for the mainnet. Using this will clear the default list. Can be used multiple times.
addTestnetPeerstringAdds a seed node for the testnet. Using this will clear the default list. Can be used multiple times.

Logging & Node Behavior

ParameterTypeDescription
maxLogSizeintegerThe maximum size of a single log file in Megabytes (MB).
maxLogCountintegerThe maximum number of historical log files to keep (log rotation).
logVerbosityintegerA bitmask to set logging detail. Add numbers for combined verbosity: Trace=1, Info=2, Warn=4, Error=8. (e.g., 14 for Info+Warn+Error).
disableWebStartintegerSet to 1 to prevent the node from automatically opening the API URL in a browser on startup.
blockNotifystringA command to execute when the connected DLT network reports a new block.

Command-Line Arguments

Command-line flags are processed after the config file and will take precedence over any settings defined there.

General Flags

FlagParameterDescription
-h, --help-Displays the help screen and exits.
-v, --version-Displays the S2 node version and exits.
-t, --testnet-Starts the node in testnet mode. Overrides networkType in the config file.
--networkTypestringExplicitly sets the network type. Can be mainnet, testnet, or regtest.
--configfilepathSpecifies the path to the configuration file (default: ixian.cfg).

Node Operation Flags

FlagParameterDescription
-c, --clean-Deletes cache, log, and peer data files before starting.
-x, --changepass-Prompts to change the password of the wallet specified with -w.
-p, --portportSets the S2 P2P network port.
-a, --apiportportSets the JSON-RPC API port.
-i, --ipip_addressSets the external IP address.
-w, --walletfilepathSpecifies the path to the wallet file (default: ixian.wal).
-n, --nodeip:portConnects to a specific DLT seed node, ignoring the default list.
--disableWebStart-Disables opening the API URL in a browser on startup.
--verboseOutput-Enables verbose logging directly to the console output.

Logging Flags

FlagParameterDescription
--maxLogSizemegabytesSets the maximum log file size in MB.
--maxLogCountcountSets the maximum number of log files to keep.
--logVerbosityintegerSets the logging verbosity using the bitmask (Trace=1, Info=2, Warn=4, Error=8).

Developer & Debug Flags

FlagParameterDescription
--walletPasswordpassword(UNSAFE) Provides the wallet password directly on the command line. Use with caution.
--generateWallet-Generates a new wallet file and exits. Testnet only.
--checksumLockstringSets the checksum lock for private networks.
--netdumpfilepathDumps network message details to the specified file for debugging.
--testClient-Runs the node in a special test client mode for debugging purposes.