Configuration#
A node reads a HOCON configuration file whose settings live under the dcc key. Built-in defaults (application.conf and network-defaults.conf) are merged with your file, so your file only needs the settings you want to change.
Note
Verified against node-scala v1.7.0. Do not use the shipped application.conf as your own config file; it is a defaults file.
Environment variables (Docker)#
The Docker entrypoint translates these variables into JVM options:
Variable |
Default |
Effect |
|---|---|---|
|
|
Sets |
|
|
JVM |
|
|
Console log level: |
|
|
Sets |
|
— |
Base58 wallet seed, written to a private temporary config file at start-up and then unset |
|
— |
Wallet file password, handled the same way |
|
— |
Extra JVM options |
To use your own file, mount it at /etc/dcc/dcc.conf. The entrypoint loads it automatically and layers wallet secrets on top. DCC_WALLET_SEED and DCC_WALLET_PASSWORD only take effect when such a file is mounted (and no command arguments are passed to the container); without /etc/dcc/dcc.conf they are ignored.
Ports and network defaults#
Network |
P2P port |
Minimum connections |
|---|---|---|
Mainnet |
6868 |
5 |
Testnet |
6863 |
5 |
The REST API listens on port 6869 on every network. Known peers for each network ship in network-defaults.conf.
Note
The public DecentralChain Testnet (testnet-node.decentralchain.io) is a custom chain (dcc.blockchain.type = CUSTOM, chain ID !) whose nodes use P2P port 6868. The built-in testnet profile (DCC_NETWORK=testnet) uses port 6863 and its own known peers, so a node started with it will not join the public Testnet; use a custom config matching the Testnet’s genesis and peers instead.
Commonly changed settings#
Key |
Default |
Description |
|---|---|---|
|
|
Base directory for node data |
|
|
Maximum number of blocks a rollback can undo |
|
|
Index transactions by address (needed by address history endpoints) |
|
|
Wallet file path |
|
unset |
Wallet file password |
|
unset |
Base58 seed; if unset the node generates one |
|
|
Turn the REST API on or off |
|
|
Interface the API listens on |
|
|
API port |
|
|
Hash of the API key that protects privileged endpoints |
|
|
Set to a specific origin in production |
|
|
Max results for address transaction history |
|
|
Max blocks per range request |
|
|
Max unconfirmed transactions held |
|
|
Inbound peer limit |
|
|
Outbound peer limit |
|
|
Experimental fast-finality engine — leave off (see Features and Activation) |
API key#
Privileged endpoints (wallet, rollback, /debug/*, /node/stop) require an X-Api-Key header. The node stores only a hash of the key. Generate the hash with the node itself:
curl -X POST http://localhost:6869/utils/hash/secure \
-H 'Content-Type: text/plain' -d 'my-secret-api-key'
Put the hash value from the JSON response in dcc.rest-api.api-key-hash, restart, and send my-secret-api-key in X-Api-Key.
Example: minimal Mainnet file#
dcc {
directory = "/var/lib/dcc"
rest-api {
bind-address = "127.0.0.1"
api-key-hash = "<hash from /utils/hash/secure>"
}
wallet {
password = "change-me"
}
}