Tutorial · Running a node

Config files explained

Every setting you are likely to put in divi.conf for the original Divi node and in irondivi.conf for IronDivi: what it does, what happens when you leave it out, and the traps that make a node ignore your file.

About 10 minutes · Checked 2026-10-22

1Two nodes, two files

Each node reads one settings file when it starts. It looks for it in its data folder unless you name another file with -conf (C++ node) or --conf (IronDivi).

NodeFileLinuxMac
Original Divi node (divid)divi.conf~/.divi/~/Library/Application Support/DIVI/
IronDivi, real networkirondivi.conf~/.irondivi/~/Library/Application Support/IronDivi/
IronDivi, testnetirondivi.conf~/.irondivi/testnet/~/Library/Application Support/IronDivi/testnet/

On Windows the C++ node uses %APPDATA%\DIVI\divi.conf. IronDivi has no Windows build.

The C++ node keeps one divi.conf for both networks: testnet=1 inside it sends the node to testnet and its data to a testnet3 folder next to the file. IronDivi keeps each network in its own folder with its own irondivi.conf, and the network normally comes from the command line (--testnet). Since version 0.2.6 it also obeys testnet = true in the file: with that line in ~/.irondivi/irondivi.conf and no --testnet, our node started on testnet, kept reading that same file and put its data in ~/.irondivi/testnet. Version 0.2.5 ignored the line. If you pass --datadir, IronDivi uses that folder exactly as given and looks for the file inside it.

2The format is different

This is the slip people make most when they have used both nodes.

divi.confirondivi.conf
Formkey=value, one per lineTOML: key = "text" or key = 5. Since 0.2.6 the divi.conf form works too.
Text valuesNo quotesDouble quotes in TOML
Yes and no1 and 0true and false (1 and 0 also work)
Several valuesRepeat the lineOne line with a list: ["a", "b"], or (since 0.2.6) the line repeated
CommentsLines starting with #Lines starting with #
Unknown settingSilently ignoredA warning in the log, then ignored

Here is what each node does with the other one's habits. IronDivi 0.2.6 reads a file as TOML when the whole file is valid TOML. If it is not, it reads it line by line the way the C++ node does: one key=value per line, the line repeated for several values, and quotes around a value dropped. So each of these started our 0.2.6 node with a working password, where 0.2.5 refused to start:

# a divi.conf-style file
rpcuser=tutf
rpcpassword=the-random-password
addnode=127.0.0.1:1
addnode=127.0.0.1:2

# TOML with the quotes forgotten
rpcuser = tutf
rpcpassword = the-random-password

# TOML with a setting written twice
addnode = "127.0.0.1:1"
addnode = "127.0.0.1:2"

With the first and last file the node tried both addnode peers. IronDivi 0.2.5 stopped at once on each of them, with TOML parse error … invalid string, or duplicate key `addnode` in document root.

The C++ node is stricter about quotes: it starts happily with them, but keeps them as part of the value. With rpcuser="tutf" in divi.conf, our node turned down the name tutf and accepted only "tutf", quotes included:

divi-cli -rpcuser=tutf getblockcount
error: incorrect rpcuser or rpcpassword (authorization failed)

An unknown or misspelt setting is the quiet failure. The C++ node ignores a line like foo=bar without a word. IronDivi logs one line and carries on:

WARN irondivid: Unknown configuration key in config file: maxconnections

If a setting seems to do nothing, check the spelling and then check the log.

3A safe starter file for each

Both files hold the name and password that protect the node's command port. divi-cli and irondivi-cli read the same file, so you never type the password. Make it long and random, from letters and digits only:

openssl rand -hex 24

Paste the result in as the password. Then make the file readable by you alone, because anyone who can read it can spend from the node's wallet:

chmod 600 ~/.divi/divi.conf
chmod 600 ~/.irondivi/testnet/irondivi.conf

A testnet divi.conf:

# ~/.divi/divi.conf
testnet=1
rpcuser=pick-a-name
rpcpassword=the-random-password
daemon=1
staking=0

A testnet irondivi.conf:

# ~/.irondivi/testnet/irondivi.conf
rpcuser = "pick-a-name"
rpcpassword = "the-random-password"
addnode = "app.irondivi.com:51474"
staking = false

For the real network, drop testnet=1 from divi.conf, and put IronDivi's file in ~/.irondivi/ instead. Leave staking out, or set it to on, once the wallet holds coins you mean to stake.

IronDivi with no name or password makes its own

If irondivi.conf is missing rpcuser or rpcpassword, IronDivi 0.2.6 writes a random name and password into a file called .cookie in the data folder when it starts, and deletes it when it stops. irondivi-cli reads that file, as long as you give it the same --datadir and network as the node. The log says which you have:

INFO irondivid: RPC cookie authentication: "/home/you/.irondivi/testnet/.cookie"
WARN irondivid: Only one of rpcuser/rpcpassword is set; using cookie authentication

The second line means you set one of the two and forgot the other. IronDivi 0.2.5 had no such fallback: it opened the command port with no check at all and logged RPC authentication disabled: set both rpcuser and rpcpassword. If you see that line, you are on 0.2.5; upgrade, or add both settings and restart.

Keep # out of the password

irondivi-cli reads the file with its own simple reader, which cuts every line at the first #. A password with a # in it works for the node and fails for the command line. A hex password from openssl rand -hex avoids that and the quote problems above.

4Every divi.conf line

Any option the C++ node takes on its command line can also go in the file, without the leading dash. These are the ones worth knowing. Defaults come from divid -help for version 3.0.0.

LineWhat it doesIf you leave it out
testnet=1Use the test network. Data goes to testnet3/.The real network
rpcuser=
rpcpassword=
Name and password for divi-cli and any program using the command portSet them. Without them divi-cli cannot talk to the node.
rpcport=The command port51473, or 51475 on testnet
rpcallowip=Lets other machines use the command portThis computer only. Keep it that way.
rpcbind=Which address the command port listens onIgnored unless rpcallowip is also set
server=1Accept commandsdivid turns it on by itself. The desktop wallet needs it to accept commands.
daemon=1Run in the background and give the terminal backStays in the terminal window
port=The port other nodes connect to51472, or 51474 on testnet
listen=0Do not accept connections from other nodesAccepts them, unless proxy or connect is set
addnode=A node to connect to and stay connected to. Repeat the line for more.Finds nodes by itself
connect=Connect only to these nodes and no othersFinds nodes by itself
maxconnections=Most peers at once125
staking=0Do not stakeStakes (1)
txindex=1Keep an index of every transaction, so getrawtransaction finds any of themOff
addressindex=1Keep an index by address, for balance and history lookupsOff
dbcache=Memory for the chain database, in MB (4 to 4096)100
debug=Extra detail in debug.log, for example debug=net or debug=torNormal logging
printtoconsole=1Write the log to the screen instead of debug.logWrites debug.log
proxy=
listenonion=
torcontrol=
Route through Tor. See Run your node over Tor.Direct connections

On testnet the C++ node's command port is 51475 while IronDivi's is 51473. The peer port is 51474 for both. Running both on one computer works once you give one of them its own port and rpcport.

5Every irondivi.conf line

IronDivi version 0.2.6 acts on the settings below. Anything else gets the "Unknown configuration key" warning. The rows marked new did not exist in 0.2.5.

LineWhat it doesIf you leave it out
rpcuser = "…"
rpcpassword = "…"
Name and password for the command portNo password at all. Set both.
rpcport = 51473The command port51471, or 51473 on testnet
rpcbind = "…"Which address the command port listens on127.0.0.1, this computer only
port = 51474The port other nodes connect to51472, or 51474 on testnet
bind = "…"Which address that port listens on0.0.0.0, every address
listen = falseDo not accept connections from other nodesAccepts them
addnode = "…"Nodes to connect to. A single "host:port" or a list ["a:51474", "b:51474"].Finds nodes by itself
connect = "…"Connect only to these nodes. Also turns off looking for others.Finds nodes by itself
staking = falseDo not start staking at startupStakes
stakeonstaletip = trueStake even when the newest block is more than a day old. Only for restarting a stalled test network.Off
utxocachesize = 10000000Keep this many coin records in memory to sync faster. Ten million is about 500 MB.0, no cache
testnet = true
regtest = true
Which network, when the command line does not sayThe real network
daemon = trueRun in the background, as --daemon doesStays in the terminal
printtoconsole = trueWrite the log to the screen instead of debug.logWrites debug.log
txindex = false
spentindex = true
addressindex = true
Turn the indexes off or onTransaction index on, the other two off
maxlogsize = 3
maxlogfiles = 9
Size of one log file in MB, and how many to keep1 MB, 5 files
debug = 1Extra detail in the logNormal logging
proxy = "127.0.0.1:9050"New. Make outgoing connections through Tor or another SOCKS5 proxy. See Run your node over Tor.Direct connections
checkblocks = 100New. How many of the newest blocks to check at start; 0 checks all100
stakesplitthreshold = 20000New. The split size in DIVI that getstakingstatus reports20000
expire = "30d"New. Throw away block data older than this, to stake without the whole chainKeep everything
fullnode = "…"New. A node with the whole chain to stay connected to, so a node that throws data away can fetch old blocksNone

With staking = false the log says Staking disabled at startup (staking=false); use RPC setstaking true to start it. You can turn it on later without a restart, as shown in A tour of irondivi-cli.

6What 0.2.5 ignored in the file

IronDivi 0.2.5 read some settings from the file but did nothing with them: the network, daemon, printtoconsole, the indexes and the log size. Only the command line worked. Version 0.2.6 obeys all of them. We tried each one on 0.2.6, with nothing for it on the command line:

7The command line wins

When the same setting is in the file and on the command line, both nodes use the command line. We put rpcport in each file and a different one on the command line. Each node listened only on the command-line port, and the port from the file gave couldn't connect to server.

That makes the command line handy for a one-off change, such as a different port for a test, without editing the file. There is one exception: IronDivi adds an --addnode from the command line to the file's list instead of replacing it.

The command-line tools follow the same rule. If you start a node with --rpcport on its command line, pass the same --rpcport to irondivi-cli or divi-cli, because the file still has the old one.

Changes to either file take effect only when the node restarts. Stop the C++ node with divi-cli stop. Stop IronDivi 0.2.6 with irondivi-cli stop, or with a signal as Install IronDivi shows. (The stop command of IronDivi 0.2.5 answers but does not exit; on 0.2.5 use the signal.)

If something goes wrong

What you seeWhat to do
TOML parse error … invalid stringYou are on IronDivi 0.2.5, and a text value in irondivi.conf has no quotes. Write rpcuser = "name", or upgrade: 0.2.6 reads it.
duplicate keyYou are on IronDivi 0.2.5, and a setting appears twice in irondivi.conf. For several nodes use a list: addnode = ["a:51474", "b:51474"], or upgrade.
incorrect rpcuser or rpcpassword from divi-cliRemove any quotes around values in divi.conf, then restart the node.
HTTP 401 Unauthorized from irondivi-cliThe tool read a different file or password from the node. Pass the same --datadir and --testnet to both, and keep # out of the password.
RPC authentication disabled in IronDivi's logThat is IronDivi 0.2.5 with no password: anyone on the computer can use the wallet. Add both rpcuser and rpcpassword and restart, or upgrade.
Only one of rpcuser/rpcpassword is set in IronDivi's logAdd the missing one and restart. Until then the node uses its .cookie login.
Unknown configuration keyIronDivi does not know that setting. Check the spelling against the table above, or use the command-line flag.
IronDivi is on the real network although the file says testnetOn 0.2.5 the network comes only from the command line: start it with --testnet. On 0.2.6, check the Loaded config from line at the top of the log: the node read a different file.
A setting in divi.conf has no effectCheck the spelling: the C++ node ignores unknown lines silently. Check that no command-line option overrides it, and that the file is in the data folder, not inside testnet3.

Next: run your node as a service so it restarts by itself, or compare the two nodes in full.