mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
82116f2c07
3a71da0b721b064e2f33191cd66d79d0b37c692b Security config warning (Robert Spigler)
Pull request description:
https://github.com/bitcoin/bitcoin/issues/23412
Warning about modifying unknown config changes
ACKs for top commit:
jarolrod:
ACK 3a71da0b721b064e2f33191cd66d79d0b37c692b
1440000bytes:
ACK 3a71da0b72
Tree-SHA512: 01963f7de76b9aa623dfeb1e3d4f0a223dfc5a948f54688b60f895a3e1ab14398090fbd2116ff9fd4d90bf637e956e9cc484672053e195622253fd9895decae2
67 lines
3.0 KiB
Markdown
67 lines
3.0 KiB
Markdown
# `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.
|
|
|
|
Changes to the configuration file while `dashd` or `dash-qt` is running only take effect after restarting.
|
|
|
|
Users should never make any configuration changes which they do not understand. Furthermore, users should always be wary of accepting any configuration changes provided to them by another source (even if they believe that they do understand them).
|
|
|
|
## 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](../share/examples/dash.conf).
|