dash/doc/dash-conf.md
fanquake 91d5b02582 Merge #16621: doc: add default bitcoin.conf locations
1373fa7e3d3f04ce6938cdcd2124cba71ff82ca0 doc: add default bitcoin.conf locations (Chuf)

Pull request description:

  Added default bitcoin.conf data directories and paths

ACKs for top commit:
  practicalswift:
    ACK 1373fa7e3d3f04ce6938cdcd2124cba71ff82ca0
  ryanofsky:
    ACK 1373fa7e3d3f04ce6938cdcd2124cba71ff82ca0
  fanquake:
    ACK 1373fa7e3d3f04ce6938cdcd2124cba71ff82ca0 - Already three ACKs and lots of discussion here, so I'm going to merge, and the other comment

Tree-SHA512: 8bb1ed9868c5d171b6791bd6dc9598eddfdf64977d327ff4f333323cef8e3e76b1a67da21e4199f008a12f5610ac6dc6f34f4a13235e8846754eb6d6e5075da4
2021-07-12 20:52:56 -05:00

2.7 KiB

dash.conf Configuration File

The configuration file is used by dashd, dash-qt and dash-cli.

All command-line options (except for -?, -help, -version and -conf) may be specified in a configuration file, and all configuration file options (except for includeconf) may also be specified on the command line. Command-line options override values set in the configuration file and configuration file options override values set in the GUI.

Configuration File Format

The configuration file is a plain text file and consists of option=value entries, one per line. Leading and trailing whitespaces are removed.

In contrast to the command-line usage:

  • an option must be specified without leading -;
  • a value of the given option is mandatory; e.g., testnet=1 (for chain selection options), noconnect=1 (for negated options).

Blank lines

Blank lines are allowed and ignored by the parser.

Comments

A comment starts with a number sign (#) and extends to the end of the line. All comments are ignored by the parser.

Comments may appear in two ways:

  • on their own on an otherwise empty line (preferable);
  • after an option=value entry.

Network specific options

Network specific options can be:

  • placed into sections with headers [main] (not [mainnet]), [test] (not [testnet]) or [regtest];
  • prefixed with a chain name; e.g., regtest.maxmempool=100.

Network specific options take precedence over non-network specific options. If multiple values for the same option are found with the same precedence, the first one is generally chosen.

This means that given the following configuration, regtest.rpcport is set to 3000:

regtest=1
rpcport=2000
regtest.rpcport=3000

[regtest]
rpcport=4000

Configuration File Path

The configuration file is not automatically created; you can create it using your favorite text editor. By default, the configuration file name is dash.conf and it is located in the Dash data directory, but both the dash data directory and the configuration file path may be changed using the -datadir and -conf command-line options.

The includeconf=<file> option in the dash.conf file can be used to include additional configuration files.

Default configuration file locations

Operating System Data Directory Example Path
Windows %APPDATA%\DashCore\ C:\Users\username\AppData\Roaming\DashCore\dash.conf
Linux $HOME/.dashcore/ /home/username/.dashcore/dash.conf
macOS $HOME/Library/Application Support/DashCore/ /Users/username/Library/Application Support/DashCore/dash.conf

You can find an example dash.conf file in share/examples/dash.conf.