# Comprehensive Settings Reference

> For the complete documentation index, see [llms.txt](https://bsvblockchain.com/docs/llms.txt).

This document provides a complete reference for all Teranode configuration settings, organized by component.

This document provides a complete reference for all Teranode configuration settings, organized by component.

## Table of Contents

1. [Overview](#overview)
2. [General Configuration](#general-configuration)
3. [Services](#services)

## Overview

All Teranode services accept settings through a centralized Settings object that allows local and remote servers to have their own specific configuration.

For general information on how the configuration system works, see the [Settings Overview](https://bsvblockchain.com/docs/nodes/teranode/references/settings/).

For deployment-specific information, see:

- [Developer Setup](https://bsv-blockchain.github.io/teranode/howto/developerSetup/)
- [Docker Configuration](https://bsvblockchain.com/docs/nodes/teranode/howto/miners/docker/miners-how-to-configure-the-node/)
- [Kubernetes Configuration](https://bsvblockchain.com/docs/nodes/teranode/howto/miners/kubernetes/miners-how-to-configure-the-node/)

---

## General Configuration

### Configuration Files

Settings are stored in two files:

- `settings.conf`: Global settings with sensible defaults for all environments
- `settings_local.conf`: Developer-specific and deployment-specific overrides (not in source control)

### Configuration System

The configuration system uses a layered approach with the following priority (highest to lowest):

1. Environment variable (exact setting key name, e.g., `asset_httpListenAddress=:8090`)
2. `SETTING_NAME.full_context` (e.g., `SETTING_NAME.docker.m` — longest matching context chain wins)
3. Progressively shorter context suffixes (e.g., `SETTING_NAME.docker` if `SETTING_NAME.docker.m` is not set)
4. `SETTING_NAME`: Base setting (lowest priority)

Context resolution strips suffixes from right to left until a match is found. There is no special `.base` suffix — the plain key name is the final fallback.

### Context Names and Suffixes

Base contexts:

| Context | Description |
| --------- | ------------- |
| `dev` | Local development |
| `test` | Unit/integration test runs |
| `docker` | Docker Compose deployments |
| `operator` | Kubernetes/production deployments |

Contexts support dot-notation suffixes to target specific deployment sub-configurations:

| Suffix | Meaning | Example |
| -------- | --------- | --------- |
| `.m` | Multi-node Docker Compose setup | `KAFKA_HOSTS.docker.m` |
| `.ss.teranode1` | Single-service deployment, first instance | `KAFKA_BLOCKS.docker.ss.teranode1` |
| `.testrunner` | CI test runner environment | `DATADIR.docker.context.testrunner` |

Suffixes are combined with base contexts using dots, e.g., `docker.m` means "multi-node Docker Compose". Settings are resolved by matching the longest applicable suffix chain.

### Environment Variables

Settings can be configured as environment variables using the exact setting key name (e.g., `asset_httpListenAddress=:8090`, `blockchain_grpcAddress=localhost:8087`). The environment variable name matches the key exactly as it appears in `settings.conf` and the settings structs. Environment variables take the highest priority and override any value in the settings files.

---

## Services

For detailed service-specific configuration documentation, see:

- **[Alert Service](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/alert-settings/)** - BSV Blockchain alert system configuration
- **[Asset Server](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/asset-settings/)** - HTTP/WebSocket interface configuration
- **[Block Assembly](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/blockassembly-settings/)** - Block assembly service configuration
- **[Blockchain](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/blockchain-settings/)** - Blockchain state management configuration
- **[Block Persister](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/blockpersister-settings/)** - Block persistence configuration
- **[Block Validation](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/blockvalidation-settings/)** - Block validation configuration
- **[Legacy](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/legacy-settings/)** - Legacy Bitcoin protocol compatibility configuration
- **[P2P](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/p2p-settings/)** - Peer-to-peer networking configuration
- **[Propagation](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/propagation-settings/)** - Transaction propagation configuration
- **[RPC](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/rpc-settings/)** - JSON-RPC server configuration
- **[Pruner](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/pruner-settings/)** - UTXO and block data pruning configuration
- **[Subtree Validation](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/subtreevalidation-settings/)** - Subtree validation configuration
- **[UTXO Persister](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/utxopersister-settings/)** - UTXO set persistence configuration
- **[Validator](https://bsvblockchain.com/docs/nodes/teranode/references/settings/services/validator-settings/)** - Transaction validation configuration
- **[Coinbase](https://bsv-blockchain.github.io/teranode/references/settings/services/coinbase_settings/)** - Coinbase transaction and mining reward configuration
- **[Faucet](https://bsv-blockchain.github.io/teranode/references/settings/services/faucet_settings/)** - Test Bitcoin faucet service configuration