Skip to content

Configuration Settings

Eric Voskuil edited this page May 3, 2017 · 30 revisions

Bitcoin Server is highly configurable. Configuration settings are centralized in a single configuration file. All configuration changes require process restart to take effect.

Initial Configuration

Initial block download is very inefficient. The node uses the "blocks first" approach of early satoshi design. As such it is subject to downloading costly batches of redundant blocks and must store blocks in order. Despite this limitation it performs comparably to other nodes when configured carefully. Optimal initial configuration is slightly different from that for operational configuration.

Specifying a Configuration File

The path to the configuration settings file is specified by the --config command line option, the BS_CONFIG environment variable, or by default as follows:

  • Linux/OSX (prefix): <prefix>/etc/libbitcoin/bs.cfg
  • Linux/OSX (default): /usr/local/etc/libbitcoin/bs.cfg
  • Windows: %ProgramData%\libbitcoin\bs.cfg

The Windows directory is hidden by default. If the specified file is not found default values are loaded. If the file contains invalid settings an error is returned via STDERR. If any setting is not specified its default is loaded.

BS uses Boost's program_options library to bind configuration settings. The implementation supports a two level hierarchy of settings using "sections" to group settings, similar to an .ini file.

Default Configuration Settings

For convenience, the bs.cfg file is populated with all default settings values.

Exporting Settings

The --settings command line option emits the definitions for all configuration settings.

Clone this wiki locally