# Configure node properties · Chromia Docs (concept)

> This topic outlines node properties that can be configured via properties files or environment variables.

Source: https://docs.chromia.com/ecosystem/providers/nodes/node-config/

# Configure node properties

On this page

* [Node properties](#node-properties)
* [Peer configuration](#peer-configuration)
* [REST API configuration](#rest-api-configuration)
* [Container (subnode) configuration](#container-subnode-configuration)
* [ZFS configuration](#zfs-configuration)

This topic outlines node properties that can be configured via `properties` files or environment variables. For
blockchain-specific configuration properties, refer to the
[Blockchain configuration](https://docs.chromia.com/build/configuration/blockchain-properties/) page.

### Node properties

Below is a comprehensive list of node properties:

| Property Name | Description | Type | Default Value | Environment Variable |
| --- | --- | --- | --- | --- |
| `cryptosystem` | Cryptosystem class name | String | "net.postchain.crypto.Secp256K1CryptoSystem" | `POSTCHAIN_CRYPTO_SYSTEM` |
| `configuration.provider.node` | Node configuration provider (properties/manual/managed) | String | "properties" | `POSTCHAIN_NODE_CONFIG_PROVIDER` |
| `database.driverclass` | Database driver class | String | "org.postgresql.Driver" | `POSTCHAIN_DB_DRIVER` |
| `database.url` | Database URL | String | "" | `POSTCHAIN_DB_URL` |
| `database.schema` | Database schema | String | "" | `POSTCHAIN_DB_SCHEMA` |
| `database.username` | Database username | String | "" | `POSTCHAIN_DB_USERNAME` |
| `database.password` | Database password | String | "" | `POSTCHAIN_DB_PASSWORD` |
| `database.readConcurrency` | Database read concurrency | Int | 10 | `POSTCHAIN_DB_READ_CONCURRENCY` |
| `database.blockBuilderWriteConcurrency` | Database block builder connection pool write concurrency | Int | 8 | `POSTCHAIN_DB_BLOCK_BUILDER_WRITE_CONCURRENCY` |
| `database.sharedWriteConcurrency` | Database shared connection pool write concurrency | Int | 2 | `POSTCHAIN_DB_SHARED_WRITE_CONCURRENCY` |
| `database.blockBuilderMaxWaitWrite` | Maximum wait time for a connection on the block builder connection pool (ms) | Int | 100 | `POSTCHAIN_DB_BLOCK_BUILDER_MAX_WAIT_WRITE` |
| `database.sharedMaxWaitWrite` | Maximum wait time for a connection on the shared connection pool (ms) | Int | 10000 | `POSTCHAIN_DB_SHARED_MAX_WAIT_WRITE` |
| `database.suppressCollationCheck` | Ignore incorrect database collation configuration | Boolean | false | `POSTCHAIN_DB_SUPPRESS_COLLATION_CHECK` |
| `exit-on-fatal-error` | Exit on fatal database error | Boolean | false | `POSTCHAIN_EXIT_ON_FATAL_ERROR` |
| `infrastructure` | Infrastructure implementation to use | String | "base/ebft" | `POSTCHAIN_INFRASTRUCTURE` |
| `genesis.pubkey` | Public key of the genesis node | String |  | `POSTCHAIN_GENESIS_PUBKEY` |
| `genesis.host` | Host address of the genesis node | String |  | `POSTCHAIN_GENESIS_HOST` |
| `genesis.port` | Genesis node peer-to-peer port | String |  | `POSTCHAIN_GENESIS_PORT` |
| `messaging.privkey` | Node private key | String | "" | `POSTCHAIN_PRIVKEY` |
| `messaging.pubkey` | Node public key | String | "" | `POSTCHAIN_PUBKEY` |
| `messaging.port` | Peer-to-peer port | Int | 9870 | `POSTCHAIN_PORT` |
| `metrics.prometheus.port` | Prometheus metrics port (or -1 to disable) | Int | -1 | `POSTCHAIN_PROMETHEUS_PORT` |
| `fastsync.resurrect_drained_time` | Time (ms) until a DRAINED node is set to SYNCABLE again | Long | 10000 | `POSTCHAIN_FASTSYNC_RESURRECT_DRAINED_TIME` |
| `fastsync.resurrect_unresponsive_time` | Time (ms) until an UNRESPONSIVE node is set to SYNCABLE again | Long | 20000 | `POSTCHAIN_FASTSYNC_RESURRECT_UNRESPONSIVE_TIME` |
| `fastsync.parallelism` | Number of parallel sync jobs | Int | 10 | `POSTCHAIN_FASTSYNC_PARALLELISM` |
| `fastsync.exit_delay` | Minimum time (ms) to remain in sync mode | Long | 60000 | `POSTCHAIN_FASTSYNC_EXIT_DELAY` |
| `fastsync.job_timeout` | Sync job timeout (ms) | Long | 10000 | `POSTCHAIN_FASTSYNC_JOB_TIMEOUT` |
| `fastsync.loop_interval` | Sleep time between sync job iterations | Long | 100 | `POSTCHAIN_FASTSYNC_LOOP_INTERVAL` |
| `fastsync.must_sync_until_height` | Minimum sync height (or -1 to disable) | Long | -1 | `POSTCHAIN_FASTSYNC_MUST_SYNC_UNTIL_HEIGHT` |
| `fastsync.max_errors_before_blacklisting` | Max errors before blacklisting a peer | Int | 10 | `POSTCHAIN_FASTSYNC_MAX_ERRORS_BEFORE_BLACKLISTING` |
| `fastsync.disconnect_timeout` | Time (ms) before a peer is considered disconnected | Long | 10000 | `POSTCHAIN_FASTSYNC_DISCONNECT_TIMEOUT` |
| `fastsync.blacklisting_timeout` | Maximum time a node is blacklisted if no errors occur (ms) | Long | 60000 | `POSTCHAIN_FASTSYNC_BLACKLISTING_TIMEOUT` |
| `fastsync.blacklisting_error_timeout` | Maximum time an error is considered when deciding if a node should be blacklisted (ms) | Long | 3600000 | `POSTCHAIN_FASTSYNC_BLACKLISTING_ERROR_TIMEOUT` |
| `slowsync.enabled` | Is slowsync enabled. | Boolean | true | `POSTCHAIN_SLOWSYNC_ENABLED` |
| `slowsync.max_sleep_time` | Maximum sleep time for slowsync (ms). | Long | 600000 | `POSTCHAIN_SLOWSYNC_MAX_SLEEP_TIME` |
| `slowsync.min_sleep_time` | Minimum sleep time for slowsync (ms). | Long | 20 | `POSTCHAIN_SLOWSYNC_MIN_SLEEP_TIME` |
| `slowsync.max_peer_wait_time` | A peer must answer before this, or we will give up (ms). | Long | 2000 | `POSTCHAIN_SLOWSYNC_MAX_PEER_WAIT_TIME` |
| `applied-config-send-interval-ms` | Interval for signers to broadcast info about their currently applied config (ms) | Long | 1000 | `POSTCHAIN_CONFIG_SEND_INTERVAL_MS` |
| `blockchain_ancestors.<brid_X>` | List of blockchain ancestors  `[<node_id_Y>:<brid_Z>]` | String |  |  |

### Peer configuration

You can configure peers using these properties in the node configuration:

| Property Name | Description | Type |
| --- | --- | --- |
| `node.<index>.pubkey` | Peer's public key | String |
| `node.<index>.host` | Peer's host address | String |
| `node.<index>.port` | Peer's peer-to-peer port | Int |

### REST API configuration

| Property Name | Description | Type | Default Value | Environment Variable |
| --- | --- | --- | --- | --- |
| `api.basepath` | Base path for the REST API (leave empty for root). Don't append a trailing slash to the base path. | String | "" | `POSTCHAIN_API_BASEPATH` |
| `api.port` | REST API port (-1 to disable, 0 for a random free port). Default is 443, but 7740 can also be used | Int | 443 | `POSTCHAIN_API_PORT` |
| `api.request-concurrency` | Number of concurrent HTTP requests to handle. The default value `0` means the number of available processors \* 2. | Int | 0 | `POSTCHAIN_API_REQUEST_CONCURRENCY` |
| `api.chain-request-concurrency` | Concurrent HTTP requests per blockchain. Unlimited by default. If exceeded, `503 Service Unavailable` is returned. | Int | -1 | `POSTCHAIN_API_CHAIN_REQUEST_CONCURRENCY` |
| `debug.port` | Debug API port | Int | 7750 | `POSTCHAIN_DEBUG_PORT` |

### Container (subnode) configuration

For subnodes within containers, use the following configuration properties:

| Property Name | Description | Type | Required | Default Value | Environment Variable |
| --- | --- | --- | --- | --- | --- |
| `container.docker-image` | Docker image name to use for subnodes | String | Required |  | `POSTCHAIN_SUBNODE_DOCKER_IMAGE` |
| `container.master-host` | Host address of the master node from the subnode perspective | String | Required |  | `POSTCHAIN_MASTER_HOST` |
| `container.master-port` | Master node port for Netty communication | Int |  | 9860 | `POSTCHAIN_MASTER_PORT` |
| `container.network` | Custom Docker network to use for subnodes | String |  |  | `POSTCHAIN_SUBNODE_NETWORK` |
| `container.subnode-host` | Subnode host address from the master node perspective | String | Required |  | `POSTCHAIN_SUBNODE_HOST` |
| `container.rest-api-port` | Subnode REST API port | Int |  | 443 | `POSTCHAIN_SUBNODE_REST_API_PORT` |
| `container.debug-api-port` | Subnode debug API port | Int |  | 7750 | `POSTCHAIN_SUBNODE_DEBUG_API_PORT` |
| `container.admin-rpc-port` | Subnode gRPC API port | Int |  | 50051 | `POSTCHAIN_SUBNODE_ADMIN_RPC_PORT` |
| `container.subnode-user` | Custom user to run Docker containers | String |  |  | `POSTCHAIN_SUBNODE_USER` |
| `container.send-master-connected-peers-period` | Interval for the master node to send the list of connected peers to subnodes (milliseconds) | Int |  | 60000 | `POSTCHAIN_SEND_MASTER_CONNECTED_PEERS_PERIOD` |
| `container.healthcheck.running-containers-check-period` | Interval for the master node to check subnode health (milliseconds) | Int |  | 60000 | `POSTCHAIN_HEALTHCHECK_RUNNING_CONTAINERS_CHECK_PERIOD` |
| `container.filesystem` | Filesystem to use for subnodes (LOCAL, ZFS, EXT4) | String |  | "LOCAL" | `POSTCHAIN_SUBNODE_FILESYSTEM` |
| `container.host-mount-dir` | Directory in the host filesystem where subnode mount directories will be created | String | Required |  | `POSTCHAIN_HOST_MOUNT_DIR` |
| `container.host-mount-device` | Host device that `container.host-mount-dir` is mounted on | String | Required |  | `POSTCHAIN_HOST_MOUNT_DEVICE` |
| `container.master-mount-dir` | Directory in the master container filesystem used for subnode mount directories | String |  | `container.host-mount-dir` | `POSTCHAIN_MASTER_MOUNT_DIR` |
| `container.bind-pgdata-volume` | Bind PostgreSQL data directory to the host file system (persistence) | Boolean |  | true | `POSTCHAIN_BIND_PGDATA_VOLUME` |
| `container.docker-log-driver` | Custom Docker log driver | String |  |  | `POSTCHAIN_DOCKER_LOG_DRIVER` |
| `container.docker-log-opts` | Custom Docker log options | String |  |  | `POSTCHAIN_DOCKER_LOG_OPTS` |
| `container.remote-debug-enabled` | Enable remote debugging for subnodes (attach to port mapped to 8000) | Boolean |  | false | `POSTCHAIN_SUBNODE_REMOTE_DEBUG_ENABLED` |
| `container.remote-debug-suspend` | Enable remote debugging with suspend flag | Boolean |  | false | `POSTCHAIN_SUBNODE_REMOTE_DEBUG_SUSPEND` |
| `container.metrics.prometheus.port` | Enable Prometheus metrics on subnodes using this port (not mapped to host) | Int |  | -1 | `POSTCHAIN_SUBNODE_PROMETHEUS_PORT` |
| `container.jmx-base-port` | Enable JMX on subnodes with JMX port mapped to this base value + container id | Int |  | -1 | `POSTCHAIN_SUBNODE_JMX_BASE_PORT` |
| `container.label.key1=value1` | Set Docker label key1=value1 on the subnode container (multiple allowed) | String |  |  |  |
| `min-space-quota-buffer-mb` | Disk space margin to quota limit, subnode switches to read-only mode if this limit is reached | Int |  | 100 | `POSTCHAIN_SUBNODE_MIN_SPACE_QUOTA_BUFFER_MB` |
| `container.log4j-configuration-file` | Path to the log4j configuration file for subnodes | String |  |  | `POSTCHAIN_SUBNODE_LOG4J_CONFIGURATION_FILE` |

### ZFS configuration

Relevant when `container.filesystem` is configured as `ZFS`. These properties apply:

| Property Name | Description | Type | Default Value | Environment Variable |
| --- | --- | --- | --- | --- |
| `container.zfs.pool-name` | Name of the ZFS pool | String | "psvol" | `POSTCHAIN_ZFS_POOL_NAME` |
| `container.zfs.pool-init-script` | Script for ZFS pool setup | String |  | `POSTCHAIN_ZFS_POOL_INIT_SCRIPT` |

[View this page on docs.chromia.com](https://docs.chromia.com/ecosystem/providers/nodes/node-config/)Content mirrored from the live docs
