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 is the other way round. The network comes from the command line, and each network has its own folder with its own irondivi.conf. 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
Text valuesNo quotesDouble quotes, always
Yes and no1 and 0true and false (1 and 0 also work)
Several valuesRepeat the lineOne line with a list: ["a", "b"]
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 with a divi.conf-style line refuses to start:

# irondivi.conf containing  rpcuser=tutf
Error: Failed to parse config file: "/home/you/.irondivi/testnet/irondivi.conf"

Caused by:
    TOML parse error at line 1, column 9
      |
    1 | rpcuser=tutf
      |         ^
    invalid string
    expected `"`, `'`

A setting written twice stops it too, with duplicate key `addnode` in document root. The C++ node does the opposite: it starts happily with quotes, 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 = "services.divi.domains: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 has no lock at all

If irondivi.conf is missing either rpcuser or rpcpassword, IronDivi does not refuse to start. It opens the command port with no check. Any program on the same computer can then use the wallet. The log says so:

WARN divi_rpc::server: RPC authentication disabled: set both rpcuser and rpcpassword

If you see that line, 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.5 acts on only the settings below. The ones in the next section are read but change nothing, and anything else gets the "Unknown configuration key" warning.

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

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 IronDivi's file cannot set

Some settings you would expect in the file are command-line only in IronDivi 0.2.5. They give no error in the file; they simply have no effect. We tried each one.

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.5 with a signal, as Install IronDivi shows, because its stop command answers but does not exit.

If something goes wrong

What you seeWhat to do
TOML parse error … invalid stringA text value in irondivi.conf has no quotes. Write rpcuser = "name".
duplicate keyA setting appears twice in irondivi.conf. For several nodes use a list: addnode = ["a:51474", "b:51474"].
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 logAdd both rpcuser and rpcpassword and restart.
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 testnetThe network comes only from the command line. Start it with --testnet.
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.