The command line
tadoru with no subcommand runs the server. Every subcommand reads or changes something and then
exits. Most of them work whether or not a server is running. Some need it running: health, cache show, the blocking commands and secret list. So do the zone commands list, records,
change, create, delete, enable and disable, which work on the zones of the running server.
A config command that changes something goes through the server’s socket where a server answers,
and takes the state root’s lock where none does. The accounts commands
let the database order the writers, and a backup copies a live state root. config validate asks a
running server to check server.toml, node.toml, blocking.toml and clients.toml, and reads a
file on its own where no server answers. config show asks nothing and reads on its own. blocklist import goes through the socket where a server answers, and takes the state root’s lock where none
does. Some need the server stopped, such as restore and rewrite, because they replace the files
the server is reading.
tadoru [--data-dir DIR] [--config-dir DIR] [--state-dir DIR] [--runtime-dir DIR] [config|accounts|blocklist|blocking|cache|acme|secret|regex-test|zone|health|dig|backup|restore|rewrite] ...The flags every command takes
Section titled “The flags every command takes”| Flag | Sets |
|---|---|
--data-dir DIR |
Both storage roots: DIR/config and DIR/state |
--config-dir DIR |
The config root, holding the text you edit |
--state-dir DIR |
The state root, holding what the server manages |
--runtime-dir DIR |
Where the API socket goes |
They are global, so they read the same before or after a subcommand.
tadoru config show --data-dir ./data means what tadoru --data-dir ./data config show
means. Install and run says what each root holds and what the defaults are.
--version prints the version, and the commit of the build after it where the build knew it
(Install and run says how). --help prints this, and tadoru <command> --help prints
one command’s own.
Which commands need the server stopped
Section titled “Which commands need the server stopped”| Command | With the server running |
|---|---|
config validate |
Works. The server checks the file, and it takes no lock |
config show |
Works. It reads the running configuration |
config apply |
Works. The change goes to the server over its socket |
config edit |
Works. The same way, and it sends the revision back |
config rollback |
Works. The same way |
config recover-pending |
Refused. It needs the state root to itself |
accounts ... |
Works. All five, reads and writes alike. Refused while a restore runs, and after one that stopped half-way |
blocklist export |
Works. It reads a file and takes no lock |
blocklist import |
Works. The server imports the file, sent over its socket |
blocklist status |
Works. It reads what the server is serving |
blocklist refresh |
Works. The server makes the pass |
blocklist accept |
Works. The same way |
blocking disable, enable, status |
Needs it. The switch lives in the memory of the server |
regex-test |
Works. Both forms read only, and neither takes a lock |
zone tlsa |
Works. It reads one certificate and no root |
zone list |
Needs it. It lists the zones that the server runs |
zone records |
Needs it. It reads the records that the server serves |
zone change |
Needs it. The server changes the records of the zone |
zone create |
Needs it. The server makes the zone |
zone delete |
Needs it. The server deletes the zone |
zone enable |
Needs it. The server turns the zone on |
zone disable |
Needs it. The server turns the zone off |
zone convert |
Needs it. The server changes the kind of the zone |
zone refresh |
Needs it. The server refreshes the stub zone |
zone export |
Works. It asks the server for the zone at its head |
zone checkpoint |
Works. The server makes the checkpoint at once |
zone import |
Works. The server imports the master file. --merge needs the server running |
zone freeze |
Works. The server waits for the updates of the zone, then freezes it |
zone thaw |
Works. The server reads the edit and thaws the zone |
zone clock resume |
Works. The server resumes its zone clock |
zone journal remake |
Refused. It writes the journal that the server holds |
zone journal cut |
Refused. It writes the journal that the server holds |
zone journal settle-freeze |
Refused. It writes the journal and control.sqlite, which the server holds |
zone witness list |
Refused. It reads serials.sqlite, which the server writes, as a file that nothing changes |
zone witness accept, raise, reset |
Refused. They write serials.sqlite and control.sqlite, which the server holds |
cache show |
Needs it. The cache is in the server’s memory |
cache flush |
Needs it, except --all, which then deletes the snapshot |
acme rotate-account-key |
Refused. The server writes the ACME account itself |
secret set |
Works. The server tries the value and writes it, sent over its socket |
secret clear |
Works. The server clears the secret |
secret list |
Needs it. It reads which secrets the server holds |
health |
Needs it. It reads the running server over the socket |
dig |
Works. It asks from its own process, and needs no server |
backup |
Works. With the lock where it is free, and live where it is not |
restore |
Refused. It replaces what the server is reading |
rewrite |
Refused. It replaces each state store that the server holds open |
Eleven commands need the server stopped. config recover-pending moves aside pending-lists.toml, which the
running server writes, so it takes the state root’s lock. restore replaces the files the server is reading, so it
takes the state root’s lock. rewrite replaces each state store with a copy of it, so it takes the
lock too. acme rotate-account-key writes the account key, which the
running server writes too. zone journal remake, zone journal cut and zone journal settle-freeze write the journal of a zone and
control.sqlite, which the server holds. The four commands of zone witness read or write the
serial witness, serials.sqlite, which the server writes at each change of a zone. Each of those
five also refuses while the mark of a restore that did not finish stands, as zone export does,
and writes nothing. zone checkpoint, zone freeze and zone thaw write them too. While the server runs, they
go to it over the socket, which does the checkpoint, the freeze or the thaw itself.
A config command asks the socket first. A configuration change writes files and flips
one pointer, and only one writer at a time can do that. A server that answers does the
work, and nobody there means the command does it itself under the lock. A socket it cannot
reach is refused rather than worked around.
An accounts command takes no lock of the state root. An account is a few statements in a
database, and the database is what orders them, so the command and the server can both write. The
last-administrator rule still holds, because the check and the change are one
transaction.
A restore can replace auth.sqlite, so it keeps the accounts commands out while it runs. Each
command holds auth.lock in the state root shared, list included. A restore holds it exclusive,
behind auth.gate. That gate keeps a new command out while the restore waits for one that runs. A
tadoru rewrite of auth.sqlite holds them the same way. A command that finds a restore or a
rewrite there refuses at once and reads and changes no account. Run it again when that has finished.
After a restore that stopped half-way, the commands refuse until the same archive runs again.
What proves the command to a running server is the kernel. The uid on the other end of the
socket arrives with the connection, and a server accepts its own uid and root. There is no
token to make and no password to type, and the audit trail records the uid that asked, as
uid:998. Another user in the server’s own group reaches the socket and gets nothing from this
path. They log in like any other client.
A refusal from restore says so and names the way in, which is to stop the server.
tadoru config
Section titled “tadoru config”# Check a file and change nothing. No lock, so this works any time. A running server checks# server.toml and node.toml as it would apply them.tadoru config validate ./data/config/server.tomltadoru config validate ./data/config/server.toml --json# Read the file alone, whatever runs: a file for another node.tadoru config validate --alone ./other-node/node.toml
# Print the running configuration, or one setting of it. No lock either.tadoru config showtadoru config show server.max_retries --json# A key of a table by its dotted name, and the table whole, which --json writes as an object.tadoru config show server.zones.default_ttltadoru config show server.zones --json
# Submit a file as a change, from a path or from standard input.tadoru config apply ./server.tomlcat server.toml | tadoru config apply - --as-file server.toml
# Open a file in $EDITOR, check what you save, and submit it.tadoru config edit server.toml# A name that the config root skips, such as notes~ or .notes, is refused by both.
# Run an older revision's configuration again, as a new revision.tadoru config rollback 4
# With the server stopped: set aside a record of owed lists that does not read.tadoru config recover-pending| Command | Argument | Options |
|---|---|---|
validate <file> |
A path or a name | --json, --alone |
show [setting] |
<file>.<setting> |
--json |
apply <file> |
A path, or - for stdin |
--as-file NAME |
edit <file> |
A file name | |
rollback <revision> |
A revision number | |
recover-pending |
validate takes a path or a config file’s name. A relative path that is not in the current
directory is read from the config root. So tadoru config validate server.toml means what
tadoru config edit server.toml means, and tadoru config validate zones/home-arpa works
from anywhere. The answer names the file it read, so there is no doubt about which one was
checked.
A zone is two files, so validate takes the zone’s directory and reads both:
tadoru config validate zones/home-arpa. Either file alone is refused, because the records
cannot be read without the name that zone.toml declares.
With a server running, validate sends server.toml, node.toml, blocking.toml or
clients.toml to the server’s dry run. The routes are POST /api/server/check, POST /api/node/check, POST /api/blocking/check or POST /api/clients/check, in API
Reference. The server checks the file as it would check config apply of the same file,
against the configuration that runs, and changes nothing. So it finds what the file alone cannot
show, for example a forward that points at this node. The answer says that the server checked it,
and against which revision:
./new/node.toml: valid. The running server checked it against revision 41Applied, these wait for a restart: udp_workersThe check binds no listener, so a port in use, or a port that the server may not take, is refused only when the change is applied- “runs this already” means that applying the file makes no revision.
- “wait for a restart” names the settings that apply only after the server restarts.
- “This answer is provisional” means that a zone owes the result of a change of its records. The server settles that first when you apply, and that can change the answer either way.
- The check never binds a listener, so a port in use passes here and
config applyrefuses it. The answer says so forserver.tomlandnode.toml, the two files that name listeners. - At most four checks wait for the server at once. Past that, the server answers that it is busy,
and
validatesays that the running server did not check the file. A save keeps at least four places, soconfig applystill goes through. Runvalidateagain in a moment.
With the server stopped, config apply and config edit check the forwarders of server.toml
against proxy settings. Those are the proxy settings of the node.toml of the active configuration,
not of the config root. That is the node.toml that the write pairs the file with. So an encrypted
forwarder with no addresses passes where the active configuration sends the forwarders through a
SOCKS5 proxy. An active configuration whose node.toml is gone, or differs from what was recorded
for it, is refused. validate takes no lock. So with no server to ask, and with --alone, it
checks the file alone. It leaves the routes of the forwarders to the write. With no server to ask,
it says so on the line after valid. With a server running, config apply and config edit leave
that check to the server, which makes it under the lock of its write.
A refusal of the server is a failure, with the file, the setting and the line. Where the server
names its own copy of the file, the message names the file that you passed instead. A server that
will not check now, for example one that is stopping or busy, is a failure too. The answer says The running server did not check the file, because nothing checked it.
A server that does not let your user check is not a refusal of the file. The socket admits the server’s own user and root. For any other user the file is read alone, and the answer says that the server did not let this user check.
The file is read alone, as with no server installed, when no server answers on the socket. It is
also read alone when the socket cannot be reached. The same holds when the server takes the request
and closes it, or gives no answer in 40 seconds. A server from before the dry run, an old process
during an upgrade, has no dry run of the file. Then the file is read alone too. A server without the
dry run of blocking.toml reads that file alone in the same way. A file other than these four, such
as zone.toml, is always read alone. So is every file with --alone. Use it for a file of another
node, which the configuration of this server must not decide. Use it also for a check of the file
without the running server. The answer then says valid. Read alone, because and the reason. The
exit code does not depend on who checked the file. It is 0 for a pass, and 1 for a refusal or a file
that nothing checked.
--json prints one object. checked_by is server or file. A pass of the server holds the
answer of the dry run: revision, unchanged, waits_for_restart and results_owed, with
listeners_bound: false. A refusal of the server holds valid: false, status, type,
problem and results_owed. A server that did not check the file gives checked: false in place
of valid, with status, type and problem. A file read alone holds read_alone, the reason.
validate reads a zone alone. A zone can also hold dynamic updates in its journal in the state
root, and validate does not read that journal. The server checks each zone with the updates of its
journal when you apply the change, and a change that it refuses writes nothing. So config apply
can still refuse an edit that validate passes. An example is an MX record at a name that an update
made an alias.
The name decides how a file is read, so a copy has to keep it. server.toml works, and
server.toml.new is refused with a message naming the files this build checks. A refusal
rather than a pass, because a pipeline reading “valid” from a file nothing looked at is
worse than no check at all.
apply from standard input needs --as-file, because there is no name to read. A file that you
pass to apply or validate and that is not there is refused before anything goes to the server.
apply and edit of blocking.toml or clients.toml work with the server running or stopped.
With a server running, they go over its socket (PUT /api/blocking or PUT /api/clients). A
configuration that does not hold one of the two files reads it as empty, because an absent file
means every default. So edit opens empty text, and the first save that writes something adds
the file. apply adds it too. A zone file is refused while the server runs. Stop the server to
change it.
edit keeps your text when the save fails: the server refused the file, or the server did not
answer. The message gives the reason, then the way back, and then the copy on its last line. The
way back names the root flags that you gave, such as --runtime-dir, and quotes a path that
holds a space:
To send it again, fix the copy and run: tadoru config apply /run/tadoru/edit-4242-1761480000-0-clients.toml --as-file clients.tomlA new `tadoru config edit clients.toml` opens the text that runs, and not this copywhat you typed is at /run/tadoru/edit-4242-1761480000-0-clients.tomlWhere a change landed while you typed, the server refuses the save. apply of the copy is not the
way back, because it replaces that change. The message says to run tadoru config edit again and to
carry your change over from the copy:
The configuration changed while you typed. Run `tadoru config edit clients.toml` again, and carry your change over from the copywhat you typed is at /run/tadoru/edit-4242-1761480000-0-clients.tomlA refused change is checked again when you send it again. So fix what refused it first. That can be the text, or the machine, such as a port in use or a certificate file that is not there yet. A change that landed is not applied twice: the same text sent again prints that the file is unchanged.
rollback writes the old content as a new revision rather than moving a pointer
backwards. The history keeps going forwards, so it loses nothing about which revision ran.
It is also the way out of a damaged generation, which
Troubleshooting covers.
recover-pending moves the record of owed lists, pending-lists.toml in the state root, to
pending-lists.toml.set-aside-<time>, in UTC, and changes nothing else. Run it with the server
stopped, then start the server.
It is the way out of a record that does not read. A save of a list that is not text, with a change
of blocking.toml that takes its source away, is applied as two changes. The server records the
list in pending-lists.toml before the first, so a stop between the two does not lose it. Where
that record is damaged, larger than 4 MiB, or of another history, the server applies no edit of a
file and says so. After recover-pending, the list is a file that no source names. It enters once a
path source names it. The next change writes the running list over it and keeps its bytes in
overwritten/.
A rollback keeps the serial of each zone going forward, so that a secondary takes the zone that it
puts back. It counts from the last serial that the apex served under any zone id, which the serial
witness serials.sqlite holds, and from each serial that the apex serves now, under any zone id.
The served serials are these:
- the serial of each zone at the apex in the running server, a stopped zone with the SOA of its files
- the serial of the files of each zone of the running revision at the apex
- for a dynamic zone, the serial after the last whole update in its journal. This applies where the running revision marks that journal and does not list the zone as unmarked
Take the case where one of them is ahead of the serial witness and the old records.zone of the
zone has a serial behind it. There the rollback writes the next serial by the serial scheme of the
zone into the SOA line of that file. It counts from the served serial that is ahead of the others.
Where the serial witness is ahead of each, or equal, the rollback keeps the serial of the old
revision. The revision then moves it past the serial witness as it serves the zone, once, with no
change of a record. A serial that is the same as the served one moves too, where the records differ.
The rest of the file stays as the old revision wrote it. Where an $INCLUDE line splits the file,
the rollback writes the whole zone into records.zone, and the log has a warning. The file that the
line named stays, and nothing reads it. A records.zone that ends in a backslash that escapes
nothing is written whole too, with the same records and without the backslash. A records.zone with
a backslash right before a CRLF line end keeps its layout. The rollback writes each such backslash
as \013, so the word keeps the CR and the warning goes.
A zone that the running revision does not hold, such as one deleted since, counts from the serial witness of its apex. The witness still holds the serials that the zone served. A zone whose name changed since counts from the name that the old revision gives it: the serials of the other name do not count.
A serial never refuses a rollback. Where no serial can be chosen, the rollback lands, and the zone
stops. It answers SERVFAIL for every name with the reason witness, and the health report names it.
That happens where no serial is ahead of every serial that the apex served or serves now. It happens
also where the file with the new serial passes the size bound of one file or of the whole
configuration. It happens where the file cannot take the serial, too. A restart lifts the stop: the
start judges the zone against the serial witness alone, and moves its serial past it.
A rollback with the server stopped holds no serial witness, and an apex with no row has nothing in it to count from. Such a rollback counts from what the zone serves now alone. With the server stopped, where it cannot choose a serial, it keeps the serial of the old revision with a warning in the log. The zone does not stop. The next start judges the zone against the serial witness, and moves its serial past it.
It reaches the ten revisions before the one running now. Their content stays on disk, and each
change deletes what is older than that. The history is longer than the content, because the audit
row for a change outlives its files. GET /api/revisions lists the history. GET /api/revisions/N/difference says what a rollback to revision N changes. A rollback to a revision
whose content is gone is refused with the name of the missing directory.
A rollback that changes a stub zone which holds the journal of a primary zone, or turns it into a
primary, is refused. This holds whether or not that journal ends in a freeze. The refusal says this stub holds the journal of a primary zone, and this rollback changes it. A rollback that removes the
stub, or leaves it as it is, goes through. Delete the stub with tadoru zone delete while the
server runs. Or, with the server stopped, roll back first to a revision that does not hold the stub.
Then roll back: the rollback makes the zone again. Before the start has read the journals, a
rollback that makes a zone over a journal that ends in a freeze is refused as for a frozen zone. So
wait for the start, then roll back.
While the server runs, each run of rollback sends one random Idempotency-Key of its own, and no
message shows it. The command sends the same rollback again, with the same key, where the answer is
lost. It does so also where the server answers 503, except 503 stopping, and where it answers
500. It tries four times at most, a second apart. The server answers a try after one that landed
with the answer of that one, so one run makes one rollback at most. A try after one that was refused
gets the reason of the first, from a 409 with the type /problems/already-refused. Where no try
settles, the command says that the rollback can have landed, and GET /api/revisions shows whether
it did. It says the same, and stops at once, in two cases after a try whose answer was lost. The
server stops, or it names a change that it has not settled. That try can have landed. A new run has
a new key, so where the first run landed, a new run makes a second revision with the same content.
apply means “make this file the configuration”, whatever is current, so a change that landed since
you read the file is replaced. edit is the stricter one. It sends the revision it started from,
and a change that arrived while you were typing is refused with the revision that moved. Your typing
is kept, and the message says where.
Nothing here writes a configuration file by itself. Every change goes through the same write path the API uses, which is what keeps one writer, one audit log and one sequence of revisions.
tadoru accounts
Section titled “tadoru accounts”An account is not configuration, so these are commands rather than settings in a file. Accounts has the roles and the rules about names and passwords.
# Who has an account, and what they may do.tadoru accounts list
# Make one. The password comes from a file, not an argument.tadoru accounts add alice --role admin --password-file ./passphrasetadoru accounts add bob --role viewer --display "Bob Smith"
# Change a role, set a password, remove an account.tadoru accounts role alice operatortadoru accounts password alice --password-file ./passphrasetadoru accounts remove alice| Command | Argument | Options |
|---|---|---|
list |
||
add <name> |
A name | --role ROLE, --password-file PATH, --display S |
role <name> <role> |
Both | |
password <name> |
A name | --password-file PATH |
remove <name> |
A name |
A password comes from a file rather than an argument, because an argument is in the process
list and in the shell’s history. add without one makes an account that cannot log in
until somebody sets a password.
All five work while the server runs. The API does the same over HTTP, for a browser or a script that has a token.
accounts password sets a password without the one being replaced, which is what makes it
the recovery path. Over the API, changing your own password takes the current one.
tadoru blocklist
Section titled “tadoru blocklist”Your own allowed and blocked names, as a plain file of names. Blocking says what those names do and how a published list fits beside them.
# Read a file of names into your own entries, as one change.tadoru blocklist import allow ./allowlist.txttadoru blocklist import block ./blocklist.txt
# Read a blocker regex list into your pattern rules.tadoru blocklist import regex ./regex.list
# Read from a pipe instead of a file.grep -v '^#' ./old-allow-list.txt | tadoru blocklist import allow -
# Write your entries out, one name per line, sorted.tadoru blocklist export allow > allowlist.txttadoru blocklist export block > blocklist.txt| Command | Arguments | Options |
|---|---|---|
import <which> <file> |
allow, block or regex, and a path or - |
|
export <which> |
allow or block |
|
blocklist status |
A list id, or none for all of them | |
blocklist refresh |
A list id | |
blocklist accept |
A list id | --checksum HEX |
The other three are about the published lists rather than your own entries:
# What every list is doing: what it serves, when it was read, and why a body was refused.tadoru blocklist statustadoru blocklist status hagezi-pro
# Read one list now, whatever its interval says.tadoru blocklist refresh hagezi-pro
# Serve the body the continuity gate refused, named by the checksum status shows.tadoru blocklist accept hagezi-pro --checksum 8f14e45fceea167a5a36dedd4bea2543474d7b1a5bfe6d3f6b2f1a3d7ba7f9c1All three work while the server runs. They ask it over its socket, the same way tadoru config apply does. They need no token on the machine itself. With the server stopped they take the state
root’s lock and do the work themselves. For status that means reading what the server wrote last.
For the other two it means fetching the list here and now. A list with a path is read from the
running revision, as the server reads it, not from the config root. Where you edited the file or
blocking.toml by hand while the server was stopped, refresh says that the edit waits for the
next start. Before the first start no revision runs, so refresh of a list with a path is
refused: start the server once. With the server stopped, refresh fetches through the outbound
proxy of the running revision, with the password in secrets/node/, as the server does. It never
fetches direct where the proxy fails.
status prints a block per list. The block says where the list reads from, its action, what it is
serving, and when the body arrived. It also says what the last pass did, how often it is read, and
the problem where there is one. A refused body is printed with the command that accepts it, so you
can copy the line. The action is block or allow, and the count of rules beside serving counts
the rules of that action. So for a list that blocks, which is every list today, the @@ lines of
the list are not in it.
refresh does not change when the list is next read on its own. It is an extra read, not a
new schedule. One pass runs at a time, so a refresh asked for while the server is reading its
lists is refused and says so.
accept passes the continuity gate and nothing else. Blocking says which
gate refuses what, and which setting changes it. The checksum is required: it names one body
rather than “whatever arrives next”, so this cannot become a habit that turns the gate off. If
the list refused a different body while you were reading, the answer says which one it holds
now.
An import adds. It never takes a name away, so running the same file twice changes nothing
the second time and says so. To remove a name, edit blocking.toml.
An import is all or nothing. One line that is not a name refuses the whole file, and the message names the line and says what is wrong with it. Half an allow list is worse than none, because you would believe the file landed.
Three shapes of line are read: a bare name, *.name, and a hosts line whose address is
0.0.0.0, 127.0.0.1 or ::1. A hosts line naming several names imports all of them. A
comment and a blank line are skipped. A hosts line to any other address is skipped, because
that is somebody’s real mapping and not a rule. An Adblock Plus rule such as
||ads.example.com^ is refused, because this build does not read that syntax yet.
Each list holds 10,000 entries, and one file of names holds 4 mebibytes. An import that would pass either says so and writes nothing.
import regex reads a blocker regex list into your pattern rules instead. Each line becomes
one rule: the pattern, then the ;querytype=, ;reply= and ;invert modifiers. A blank line
and a # comment are skipped. One revision carries 200 pattern rules.
;reply=NXDOMAIN and ;reply=NODATA become that rule’s answer. ;reply=IP answers the
address block_v4 or block_v6 holds, and the import refuses the file where blocking.toml
names neither. A negated query type such as ;querytype=!A is refused, because no rule here
says “every type except this one”. Any other ;reply= value is refused, and so is any other
modifier. A refusal names the line, and nothing is imported.
A query type this build does not name by word is refused as well. Write the number form, such
as ;querytype=TYPE18 for AFSDB. A common blocker’s ;querytype=OTHER has no form here, because it is
a class of query rather than a type.
An import adds a rule the file does not hold yet. The pattern, the action, the query types, the
groups, invert and the answer together decide whether two rules are one rule. So a rule you
wrote for one group stays, and the imported rule covers every group beside it.
With the server stopped, an import needs blocking.toml in the config root to be what the
configuration holds. They differ after an edit nobody applied, and the refusal names the revision
and says to run tadoru config apply blocking.toml first. Applying your edit and then importing is
two changes, and both are in the audit trail.
An import while the server runs
Section titled “An import while the server runs”Where a server answers on the socket of the runtime directory, the import goes to it, as POST /api/blocking/import. The socket of --runtime-dir chooses the server, whatever --config-dir and
--state-dir say. Those two choose where an import with no server writes. The command reads the
file first, with the same reader, so a bad line is refused with the same words and nothing is sent.
The server reads blocking.toml of the revision that runs, not the file in the config root. The
change lands as one revision with the uid of the command in its audit row. On its socket the server
takes the word of root and of the user that it runs as, and of no other user.
Each run makes one random Idempotency-Key. Where an answer is lost, or is a 503 or a 500 that
settles nothing, the command sends the import again. It uses the same key and the same bytes. It
tries at most four times, the first included, a second or more apart. A wait past 40 seconds for an
answer counts as a lost answer. It waits what Retry-After asks for, up to 10 seconds, and stops
where the server asks for more. A try after one that landed gets the answer of that one, so one run
makes one revision. The line then says that a try whose answer was lost made it, and gives no count,
because the server keeps none. The server keeps the key in its ledger, in its
state root. So this holds across a restart of the same server over the same roots. A server over
other roots at the same socket never saw the first try, and takes the import as a new one.
The key makes a record of each import. So a file that adds nothing still makes a revision of its
own, with the same blocking.toml, and the line says so:
revision 12 records this import: every one of the 3 names were already in the block list, so the entries did not changeWhere no answer settles the run, the command says that the import can have landed. It then reads
what runs over the same socket. It says how many of the names of the file the running revision
holds, and names any command that an answer named. What runs now is not what the run did: another
change can have added or taken out the same names. The message ends with the command to run again.
The command has each root of this run, --config-dir, --state-dir and --runtime-dir, and the
file, each as an absolute path. So a run again works from any directory and reaches the same
installation. This holds also where the server stopped meanwhile and the run again takes the path
with no server. A run again is safe: an import only adds, and where nothing is missing it makes one
more revision. A refusal that the server keeps under the key, such as a bad line or a list past its
bound, says that nothing was imported.
An export writes your entries and nothing from a published source. The names in a source belong to
that source. A copy of two million of them is somebody else’s list with the provenance stripped off.
A note beside an entry is written as a # comment above the name, so you keep it and read it. It
goes nowhere on the way back in, because a comment is a comment.
export reads the file in the config root, so it works while the server runs.
tadoru regex-test
Section titled “tadoru regex-test”Say what a pattern does, before you write it or after it is running.
# Does this pattern block these names?tadoru regex-test '^ad[sx]?[0-9]*\.' ads.example.com img.example.com
# The same pattern as an inverted rule, which blocks the names it does not match.tadoru regex-test --invert '^school\.' school.example.com ads.example.com
# What do the rules of the running configuration say about a name?tadoru regex-test --running www.example.com
# Ask as another query type. A rule that names types applies to those and no other.tadoru regex-test --running --type AAAA www.example.com| Argument or option | Means |
|---|---|
WORD ... |
A pattern and then the names, or only the names with --running |
--running |
Ask the pattern rules of the running revision |
--type TYPE |
The query type to ask as, A by default |
--invert |
Read the pattern as an inverted rule. Not with --running |
Both forms are read-only. They write nothing, they take no lock, and neither is a change. A server that is running changes none of that, so both answer at any time.
The first form reads no file at all, not even bootstrap.toml. It compiles the pattern as a
block rule. Each name then goes through the same matcher a query goes through. So a pattern
this refuses is a pattern blocking.toml refuses.
--invert shows the hazard. An inverted rule fires for every name the pattern does not match.
An inverted block rule therefore blocks the whole internet apart from what it matches. Nothing
refuses such a rule, and this is how you see what one does before it is running.
The second form reads the running revision and answers per group. A rule can name groups, and
a group can hold rules no other group holds. The answer names the rule that matches, the group,
and the answer that rule carries for the query type you asked as. A group that sets
blocking = false tests nothing, and the answer says so instead of naming a rule.
Right after you adopt a change, this reports the new revision. The server can answer a query from the one before it for a moment longer, because this reads the pointer rather than the server.
The second form tests the pattern rules and no name rule, so it is not the whole decision. Your
block list and the published lists are read first, and a name one of them blocks keeps that
answer rather than the rule’s. A name marked no pattern rule matches can still be blocked by
one of them. An allow rule that matches cancels a block from either. The kill switch and a
bypass client cancel a block as well, and this applies neither.
A query type is a word such as A or AAAA. For a type this build does not name by word, write
the number form, such as TYPE18. An unknown word is refused and the message names the number form.
Blocking says where a pattern sits in the order, and why an inverted rule is the one to look at first.
tadoru zone
Section titled “tadoru zone”Use tadoru zone to do these things:
- print a record that a tool computes;
- list the zones of the running server, and print the records of one;
- make a zone in the running server, delete one, or turn one on or off;
- take a zone out of the configuration as one master file, and put one in;
- write the updates of a zone into its files;
- freeze a zone for a hand edit, and thaw it;
- make the journal of a zone again, and state whether a zone was frozen;
- read and write the serial witness;
- resume the zone clock.
zone tlsa prints the TLSA record that matches a certificate. A DANE client compares the
certificate that a TLS server shows with this record. A wrong hash makes it refuse the server. So
the command takes the hash from the certificate itself.
tadoru zone tlsa /etc/tadoru/certificate.pem --name dns.home.arpa# _443._tcp.dns.home.arpa. IN TLSA 3 1 1 DD6D23ED338B24A325764C9639D762089DC276A9E83FEF2D74E9042BCADA9A77tadoru zone tlsa certificate.pem --port 853# _853._tcp IN TLSA 3 1 1 DD6D23ED...| Command | Argument | Options |
|---|---|---|
zone tlsa |
A PEM certificate file | --usage, --selector, --matching, --port, --protocol, --name |
zone list |
none | --json |
zone records |
A zone, by its directory under zones/ |
--json |
zone change |
A zone, by its directory under zones/ |
--add, --remove, --off, --on, --ttl, --replace, --comment, --no-comment, --expires, --no-expires |
zone create |
The id of the new zone, its directory under zones/ |
--name, --name-server, --address |
zone delete |
A zone, by its directory under zones/ |
none |
zone enable |
A zone, by its directory under zones/ |
none |
zone disable |
A zone, by its directory under zones/ |
none |
zone convert |
A zone, by its directory under zones/ |
--kind, --name-server, --address, --serial, --primary, --server, --id, --check |
zone refresh |
A stub zone, by its directory under zones/ |
none |
zone export |
A zone, by its directory under zones/ |
none |
zone import |
A zone, and a master file or - for standard input |
--name, --serial, --replace, --merge, --replace-sets |
zone checkpoint |
A zone, by its directory under zones/ |
none |
zone freeze |
A zone, by its directory under zones/ |
none |
zone thaw |
A zone, by its directory under zones/ |
--serial-bump |
zone journal remake |
A zone, by its directory under zones/ |
none |
zone journal cut |
A zone, by its directory under zones/ |
--at |
zone journal settle-freeze |
A zone, by its directory under zones/ |
--not-frozen or --frozen-at |
zone witness list |
none | none |
zone witness accept |
none | --max-expire |
zone witness raise |
An apex, and a serial | --max-expire, --old-serials |
zone witness reset |
An apex | none |
zone clock resume |
none | none |
| Option | Default | Values |
|---|---|---|
--usage |
dane-ee |
pkix-ta, pkix-ee, dane-ta, dane-ee |
--selector |
spki |
cert, the whole certificate, or spki, its public key |
--matching |
sha2-256 |
full, sha2-256, sha2-512 |
--port |
443 |
The port of the service |
--protocol |
tcp |
tcp, udp, sctp |
--name |
none | The host name. Without it the line starts with _443._tcp |
The command reads the first certificate of the file and prints one line. Paste it into the
records.zone of the zone that holds the name. Without --name, the owner is the two labels of the
port, which the zone file completes with its own name. The defaults, 3 1 1, name the public key of
the server’s own certificate. A certificate that renews with the same key keeps the record valid.
One that renews with a new key needs a new record beside the old one. The new certificate serves
only after a client’s cached TLSA set has expired. Wait the lifetime of the set before you switch,
then delete the old record (RFC 7671 section 8.1). The command hashes the first certificate of the
file. For dane-ta or pkix-ta, give the file of the issuing certificate. The command takes no
lock and reads no root, so it works with or without a server.
zone export prints a zone as one master file. BIND reads the text, and so does zone import. A
record with a refresh time ends its line with its ;refreshed= mark, which another server reads as
a comment. Each record keeps its comment at the end of its line (The comment of a
record). A zone with ANAME records prints them too, and the
command names them on standard error, because this server alone reads those lines.
Run zone export as the user of the server or as root. It asks the server over its socket, or it
takes the lock of the state root and reads control.sqlite. Each of them is the server’s alone:
sudo -u tadoru tadoru zone export home-arpa > home.arpa.zoneWith the server stopped, the command takes the lock of the state root and prints the zone at its
head. That is the files with the updates of its journal applied, as the server serves them after a
start. It reads every file of the running revision, each checked against what was recorded for it,
as the start reads them. So a damaged file of any zone stops it as it stops the start. It writes no
file of the state root and makes none. It reads control.sqlite as a file that nothing changes, so
a control.sqlite that is missing is refused and stays missing. A log that the last run left beside
it is refused with the advice to start the server once. So are an older schema, a command that the
last run did not finish, and a thaw that waits for its append. A zone that the start would stop, for
its journal or for the checks across the files, is refused with the reason. A journal that ends in a
torn append is read up to it, and the command says so on standard error. A frozen zone prints the
zone at its freeze. An edit of its files in the config root is not in it until the thaw.
While the export holds the lock, a start of the server fails with the lock refusal. The command says on standard error that it holds the lock. Start the server again once the export ends.
While the server runs, the command asks it over its socket for the zone at its head. It asks for the zone as the server serves it, with every update that it accepted. A refusal of the server is the refusal of the command, with what the server said. A zone that it does not hold answers 404. A zone that it stops for its journal answers 503. The command then reads nothing else. Where another command line holds the state root, such as a restore, and no server answers, the export refuses. So does a state root that a restore did not finish.
zone import makes a zone from a master file, or replaces the records of a zone, in one revision.
--name makes a new zone that answers for that name, with its zone.toml and its records.zone.
--serial SCHEME goes with --name, and writes serial = "SCHEME" into the zone.toml of the new
zone. The scheme is increment, unixtime or date, the values of serial in a zone.toml.
Without it, the zone takes zones.serial of server.toml. The SOA of the file keeps its serial,
and the scheme moves it at the next change.
--replace replaces the records of a zone that exists, and takes out the other master files of
that zone. The file must hold all the records of the zone, so an $INCLUDE in it is refused. The
command keeps the text of the file as it is, with its comments. The file is up to 16 MiB, the bound
of one master file.
While the server runs, the import goes to it over the socket, as the user of the server or as root.
The server checks the file and applies it. --replace reads the zone first, and sends the entity
tag of that read, so a change that lands between the two is not written over. Each run sends one key
of its own with the import. Where an answer is lost, or the server says that it has not settled, the
command sends the same import again, with the same key. It tries up to four times. The server
answers a try after one that landed with the answer of that one. So a retry never writes over a
change that landed after it, and a zone that exists for --name is never one this run made. With
the key, the same file again is a revision of its own, with the same files. The command waits 40
seconds for each answer, past the 35 seconds that the server gives a request.
A zone that takes updates takes no import, in any state. The server refuses a hand edit of it, and
a frozen zone takes its records from the configuration root alone. Run tadoru zone freeze, copy
the file to zones/<id>/records.zone in the configuration root, then run tadoru zone thaw. The
refusal says so.
With the server stopped, the import takes the lock of the state root. Where the files of the zone in the config root differ from the running configuration, it refuses. The root holds an edit that the server has not applied, or misses a revision that the server has not written into it. Start the server, which settles the two, and import again.
tadoru zone export home-arpa > home.arpa.zonetadoru zone import home-arpa --replace home.arpa.zonetadoru zone import lab --name lab.example.org lab.zonetadoru zone import lab --name lab.example.org --serial date lab.zoneThe export can be larger than the files of the zone, because it writes every name in full. An export of more than 16 MiB, which is what one master file holds, does not import.
--merge adds the records of a file to a zone that exists, and keeps the other records of the zone.
It goes into the journal of the zone as one change of records, as zone change does, and moves the
serial at most once. The names of the file are relative to the name of the zone. Each record of the
file is an add, with the lifetime that the file gives it. The file is up to 1 MiB, with 10,000
records at most, and an $INCLUDE line is refused. The SOA records of the file and its ;off lines
are skipped and counted, because the zone keeps its own SOA. A record that the zone does not serve
takes the comment and the expiry time that the file gives it. A record that the zone serves keeps
its own.
--merge --replace-sets also replaces each set that the file names. The records of such a set that
the file does not hold leave the zone. Each record of the set takes the notes of the file, so a note
that the file does not give is cleared. The sets that the file does not name stay as they are.
tadoru zone import lab --merge more.zonetadoru zone import lab --merge --replace-sets more.zone$ tadoru zone import lab --merge more.zonezone lab: 2 added, 0 removed, 3 in effect already, 1 skipped. The serial is 9$ tadoru zone import lab --merge more.zonezone lab: every record of more.zone is in effect already, 1 skipped. The serial stays 9A merge needs the server running, as the user of the server or as root. Only the running server
writes the journal of the zone. With the server stopped, the command refuses before it reads the
file, and names --replace for a file that holds every record of the zone. The command reads the
version of the records first. It sends the merge against it with a key of its own, with the tries of
zone change. So a merge whose answer was lost is never applied twice. If the records moved in
between, the server refuses the merge with 409, and nothing of the run landed. A refusal at a
record of the file names the line of the file where the record starts. The name reads like line 3 of more.zone, and the text of the line follows.
zone list prints one line for each zone of the running server. The line holds its id, its name,
its kind and its state. It holds its serial and its count of records, with how many of them ;off
lines turn off. The kind is primary, or stub for a stub zone where the server lists those, with
no serial and no count. The state is dynamic for a zone with an update policy, frozen with the
time of the freeze in UTC, or static. Where a zone does not answer as usual, the line ends with
what it answers and why: off for a zone turned off, stopped for one that the server stops for
its journal, at_files and unsettled. A zone that answers SERVFAIL, or takes no
update says what each means.
--json prints the answer of the server, one object for each zone.
$ tadoru zone listhome-arpa home.arpa. primary dynamic serial 2026101901 12 recordslab lab.test. primary frozen since 2026-10-19 08:12:40 UTC serial 7 4 records, 1 offold old.test. primary static serial 3 2 records off: zone.toml turns the zone off, so it answers no name and takes no updatecorp corp.example. stub staticzone records prints the records of a zone of the running server, one line of a master file each.
They are as the server serves them, with every update applied. A record that an ;off line turns
off prints as that line. --json prints the answer of the server, with the records of every page in
one list. The server gives the records in pages of up to a thousand, in the order of their owners
and types. Where the version of the records of the zone moves between two pages, the command reads
the records again from the first page. An update, a checkpoint and an edit of a file of the zone
move it. So does an edit that changes no record, such as a comment. A change of another zone does
not. Where that happens at each of three reads, the command says so. Run it again. A page that does
not read is refused, and the command prints nothing of the zone. It needs the server running, as the
user of the server or as root. A stub zone holds no records of its own. The command says that its
servers are in the files of its directory under zones/ in the configuration root.
$ tadoru zone records lablab.test. 300 IN NS ns.lab.test.lab.test. 300 IN SOA ns.lab.test. admin.lab.test. 7 3600 600 604800 300ns.lab.test. 300 IN A 192.0.2.53 ; changed 2026-11-01T10:00:00Z;off www.lab.test. 300 IN A 192.0.2.9 ; changed 2026-11-01T10:01:01ZA record whose last change this server saw ends its line with a comment, ; changed <time>, in UTC.
A master file reads it as a comment, so the output still reads as a master file. If you import the
output into a zone, each such text becomes the comment of its record, as changed <time>. Delete
the comments first where you do not want them. A record with no known time has no comment. That
holds for a record from before the server kept times, and for every record after a restore of a
backup. It holds for every record of a zone changed while the server was stopped. It holds also for
a zone where the server could not keep a time exact (Change times of records that are not
known). Each machine keeps its own
times. --json gives the time of each record as modified_at, in seconds since 1970, and leaves
the field out where there is no time.
zone change changes the records of a zone of the running server in one step, and moves its serial
once. --add adds a record, --remove removes one, --off turns one off and --on turns one
back on. Each takes one record as a master file line with every name absolute, in the form that
zone records prints. A line with no lifetime takes the lifetime of its set. --ttl OWNER TYPE SECONDS sets the lifetime of a whole set, from 0 to 2147483647. You can give each option more than
once, and you must give at least one.
--replace OWNER TYPE replaces a whole set. Each record of the set that no --add, --remove,
--off or --on of the run names leaves the zone. So --replace with the --add lines of the new
set leaves the set with those records alone. A record of the set that is turned off stays off.
Four options change the notes of a record. Each one takes the record as a master file line:
--comment RECORD TEXTsets the comment of the record. A comment that starts with-cannot be set from the command line, because the command reads it as an option. Set it in the console or through the API.--no-comment RECORDclears the comment.--expires RECORD TIMEsets the time that the record expires. The time is seconds since 1970, such as4070908800, or a time in UTC with whole seconds, such as2099-01-01T00:00:00Z. Only a zone withrecord_expiry = truetakes an expiry time.--no-expires RECORDclears the expiry time, so the record stays.
The options of one record go to the server as one note. So a comment and an expiry time of one
record are one line of the report. Two options that set one field of one record, such as --comment
and --no-comment, are refused before the command sends anything. The command matches a record by
its text. Two spellings of one record, such as with and without the lifetime, make two notes, and
the server refuses them as named-twice. A note changes no record, so a change of notes alone keeps
the serial.
tadoru zone change lab --add "www.lab.test. IN A 192.0.2.9" --remove "old.lab.test. IN A 192.0.2.8"tadoru zone change lab --off "www.lab.test. IN A 192.0.2.9"tadoru zone change lab --ttl www.lab.test. A 600tadoru zone change lab --replace www.lab.test. A --add "www.lab.test. IN A 192.0.2.10"tadoru zone change lab --comment "www.lab.test. IN A 192.0.2.10" "the web" --expires "www.lab.test. IN A 192.0.2.10" 2099-01-01T00:00:00Ztadoru zone change lab --no-comment "www.lab.test. IN A 192.0.2.10" --no-expires "www.lab.test. IN A 192.0.2.10"$ tadoru zone change lab --add "a.lab.test. IN A 192.0.2.1" --add "www.lab.test. IN A 192.0.2.9"zone lab: 1 line acted, 1 in effect already. The serial is 8in effect already: --add www.lab.test. IN A 192.0.2.9A line acts where the zone is not as the line says. It is in effect already where the zone is. So the same command again changes nothing, and the command lists the lines that were in effect already. A removal with a typo in its data reads as in effect, so check that list.
The command reads the version of the records first, as zone records does, and sends the change
against it. If the records of the zone moved in between, the server refuses the change with 409.
The command then says that nothing of the run landed. Run it again, which reads the version again.
A change of another zone does not move the version.
Each run sends a random Idempotency-Key of its own, and no message shows it. The command sends the
same change again, with the same key and the same version, in these cases:
- The answer is lost.
- The server answers
503. - The server answers
500with a problem that keeps no record, such asinternal.
It tries four times at most. It waits the seconds that Retry-After names, and at least one second.
If the server asks for more than ten seconds, the command stops and prints the wait. A try that
landed is never applied twice, because the server answers a repeat of the key with the answer of the
first try. The route asks for a new try after a 429 too. The command does not send it again,
because the wait of a 429 is usually long. It prints the wait that the server names.
A 500 never means that nothing landed. The command says that the change can have landed, and
zone records shows what the zone serves. It says the same where no try settled after a lost
answer. Run the command again then. It is safe, because a line acts only where the zone differs.
A new run makes a new key, so a refusal that the server kept for an earlier run never blocks it.
A refusal of a rule names the rule, the option and the number of the line, such as line 2 of --off. A refusal at a note names the record of the note, such as the note of www.lab.test. IN A 192.0.2.10. The command needs the server running, as the user of the server or as root. The server
refuses a frozen zone and a zone that is turned off. It refuses a stub zone, and a zone that is not
a primary in one file (kind).
zone create makes a primary zone in the running server, in one revision. The revision holds its
zone.toml and a records.zone. That file holds the defaults, with the SOA record and the NS
record of one name server. --name-server names that server, and without it the command takes
zones.name_server of server.toml. Give --address once for each address of the name server,
where the name server is inside the zone. zone delete deletes the directory of a zone, in one
revision. It refuses a frozen zone, so thaw it first. zone enable and zone disable set enabled
in the zone.toml of a zone. A zone turned off answers no name, and its names go to the next route.
The two commands read the zone, and send the change with the revision that they read. A zone that is
on or off already changes nothing, and the command says so. zone delete deletes a stub zone too,
with its files, and zone enable and zone disable turn a stub zone on and off. A stub that holds
the journal of a primary zone refuses them, and the command gives the words of the server. zone create and zone change do not make or change a stub zone.
tadoru zone create lab --name lab.test --name-server ns.lab.test --address 192.0.2.53tadoru zone disable labtadoru zone enable labtadoru zone delete labThe five commands need the server running, and go to it over the socket, as the user of the server or as root. With no server, each says so and changes nothing. Start the server, then run the command again. Each change is one revision. The server refuses what it refuses for the same edit of the files, such as a change of a frozen zone. Where the answer of a change is lost, such as when the command is stopped, run it again:
- A create of a zone that exists is refused. The refusal says that the create sent before can have
landed, and
zone listshows the zone. The id can also name a stub zone, and the refusal says that too. - A delete of a zone that is not there is refused, and the refusal says that the delete sent before
can have landed.
zone deletedeletes a stub zone too, so the refusal names no stub. An older server that does not delete a stub answers with a refusal that names it. The command then says that the id names a stub zone. zone enableandzone disableread the zone again. Where the change sent before landed, the server finds that the change changes nothing. The command says that the zone is on or off already. Where the configuration moved between the read and the change, the server refuses the change, and the command says so. Run it again, which reads the zone again.- A change that the server has not settled when it answers can have landed. The refusal says so,
and
zone listshows whether it did. These commands send noIdempotency-Key, so the advice of the server to send the same key again does not apply to them.
zone convert changes the kind of a zone of the running server in one revision: a primary becomes
a stub, a stub becomes a primary, and a stub changes between its servers and its primaries. The zone
keeps its apex. --kind is primary or stub, and a stub that changes its source names stub
again. The options are the keys of POST /api/zones/{id}/convert. A primary takes --name-server,
--address and --serial. A stub
takes --primary once for each primary, an address with a port or without one, or --server once
for each server of a static stub, as NAME or NAME=ADDRESS,ADDRESS. --id moves the zone to a
new id in the same revision. The command sends the keys that you gave, and the server refuses a key
that the new kind does not take. It reads the zone first and sends the convert against the entity
tag of that read, so a change that landed in between is refused. It sends an Idempotency-Key of
its own run. A 503, a lost answer and a 500 that the server keeps no row of go again with the same
key, up to four tries, so a try after one that landed gets its answer. It prints the revision, the
command that the server recorded, and the keys of the old zone.toml that went over (carried)
and that were dropped (dropped). --check asks the server to check the convert as its save
would, with no read and no key, prints the same lists, and changes nothing. It also says where the
convert would change nothing because it landed already, and where the answer is provisional
because a zone owes a result. A zone that holds the journal of a primary, a frozen primary, and a
zone that is of the kind already are refused with the words of the server. Where the answer of a
convert is lost, zone list shows whether the zone is a primary or a stub, and GET /api/zones/{id} shows the source of a stub, static or learned, as stub.source. A run again that
finds the kind already is refused with that note.
zone refresh asks a stub zone that learns its servers from primaries to ask them now, before its
timers do. The server starts a refresh at most once a minute for a zone, counted from the start of
the last try. The command prints whether the ask started a refresh (started), whether one runs
(running), whether the zone waits for a free place (queued), and the time from which an ask
can start one (next refresh at). GET /api/zones/{id} shows the result, as stub.last_try. A
primary holds its own records and needs no refresh, so it is refused. A static stub and a stub that
is turned off are refused too. A task that is busy or that does not follow
the zone yet is refused too, and nothing starts, so run the command again. The command sends no key.
tadoru zone convert lab --kind stub --primary 192.0.2.1 --checktadoru zone convert lab --kind stub --primary 192.0.2.1tadoru zone refresh labzone checkpoint writes the updates of the journal of a zone into its records.zone, as a new
revision. The server makes such a checkpoint on its own once the journal of a zone passes its
limits. It makes none for a zone that the configuration lists as unmarked. Nothing binds the
journal of such a zone to its files, for example after a rollback. Such a zone takes no update, and
it counts one whole master file in the room of the set. This command binds its journal to its files
again, where its journal is whole. A zone whose files hold every update gets no new revision, and
the command says so.
The new records.zone keeps the comments and the layout of the old one where that text fits. It
must fit what the other zones leave of the room of the set. Otherwise the command writes the export
of the zone, as zone export prints it, and says so. The export keeps the comment of each record
and drops the other comments and the layout. The revisions before it keep the old text. To count
that room, the command first reads the running revision with the journal of each zone. It reads them
as the next start does, and writes nothing while it reads. The start repairs some journals first,
such as a torn append that it cuts. Such a zone counts one whole master file. Where that read fails,
the command says why, and a checkpoint that it makes writes the export.
The audit records the checkpoint with the origin api and the name of the user who ran it. While
the server runs, the command goes to it over the socket as POST /api/zones/{id}/checkpoint. The
server makes the checkpoint at once, and does not give way to the updates that wait, as its own
checkpoints do. The audit then names the uid, such as uid:998. The command sends a key of its own
run. The answer can be lost, or say that the checkpoint has not settled yet. The command then asks
again with the same key, so it gets what the first try did and makes no second checkpoint. The
server answers 409 for a frozen zone, a stopped zone, and a zone whose last update did not
settle, and says what settles it.
With the server stopped, the command takes the state root itself. It writes nothing where it refuses. It refuses these states, which a start settles first. Start the server once, stop it, and run the command again:
- a restore of the state root that did not finish
- a command that the last run left unfinished, which the checkpoint overtakes
- an edit in the configuration root that the running revision does not hold yet, which the checkpoint writes over
- an
updates.jnl.newof the zone that a writer left - a journal of the zone that ends in a torn append
It also refuses a running revision that fails the checks of this machine, such as a listener that cannot bind. The next start refuses it too. It refuses these zones, and names the way out where there is one:
- a zone that the running revision does not hold, and a zone with no journal
- a frozen zone, whose thaw writes its files
- a zone that the server stops, for example for a damaged journal. Where the ledger anchors the
journal,
zone journal cutkeeps the whole frames before the damage. Otherwisezone journal remakemakes it again. - a journal of another zone, and a zone that serves its files and is not listed as unmarked.
zone journal remakemakes its journal again, and drops the updates past its files. - a listed zone whose journal is not whole
tadoru zone checkpoint home-arpa# checkpointed zone home-arpa as revision 13. Its files hold the updates of its journal. Start the servertadoru zone checkpoint home-arpa# zone home-arpa is at its files already in revision 13, and this run wrote nothingzone freeze makes a hand edit of a dynamic zone safe. Where updates sit in the journal past the
files of the zone, it first writes them into records.zone, as a new revision. It then appends a
freeze to the journal. A zone whose files hold every update gets no new revision. The freeze records
the serial of the zone. The zone then answers as before, but it takes no update and no checkpoint
until its thaw. A zone with no journal gets one that holds the freeze alone. A second run on a
frozen zone writes nothing and says so. The command refuses a zone that the server stops, or whose
last update did not settle. It refuses a zone that the configuration does not hold, or that its
configuration turns off. It refuses a zone that serves its files, because nothing says which updates
its files hold. The refusal names the way out for its reason. Where the reason is the journal is missing, and the next update makes it again, make one update of the zone first. Make a change of
its records through POST /api/zones/{id}/records, or an RFC 2136 update that its update policy
allows. A zone that $INCLUDE splits over more than one file takes no change through the records
route, so only the RFC 2136 update works there. The update makes the journal again, and then the
freeze works. Troubleshooting lists the other reasons. It also refuses while a
command waits that the next start settles. While the server runs, the command goes to it over the
socket. The server first waits for the updates of the zone that it already took, at most for the
deadline of a query. So they apply before the freeze. There a second run on a frozen zone is
refused, because a freeze whose answer was lost can have landed. With the server stopped, the
command takes the state root itself. While the zone is frozen, config edit, config apply and
zone import --replace refuse to change its files. Edit them in the configuration root with an
editor instead.
zone clock resume ends a hold of the zone clock, the clock that the expiry sweep of a record
reads. A step of the wall clock and a start after a crash hold that clock. So do a lost or damaged
aging.clock and a failed write of it. No record expires while it holds. The resume trusts the wall
clock as it is, so set the clock of the host first. A wall clock that reads earlier than this build
is refused. The resume also ends the outage of a stopped server. So the clock holds back no record
whose expiry time fell while the server was stopped. While the server runs, the command goes to it
over the socket. With the server stopped, the command takes the state root and writes aging.clock
itself. A damaged aging.clock goes to aging.clock.damaged first. A resume makes no command in
the ledger: its record is a line of the log.
tadoru zone clock resume# resumed the zone clock: it trusts the wall clock now, and holds no record backtadoru zone freeze home-arpa# froze zone home-arpa at serial 7. Edit its files, then thaw it with `tadoru zone thaw home-arpa`. Until then it takes no change that does not come from its files. Start the serverzone thaw ends the freeze. It reads every file of the directory of the zone in the configuration
root, and checks the zone that they make. It makes that the zone in a new revision, and appends the
thaw to the journal. The zone then takes updates again. Where the records changed, the serial in the
SOA record must be ahead of the serial of the freeze, so a secondary takes the change. The command
refuses a change at the serial of the freeze, and names both serials. With --serial-bump, it moves
the serial for you instead. The SOA line of records.zone takes the next serial by the serial
scheme of the zone. The rest of the file stays as you wrote it. A records.zone with an $INCLUDE
line takes no bump, so raise its serial by hand.
The thaw keeps the serial ahead of the serial witness too. The witness holds the last serial that
the apex of the zone served. An update or a move of the zone while it was frozen can put that serial
ahead of the serial of the freeze. So can an earlier zone at that apex. A thaw with no
--serial-bump whose serial is not ahead of it is refused, and the refusal names the serial that
--serial-bump writes. With --serial-bump, the serial moves past the serial witness, with no
change of a record needed. Where no serial inside 2^31 from the first serial of the apex lies one
step ahead of the serial of the freeze and ahead of the serial witness, no thaw can move past it.
The refusal names the way out for its case. Where a thaw from the serial of the freeze can reach
past the witness, the way out is a reset. Stop the server, run tadoru zone witness reset <apex>,
start the server, and thaw again. Where the apex served the last serial inside that bound, the way
out is a reset and a bump. Stop the server, run the reset, then run tadoru zone thaw --serial-bump
with the server stopped. Where the zone is frozen out of reach of the witness, the way out is a
bump. Stop the server, and run tadoru zone thaw --serial-bump with the server stopped. In both of
the last two cases, the next start moves the serial past the witness in more than one step. A
records.zone that ends in a backslash that escapes nothing takes no bump either, and the command
names its line. A thaw refuses a .zone file of the zone that you changed and that holds a
backslash right before a CRLF line end. It does so with the bump and without it, and names its line.
It refuses a file that does not read, and names the line. It refuses a zone that is not frozen, an
edit that turns the zone off, and a directory without a zone.toml or a records.zone. It refuses
what the freeze refuses too. A refused thaw leaves the zone frozen and its edit in the configuration
root, so you can correct the edit and run it again. Where the new revision is made and the thaw
cannot be written to the journal, the command says so and fails. The zone does not serve. No other
change of the configuration is taken until the next start, which writes the thaw. While the server
runs, the command goes to it over the socket. A thaw of a zone that is not frozen is refused there,
because a thaw whose answer was lost can have landed. With the server stopped, the command takes the
state root itself.
# Edit the records and raise the serial, then:tadoru zone thaw home-arpa# Or let the thaw raise the serial:tadoru zone thaw home-arpa --serial-bump# thawed zone home-arpa as revision 12. Its files serve, and it takes updates again. Start the serverzone journal remake makes the journal of dynamic updates of a zone again, empty. Run it where the
server stops a zone for its journal, for example a lost or damaged journal, and the file cannot come
back. It also runs on a zone that serves its files and takes no update, because nothing says which
updates its files hold. The updates that the old journal held past the files of the zone are gone,
and the command says how many the server knew of. It names each update that waits for the zone, and
leaves it to the next start. It moves the old file to updates.jnl.replaced, and records the remake
in the audit. It needs the server stopped. Any other zone is refused, for example one whose missing
journal the next update makes again on its own. A journal that ends in a freeze is refused too,
because the new journal would drop the freeze. The exception is where the running revision thaws the
zone, the journal lacks the thaw, and the freeze is the one that the thaw follows. For a frozen zone
with a damaged tail, zone journal cut at the freeze is the way back. Where a run stops partway,
the next run finishes it and makes no other. Where the write of the new journal fails, the run
records nothing and says so, and the next run decides afresh. Where the record in the ledger fails,
the ledger may hold the remake or not, and the next run finishes it or decides afresh. Where a move
of a journal fails after that, the error says what the remake drops. The next run finishes it and
names the new journal alone. Where the record in place fails, the new journal is in place. The error
says what the remake drops. A run again or a start of the server records it in place where the
ledger did not. A run again that finds it recorded is refused, because the zone then replays. A new
remake is also refused where the zones that the next start serves after it break a rule. The rule
can be one of a set of zones, or a check across the files. The refusal names the rule, and A target
that is an alias says what to change.
tadoru zone journal remake home-arpa# 3 updates of zone home-arpa that the server knew past its files are gone# made the journal of zone home-arpa again as journal 5f0c…. Start the serverzone journal cut keeps the whole frames of a damaged journal up to a point, and drops the rest.
Run it where the server stops a zone because its journal is damaged or ends short. The default
point is the last good frame. --at names an earlier update to keep.
The command refuses a point past the last good frame. It refuses a point below the files of the zone too. The updates past the point are gone, and the command says how many the server knew of. It names each update that waits for the zone, and leaves it to the next start.
It moves the old file to updates.jnl.replaced, and records the cut in the audit. It needs the
server stopped. It refuses a zone whose journal the server can use. Where the good frames end in a
freeze, it cuts at the freeze and keeps it. The next start finds the zone frozen, and zone thaw
ends the freeze as usual. That is the way back for a frozen zone with a damaged tail. It refuses any
other point of such a journal, because the zone would thaw with no thaw. It refuses a cut that keeps
a freeze whose thaw waits for the start: start the server, which appends the thaw first. For a
journal that has no good frame, zone journal remake makes a new, empty journal. Where a run stops
partway, the next run finishes it and makes no other. Where the write of the new journal fails, the
run records nothing and says so, and the next run decides afresh. Where the record in the ledger
fails, the ledger may hold the cut or not, and the next run finishes it or decides afresh. Where a
move of a journal fails after that, the error says what the cut drops. The next run finishes it and
names the new journal and the point alone. Where the record in place fails, the new journal is in
place. The error says what the cut drops. A run again or a start of the server records it in place
where the ledger did not. A run again that finds it recorded is refused, because the zone then
replays. A new cut is also refused where the zones that the next start serves after it break a rule.
The rule can be one of a set of zones, or a check across the files, as for a remake.
# Keep up to the last good frametadoru zone journal cut home-arpa# 1 updates of zone home-arpa past update 2 are gone# cut the journal of zone home-arpa at update 2 as journal 5f0c…. Start the server
# Keep up to update 1tadoru zone journal cut home-arpa --at 1# 2 updates of zone home-arpa past update 1 are gone# cut the journal of zone home-arpa at update 1 as journal 5f0c…. Start the serverA cut or a remake can fail to read the journal that it replaces, such as a damaged one. Then it
cannot say whether the zone was frozen. It prints a last line that says so, and the next start stops
the zone as freeze-uncertain until you state it:
the freeze state of zone home-arpa is not certain after this cut, so the next start stops the zone with freeze-uncertain. Before that start, state it with `tadoru zone journal settle-freeze home-arpa --not-frozen`, or with `tadoru zone journal settle-freeze home-arpa --frozen-at <serial>` and the serial at the head of its journal where the zone was frozenzone journal settle-freeze states whether a zone that the server stops as freeze-uncertain was
frozen, so that the next start serves it. It takes exactly one of two flags, and refuses neither
and both with state one of --not-frozen or --frozen-at <serial>, before it reads anything:
--not-frozenstates that no freeze stands. It writes no frame into the journal. Where an edit of the files of the zone waits in the configuration root, the command says so. The next start takes it in as an edit of a zone that is not frozen.--frozen-at <SERIAL>states that the zone is frozen at the serial at the head of its journal. It appends one freeze frame there, aszone freezewrites one. Where the journal ends in that freeze already, it writes no frame and records the statement alone. The serial is the check that you froze the version that the zone holds now. A thaw then compares your edit with it.
The server cannot check what you state. A zone that you froze and did not thaw is frozen; one that
you never froze, or thawed, is not. The freeze state of a zone is not
certain says how to tell. The command
needs the server stopped, and records the statement in the audit with the uid of the process, as
uid:1000. It refuses a zone whose freeze state is certain. It refuses a journal that does not
read, with either flag, so cut or remake it first. It refuses --not-frozen on a journal that ends
in a freeze that stands. It refuses --frozen-at on a journal that is gone or on a zone that serves
its files. It refuses it on a journal that holds updates past its files. It refuses it at a serial
that is not the serial at the head of the journal. It refuses it where no thaw from that serial can
move past the serial witness. It refuses while an update, another command or a thaw of the zone
waits for the next start. A run that finds the statement of an earlier run that did not finish
settles it, and says so.
tadoru zone journal settle-freeze home-arpa --not-frozen# stated that zone home-arpa is not frozen as command zone-journal-settle-freeze:home-arpa:1761480000.123456789# the statement binds journal 5f0c… at update 2, with serial 9 at its head# zone home-arpa serves again at the next startThe serial witness
Section titled “The serial witness”A secondary server follows a zone by its serial, and takes a serial only where it is ahead of the
one it holds. So a serial that goes back splits a secondary from this server with no word in a log.
So does one serial with two sets of records. The server keeps serials.sqlite in the state root to
prevent that. It holds, for the apex of each zone, the first and the last serial that the zone
served, and a digest of its records. Every change of a zone counts from it. Where it cannot say
which serials a zone served, the zone stops. It answers SERVFAIL for every name until a command of
zone witness names it, as A zone that the serial witness
stops says.
The four commands of zone witness need the server stopped. They take the lock of the state root,
and refuse while the mark of a restore that did not finish stands. accept, raise and reset
write the audit row of their command first and settle it last, with the uid of the process, as
uid:1000. A command that did not finish is settled by the next start or command, which prints a
line for it. Where the witness is lost, the first of these commands makes it again with the mark
of a lost history, as a start does. Where no start of this build made the witness yet, accept,
raise and reset refuse, and list says so: start the server once first.
zone witness list prints each row. A row says the apex, the first and the last serial, and whether
it holds a digest. It says its state and the id of its zone. It says the time and the largest SOA
EXPIRE that it served. Then the command prints each row at or past 2^31 from its first serial, with
its way out. It prints also the end of the whole-zone time of each apex that has one, with the
serials that its zone must serve past. It writes nothing, not even the log beside the file, which
the next start or command folds in. So it lists no row while one waits.
tadoru zone witness list# the serial witness was made at 2026-11-02 09:14:05 UTC, lineage 3c9e…# home.arpa.: first 7, serial 12, served, digest, zone home-arpa, at 2026-11-02 10:01:44 UTC, max-expire 604800zone witness accept writes a row for each zone of the running revision that the witness stops as
fenced or with a lost history. It writes the row from the serial and the records of the zone now,
and lifts those stops. Run it where no secondary holds a serial ahead of the one each zone serves
now. It keeps the first serial of a row that exists. It leaves a zone out, with its reason and its
way out, in three cases. Its serial is behind its row or too far ahead of it. Its serial equals its
row with other records. Or a frozen zone lies too far behind its row for a thaw to pass it. It
writes the others in one command, and then exits 1. It changes nothing, and exits 0, where no zone
is stopped so. On a zone that is frozen or freeze-uncertain, it writes the serial at the head of
the journal.
zone witness raise <APEX> <SERIAL> writes the row of one apex at a serial ahead of its row, with
no digest. Run it with the serial that the secondaries of the apex hold. Read it from a secondary,
as with dig soa @secondary home.arpa. The server cannot check it. The next start moves the zone at
the apex past it. For an apex with no row, the serial is its first and its last serial. For an apex
with a row, the first serial stays, and the serial must leave one more serial inside 2^31 from it.
From a first serial of 0, the highest that it takes is 2^31 - 2. On a zone that is frozen or
freeze-uncertain, the serial must also stay less than 2^31 - 1 ahead of the head of its journal.
The refusal names the thaw first. It refuses a row at or past 2^31 from its first serial, and names
reset.
zone witness reset <APEX> starts the history of one apex again on purpose. The first serial of its
row becomes its last serial, which lifts a stop at the end of its history. Where no zone of the
running revision holds the apex, the row goes. A secondary that holds a serial of the history before
the reset can take the next serials for older ones. So the command prints what it needs: a fresh
transfer of the whole zone, or a wait until its copy expires.
tadoru zone witness raise home.arpa 2026110204# home.arpa.: first 2026110204, serial 2026110204, served, a new row# home.arpa.: its whole-zone time ends at 2026-11-30 10:01:44 UTC (max-expire 2419200) and once `tadoru zone witness raise` with `--old-serials` names the serials that its secondaries can hold and it serves past them, since the serials of its old history are not known: until then, no IXFR answer of this node sends differences of the apex# raise landed as command 7d1e…--max-expire <SECONDS> of accept and raise is the largest SOA EXPIRE that a secondary of the
zone can hold. Each of the three commands writes the time until which this node answers every
incremental transfer of the apex with the whole zone. That time is the time of the command plus that
EXPIRE, or the largest EXPIRE that the row served, whichever is later. Left out, accept and
raise take the EXPIRE of the SOA of the zone at the apex in the running revision. A raise of an
apex that no zone holds needs the flag, and is refused without it. So does a raise of the apex of
a secondary zone that holds no copy yet, which has no EXPIRE of its own. After a lost witness, no row says
what EXPIRE this node gave out, so give the largest that any copy of the zone carried. The server
cannot check it.
The whole-zone time also waits for a serial. A secondary that can reach this node finds a serial
equal to its own or behind it, and keeps its old copy. So does one that comes back before the
deadline. So the apex also sends the whole zone until two things are true. First, the zone before a
change serves a serial ahead of every serial that a secondary can still hold of the old history.
Second, the zone after the change does too. reset counts the first and the last serial of the
history that it ends, with the serials of an earlier whole-zone time of the apex. Some commands
cannot know them: accept, raise with no --old-serials, and a reset of a fenced row. A
reset of a row from a restore or from a build before this one cannot know them either. So they
count every serial. The apex then sends whole zones until raise names them. The line of each
command, and zone witness list, say what ends the wait.
--old-serials <A..B> of raise names them. It names every serial that a secondary of the apex can
still hold of its old history, reachable or cut off. The range runs from A forward to B, such as
--old-serials 2026110100..2026110204. Read each secondary for it, as for the serial of raise,
and give the range that holds them all: the server cannot check it. The range takes the place of the
one that stands. It is refused where it spans 2^31 - 1 serials or more, since no serial is ahead of
it. It is refused where it leaves out the serial that the row of the apex holds before the command.
It is refused where it leaves out an end of a range that stands and that a serial can pass, which
the server knows already. Run it after accept, once for each apex, and after a reset that
counted every serial.
tadoru zone witness raise home.arpa 2026110205 --old-serials 2026110100..2026110204tadoru blocking
Section titled “tadoru blocking”Turn blocking off for a while, or on again, on a server that is running. Blocking says what the switch is and why an untimed disable is safe.
# Off for ten minutes, then on again with no further command.tadoru blocking disable 10m
# Off until you say otherwise.tadoru blocking disable
# On again now.tadoru blocking enable
# The switch, the setting and blocking in force, one line each.tadoru blocking status| Command | Arguments | Options |
|---|---|---|
blocking disable |
A duration, or none for until an enable |
|
blocking enable |
||
blocking status |
A duration is a number and a unit: 10m for minutes, 2h for hours, 600s for seconds. A
timed disable longer than a day is refused, with the bound in the message.
Each of the three prints three lines: the switch, the setting enabled of blocking.toml, and
whether blocking is in force. Blocking is in force where the switch is on and the setting is true.
Where it is not, the third line says what keeps it off. So an enable while the setting is false
turns the switch on and then prints that the setting keeps blocking off. A server of an older build
reports the switch alone, until its restart after an upgrade, and the second line says so. A part of
the answer that the command does not understand comes after the lines that it can read, as a
refusal. The command exits non-zero. After disable or enable, the refusal says that the server
took the change of the switch, so the command need not be sent again.
None of these three has an offline form. The switch lives in the memory of a running server and nothing else. A server that is not running has no switch for a command to reach.
tadoru cache
Section titled “tadoru cache”Show what the cache holds at a name, or flush it, on a server that is running. Both go through the socket as your own user, so on the machine they need no token.
# What the cache holds at a name, and the labels below it that hold something.tadoru cache show example.com
# The next page of labels, after the one the last page ended on.tadoru cache show com --limit 100 --after example
# The server's own answer, for a script.tadoru cache show example.com --json
# Flush one name, or a name and every name below it.tadoru cache flush www.example.comtadoru cache flush example.com --below
# Flush everything.tadoru cache flush --all| Command | Argument | Options |
|---|---|---|
cache show |
A name, or none for the root . |
--limit N, --after LABEL, --json |
cache flush |
A name, or none with --all |
--below, --all |
--limit takes 1 to 1000 labels, and it is 100 where it is left out. A longer list goes on over
more pages, and each page ends with the --after of the next one.
A flush also removes what answers the name from above. That is a denial of a name above it, and the closest zone cut above it, unless that cut is the root’s. So a domain that moved to a new provider is asked about again at its new name servers. The command prints how many names, tailored answers and zone cuts went.
With no server running, cache show and cache flush NAME are refused, because no cache is in
memory. cache flush --all then takes the state root’s lock and deletes the snapshot on disk, so
the next start begins with an empty cache.
tadoru acme
Section titled “tadoru acme”Replace the key of the ACME account with a new one. The server makes the account key at its first order and keeps it. Rotate it where you think somebody copied it, for example from an old backup that was not encrypted.
sudo systemctl stop tadorusudo -u tadoru tadoru acme rotate-account-keysudo systemctl start tadoru| Command | Argument | Options |
|---|---|---|
acme rotate-account-key |
None | None |
The command asks the authority that acme_directory names in the configuration that is running. It
needs the server stopped, and it refuses where node.toml names no acme_names, or where the
server has made no account yet. Its requests take the outbound proxy of the configuration that is
running, not of the config root. They take the password in secrets/node/, as the requests of the
server do. A password that does not read, or that the proxy cannot carry, fails the command, and no
request goes direct. The authority checks the new key with the old one, so after it answers, the old
key signs nothing for the account.
The new key is written to the disk before the authority is asked. A refusal of the authority deletes it, and the old key keeps signing. If the command stops in the middle, or the authority answers with a server error, the new key stays beside the old one. Then run the command again before you start the server. It first asks the authority whether the new key holds the account. Where it does, the new key becomes the account key and the command ends. Where it does not, the command deletes it and rotates again with the old key.
tadoru secret
Section titled “tadoru secret”Write, clear or list the secrets of this node. A secret of the node is a file under
secrets/node/ of the state root, such as the password of a PKCS #12 file. While the server runs,
the commands ask it over the socket, and the server makes the change. With the server stopped,
secret set and secret clear write the file themselves. That is the way out where the server
does not start because of a secret, for example after a restore of an older backup.
sudo -u tadoru tadoru secret set tls_pkcs12_passwordsudo -u tadoru tadoru secret list| Command | Argument | Options |
|---|---|---|
secret set |
The name of the secret | None |
secret clear |
The name of the secret | None |
secret list |
None | None |
The names are tls_pkcs12_password, the password of a PKCS #12 file, and
outbound_proxy_password, the password of the user of the outbound proxy.
secret set reads the value from standard input, never from the command line. From a file or a
pipe it reads to the end, as in tadoru secret set tls_pkcs12_password < password.txt. It removes
one final line break, \n or \r\n. The value is 1 to 1024 bytes of UTF-8, with no NUL and no
other line break. No output of the command holds the value.
On a terminal, secret set asks for the value. It turns the echo off before the question shows, so
the value is not shown, and it reads one line. Ctrl-C cancels: nothing is written, and the command
ends with exit code 130. Ctrl-Z stops the command with the echo back on, and fg asks again, with
nothing kept of what was typed before. A kill -9 of the command leaves the terminal with its echo
off. Then stty echo puts it back.
secret clear removes the secret. A secret that is not set is no error: the command ends with exit
code 0.
While the server runs
Section titled “While the server runs”The commands go over the socket, as root or as the user of the server, and need no account. The server takes the word of the operating system for these two users on the socket, as for an admin on these routes alone (Accounts). Another user is refused by the server.
- The command finds a running server in two ways. Run as the user that owns the state root, it takes the lock of the state root first. It asks the socket only where a server holds the lock. Run as another user, such as root, it takes no lock and asks the socket.
- Before anything goes out, it checks the process that answers on the socket. Its user must be the owner of the state root, and it must be the process that holds the lock of the state root. So a process on the socket beside a stopped server, or a server of another state root, gets nothing, for root too. Each request after goes over that one connection.
secret setasks for the list first. So a server that refuses this user, or knows no secret of that name, refuses before the value is asked. Then the server tries the value on a certificate source that reads it, writes it, and reloads.- Once the command has asked the server, it never writes the file itself, whatever the answer.
Each change prints what the server did with it:
| The line says | Means |
|---|---|
The certificate opened with it, and serves the next handshake |
The certificate of tls_pkcs12_file serves with the new value |
The next request through the outbound proxy takes the change |
A user of the outbound proxy is set, and the next request reads it |
No source of the running configuration reads it |
Nothing reads the secret now. The next source that does reads it |
and that stays, but the reload after it failed |
The value is in place, and the old certificate keeps serving. The command ends with 1 |
secret list prints one line for each secret, such as tls_pkcs12_password: set, changed 2026-11-18 10:00:00 UTC. A secret that the server cannot read says unreadable, with the word of the health
report. A secret of the node that is
unreadable gives it. With the server
stopped, secret list refuses, because the list comes from the server.
A change that the server refuses, or never gets, says nothing changed and why, in the words of the
command. It never prints the words of the server, which could hold what it was sent. A change whose
answer did not come says it is not known whether it changed. Then run it again: the same command
ends in the same state, also over a change that another admin made in between. secret list shows
whether the secret is set and readable, but not which value is in place.
With the server stopped
Section titled “With the server stopped”sudo systemctl stop tadorusudo -u tadoru tadoru secret set tls_pkcs12_passwordsudo systemctl start tadoruNo request tries the value, and the next start reads it. A write of outbound_proxy_password is
held to the kind of the proxy of the active configuration, as the server holds it. A password that
the proxy cannot carry is refused, and nothing is written. The configuration is read in the state
root that the command locked. Every other value meets only the rule of a value above. Both commands
need the state root to themselves:
- They run as the account that owns the state root, usually
tadoru. Run as root, or as another user, over a state root oftadoru, they refuse. A file of another owner stops the next start again. - They take the lock of the state root before they read the value, and hold it until they end. So a
start of the server while
secret setwaits for the value is refused. - They refuse a state root with no
owner.sqlite. A start of the server makes the state root and that file, also a start that fails, such as one that a password stops. So on a new installation, start the server once first. - They refuse while the mark of a restore that did not finish stands.
- They use the state root that they found when they started. If the path names another directory while they run, they write nothing there.
Exit codes
Section titled “Exit codes”Each command ends with exit code 0 where the change is in place and synced. It ends with exit code 0 where a clear finds nothing to clear, and where the list came. It ends with exit code 1 where a change failed, was refused, or is not certain, and where the reload after a change failed. Run it again then: the same change again ends in the same state. A cancel at the question ends with 130, and a name that is not a secret with 2.
tadoru health
Section titled “tadoru health”Say whether the server on this runtime directory is serving. A supervisor reads the exit code, and you read the line.
# One line, and exit zero where the server is serving.tadoru health --data-dir ./data
# What the endpoint said, for a script.tadoru health --data-dir ./data --jsonok, revision 12, 3 of 3 blocklists serving, query log readyZero means the socket answered. That is the whole of it, and it is the only thing a server can honestly report about itself. A server that cannot answer this does not answer a query either. Anything else is non-zero, which is no server answering or a socket that is not there.
It says nothing about whether a client can reach your DNS port. A published port that is wrong,
or a listener on an address nobody routes to, both leave this answering zero. Use dig against
the address a client uses for that.
A bootstrap.toml this command cannot read does not stop it. That file names the runtime
directory, and a refusal here restarts a server that was answering. So the command writes two
lines about the file and asks a socket under the flags and the built-in defaults instead. The
second line names that directory. Read it where you run two servers on one machine: the socket
it names belongs to whichever server put it there.
Some things in the answer do not make it fail. A change that was refused in the past stays in the answer after the server recovers. A check that failed on it calls a server unhealthy for ever, because of one bad edit. A blocklist serving no rules does not either, because the server keeps answering and the list keeps whatever it held. The line says each where it is there, so you read them without the exit code changing.
The line names the state of the query log after the blocklists, and the query_log field of
--json holds the same word. opening means the server is still opening the log database, which
after an upgrade can take minutes. The rows of those queries wait in memory. ready means the
database is open and the routes of the log answer. A later write that fails shows as lost rows in
the server log, not in this field. off means the database did not open, so nothing is written
until the next start, and the log routes answer 503. The exit code stays zero in all three, because
DNS answers without the log. While the log opens says more.
A query log in memory says so, and a log that is off says why, in the word of
telemetry.off.reason of --json:
ok, revision 12, 3 of 3 blocklists serving, query log ready in memoryok, revision 12, 3 of 3 blocklists serving, query log off: not_memoryThe line adds query log full while a query log in memory writes no row for want of room. It adds
query log unmeasured while it writes none because its room cannot be measured. It adds an old copy of the query log at its directory while a change of telemetry_storage left one. A word that
this build does not know, from a later server, reads as other. The telemetry object of --json
holds the whole report: the place that node.toml asks for, the place where the log runs, and each
reason. None of them changes the exit code.
The line also names the clock, where no time client set it yet or where it reads earlier than this build:
ok, revision 12, 3 of 3 blocklists serving, query log ready, clock unconfirmed: time servers answer unvalidatedThe names of the time servers then answer without DNSSEC validation, so a time client can reach
them and set the clock. With clock wrong, other signed names fail until the clock is right. The
exit code stays zero in both cases, because a restart does not set a clock. The clock object of
--json holds the whole report.
The line also counts each zone turned off, and each zone that takes no dynamic update as its journal says:
ok, revision 12, 3 of 3 blocklists serving, query log ready, 1 zone stoppedA zone turned off answers no name, because its zone.toml sets enabled = false. A stopped zone
answers SERVFAIL for every name in it. A zone that the line names as serving files answers from its
files. The answers of an unsettled zone can hold an update that did not finish. A frozen zone
answers as before until its thaw. The line says how many frozen zones have been frozen for more than
a day. A freeze that was forgotten refuses every update of a DHCP server with no other sign. None of
them takes a dynamic update. The zones list of --json names each zone and the reason. A zone
frozen for more than a day also carries a note. The note is in its own entry or in the entry of
another state that it is in too. tadoru zone list gives the time of the freeze. The exit code
stays zero, because the rest of the server answers. A zone that answers SERVFAIL, or takes no
update says what each state
means.
The line also counts each listener with a device whose sockets do not hold the device of its name, as the server last read them. The server reads them every 10 seconds:
ok, revision 12, 1 listener with sockets on a device index that no device has nowok, revision 12, 1 listener whose device has another name nowThe first is a device that is gone. It can also be a device that was deleted and made again under
its name, such as by wg-quick down and wg-quick up. Those sockets take no query. Where the
device is gone, restart the server once it is back. Where it was made again, a restart binds the
sockets to the device that has the name now. The second is a device that was renamed, whose sockets
take its queries under its new name. A restart binds the device that node.toml names, so it fails
until a device has that name. A listener with sockets in both states counts in both parts, and a
state from a later server counts as in another device state. The listener_devices list of
--json names each listener, its list, each state with its sockets, and the entry that a restart
binds. The exit code stays zero, because the command says whether the server answers on its socket,
and it does. Whether to restart is a separate choice: a start while the device is still missing
fails, and every other listener stops with it. A listener on a device that answers
nothing says what to do for each
state.
The line also says what holds a record past its expiry time in a zone with record_expiry. It names
the zone clock and the clock gate. It gives the count of the zones whose
last removal a check refused or that failed. A failed write of aging.clock comes with what to
change before the resume:
ok, revision 12, zone clock held until the resume, aging.clock not written (directory-sync): put the state root on a file system that syncs a directory, then run `tadoru zone clock resume`, 1 zone with a refused expiry sweepThe expiry object of --json holds the whole report, with way_out in the words of the server.
The exit code stays zero, because DNS answers all the same.
A record past its expiry time is still there
says what to do for each reason.
With tls_self_signed = true, the line gives the state of the certificate that the server made and
its two fingerprints. You compare them with what a browser or a client shows. Before its first
certificate serves, the line gives the state alone:
ok, revision 12, self-signed certificate ok, SHA-256 3F:9A:...:C1, key SHA-256 mN2v...Ps8=ok, revision 12, self-signed certificate renewal_failing, and none serves yetThe certificates list of --json holds the problem and the fingerprints. The exit code stays
zero. A certificate that the server makes
says what to compare.
So this answers “is it running”, and the endpoint answers “is it doing its job”. Read
blocking.ok from --json, or the health route over the API, for the second question. A
supervisor that restarts a server over an empty blocklist restarts it for ever. The list comes
back from a fetch rather than from a restart.
It needs no credential, because the health endpoint needs none. It is also what a container
health check runs, since there is no curl in the image.
tadoru dig
Section titled “tadoru dig”Ask one DNS server one question, from this process, over UDP, TCP, DoT, DoH on HTTP/2 or HTTP/3, or
DoQ. It asks what POST /api/dns-client asks (The DNS client), with the same
checks of each field. Where the route names a field in a refusal, the command names its flag, such
as --payload-size. It needs no running server, no account and no socket.
# The server of this machine: the first address of listen in node.toml that names no device.tadoru dig www.example.com AAAA
# A server over DoT, with the name its certificate must hold and its address.tadoru dig --server 'tls://dns.quad9.net (9.9.9.9)' example.com MX --dnssec
# The same server written after @, as other DNS tools write it.tadoru dig @192.168.1.1 router.home.arpa
# Plain DNS over TCP alone, to a server named by its host name.tadoru dig @tcp://dns.home.example router.home.arpa
# DoH on HTTP/3, at the address that the resolver of this machine gives for the name.tadoru dig @h3://dns.google/dns-query example.com
# The same at an address you name. A transport you name must agree with the scheme.tadoru dig --server 'h3://dns.google/dns-query (8.8.8.8)' --transport h3 example.com
# Plain DNS over TCP to an address.tadoru dig --server 192.168.1.1 --transport tcp router.home.arpa
# The answer of the route, for a script.tadoru dig --json www.example.com| Option | What it does |
|---|---|
NAME |
The name to ask about, in ASCII. Write an internationalized name as its A-label |
TYPE |
The type, by name or number. A without it |
--server SERVER |
The server, as the server field of the route. @SERVER among the words says the same |
--transport WORD |
udp, tcp, tls, https, quic or h3. Without it, udp or the scheme |
--class CLASS |
IN, the default, or CH |
--no-recursion |
Clear the RD bit, which is set without it |
--checking-disabled |
Set the CD bit |
--dnssec |
Set the DO bit. It needs the OPT record |
--no-edns |
Send no OPT record |
--payload-size OCTETS |
The payload size of the OPT record, 512 to 4096. 1232 without it |
--no-tcp-retry |
Keep a UDP reply that is cut short (TC), and do not ask again over TCP |
--timeout MS |
The time of one attempt in milliseconds, 100 to 5000. 3000 without it |
--json |
Print the answer as POST /api/dns-client gives it |
A transport that you name must agree with the server. An address takes udp or tcp. A server with
a scheme takes the transport of its scheme alone.
A server is an address with a port or without one, or an address after tcp://. It is an entry in
the form of forwarders after tls://, https://, quic:// or h3://. It is also a host name,
alone or after a scheme. A host name is looked up through the resolver of this machine, as any
program here looks a name up. The query goes to the first address that it gives. Every attempt, the
retry over TCP too, goes to that address. A lookup that gives no address is unresolved, and one
that does not end in the time of one attempt is timeout. Neither sends a query. The route answers
a name under .local or home.arpa as unresolved where no zone of yours holds it. This command
finds it where the machine does. A name under .onion is refused. The DNS client never goes through
the outbound proxy.
Without a server, it asks the first address of listen in node.toml of the config root that names
no device. An entry with @ and a device is skipped, because that listener answers only what comes
in on its device. --config-dir and --data-dir say where the config root is, and bootstrap.toml
is not read. Without a node.toml there, it asks 127.0.0.1:53. A node.toml that does not read,
a listen that is empty, and a listen whose every entry names a device are refused. The message
says to name the server with --server.
It reads the trust store of this machine only for tls, https, quic and h3, after the options
pass their checks. So a plain query never reads it. The read takes only regular files, up to a cap.
Standard error names each file it refuses, one line each before the rest, as
Troubleshooting says.
It speaks for the person who runs it, as any DNS tool on the machine does. So the limits of the
route do not apply: it asks any address, loopback and link-local included, and as often as it is
run. It checks each certificate against the trust store of this machine and the name of the server,
and nothing turns that off. A certificate for another name is tls.
The output names the server, and each attempt with its outcome and its time. It names the outcome of the query and the header of the message. It names its OPT record with each Extended DNS Error and its text. Then it names each section with a record on a line:
;; server 9.9.9.9 port 853 over tls, certificate dns.quad9.net;; attempt 1 over tls: answered in 41.207 ms, handshake 30.114 ms, 89 octets;; outcome answered;; id 0, opcode QUERY, rcode NOERROR, flags qr rd ra;; counts: question 1, answer 1, authority 0, additional 1;; edns version 0, payload size 1232, flags do
;; questionexample.com. IN MX
;; answerexample.com. 86400 IN MX 0 .A server can write anything in a text, such as the text of an Extended DNS Error. So each control
character in the output, such as an escape or a line end, is written as \x and two hex digits:
\x1b and \x0a. Each format character, which changes how the text around it looks, such as
U+202E, which turns its direction, is written as \u{202e}. These are the Unicode categories Cf, Zl
and Zp. The text of an error, of a problem and of a content type stands in quotes. It has \\ and
\" for a backslash and a quote in it. Names and data are in their presentation form, as a zone
file writes them.
--json writes the answer as JSON writes it: \n, \t, \r, \b and \f for those five control
characters, and a \u escape for each other C0 character. It also writes DEL, each C1 character and
each format character as a \u escape, which JSON does not need. So the value is the same as the
answer of the route.
The path of a DoH server is in the output as you wrote it, and it can hold a token. So keep the
output as you keep the command. While the command runs, its command line shows to the other users of
this machine, such as in the list of processes. This includes a token in --server.
The exit code is 0 where the outcome is answered, whatever the response code. So the exit code of
an NXDOMAIN is 0. It is 1 for every other outcome, such as timeout, tls, too-large or
unresolved, and a missing trust store of this machine gives tls. Standard error then says the
outcome and its problem. It is 1 too where the reply could not be converted. It is 2 where the
command refused to run. That happens for a flag that does not parse, an option that the checks
refuse, or a default server that does not read. Standard error says why.
tadoru backup and tadoru restore
Section titled “tadoru backup and tadoru restore”Backup and restore says what the archive holds and what a restore replaces.
# Write an archive. The passphrase encrypts the secrets and is not stored.tadoru backup --data-dir ./data --output tadoru-backup.tar.gz \ --passphrase-file ./passphrase
# Say what a restore will replace and delete, and replace nothing.tadoru restore tadoru-backup.tar.gz --data-dir ./data \ --passphrase-file ./passphrase
# Do it.tadoru restore tadoru-backup.tar.gz --data-dir ./data \ --passphrase-file ./passphrase --yes| Command | Argument | Options |
|---|---|---|
backup |
--output PATH, --include-telemetry, --passphrase-file PATH |
|
restore <archive> |
An archive | --passphrase-file PATH, --yes, --without-mac |
backup without --output writes a name with the date in the current directory. It works with the
server running and says so in its output. Such an archive carries the revisions it
checked, rather than every one on disk. Backup and restore has the difference.
Run restore as the user of the server. Run as root, it refuses a state root that another user
owns, before it makes a root or takes the lock. The files it writes would be root’s, and the server
could not open them.
backup carries a copy of the serial witness, serials.sqlite, and restore merges it into the
witness of the node, as The serial witness says. A restore of an
archive with no copy, from an older build, keeps the witness of the node as it is.
restore --passphrase-file refuses an archive that carries no MAC, before it unpacks anything. Such
an archive is one written without a passphrase, one that a version before the MAC wrote, or one
whose MAC somebody removed. --without-mac restores such an archive. Use it only for an archive
whose origin you know. A MAC that the archive carries is checked all the same, and The
passphrase says what the MAC proves.
restore without --yes lists the files it replaces and the files it deletes, and replaces
nothing. That is the preview, and reading it is the point of having one. It does make the three
roots and take the state root’s lock before it prints. So a preview against a path that does not
exist creates it.
tadoru rewrite
Section titled “tadoru rewrite”# Rewrite every state store, with the server stopped.tadoru rewrite --data-dir ./data
# Rewrite the query log and the accounts alone.tadoru rewrite --data-dir ./data --only telemetry --only auth| Option | What it does |
|---|---|
--only STORE |
Rewrite this store alone. It repeats. Without it, every store |
A store is one of these, and the rewrite takes them in this order:
STORE |
File |
|---|---|
auth |
auth.sqlite |
control |
control.sqlite |
serials |
serials.sqlite |
record-times |
record_times.sqlite |
telemetry |
telemetry.sqlite |
SQLite leaves copies of old values inside the pages of a file that stay in use. Such copies sit in a
page that it rebuilds. They sit in a free page that comes back as part of the free list. They sit in
the end of a page that a new row reuses. A redaction of the query log and the removal of an account
zero what they free. These copies still stay (The query log and
Accounts say which). A release before those fixes left more. rewrite writes each
store again as a new file that holds its rows and nothing else. It checks it against the old file
row by row, and puts it in place. Every row stays, with its number, so a cursor of the history of
the accounts still works, and nobody is logged out. A store also gets incremental auto-vacuum, where
it had none.
Run it as the user of the server, with the server stopped. It takes the lock of the state root, and
refuses while the server or another command holds it. Where auth.sqlite is chosen, it also waits
for an accounts command that is running, and says so. It never makes a root: with no state root,
it says so and ends.
The command trusts its own process and the folders of the state root and the folders above it. It
notices a folder that somebody moved by hand, or another tadoru command, and refuses. It does not
protect a store from a program that can write those folders and changes them on purpose while it
runs. Such a program can be another program of the user of the server or of root. Keep other
programs out of the state root while it runs.
Before it writes anything, it prints the figures of each store. They are the main file, its write-ahead log, its free pages, and about how large it is after. Then it prints the room that the largest store needs, which is about the size of that store after the rewrite. It prints the free room of the state root. Where the room is short, it rewrites nothing. The figures are estimates. While a large store is copied, standard error says how far the copy is every 5 seconds.
auth.sqlite: main file 212.0 KiB, free pages 96.0 KiB; about 116.0 KiB after the rewritetelemetry.sqlite: main file 1.9 GiB, write-ahead log 4.1 MiB, free pages 0.7 GiB; about 1.2 GiB after the rewrite. It has no incremental auto-vacuum, and it gets itthe rewrite needs about 1.3 GiB free at most in /var/lib/tadoru/state, and 41.2 GiB is freerewrote auth.sqlite: 212.0 KiB to 116.0 KiB, in 0.1 srewrote telemetry.sqlite: 1.9 GiB to 1.2 GiB, in 41.0 s, and it has auto-vacuum nowA store whose file is not there is skipped. A copy that an earlier rewrite left, such as
auth.sqlite.rewrite, is deleted first, and the start of the server deletes one too. A rewrite that
stopped while it put its copy in place can leave a file under a name such as
auth.sqlite.rewrite-aside-.... The next rewrite and the next start sort it out where they can
prove which file holds the rows. Where they cannot, both files stay, the rewrite refuses that store,
and the server does not start until you keep one of them. The first store that refuses stops the
run. The refusal says whether that store is unchanged or holds the same rows. The run lists the
stores that it rewrote and the stores that it did not reach. A second run is safe, and rewrites
every store again. tadoru rewrite refuses has each
refusal.
The query log is rewritten only in the state root. Where telemetry.place names the runtime
root, the query log is in memory. A rewrite that chooses it refuses
before it writes anything. The files of the query log in the state root are then the old copy of a
change, and stay as they are. Where telemetry.place does not read, the rewrite refuses the query
log too. Run it with --only for the other stores.
A store at an older schema is refused until a start of the server has brought it up. Stop the server again, and run the rewrite. That start serves, so the query log can take new rows meanwhile, and the rewrite keeps them as rows.
What stays out of reach:
- the blocks of the disk that held the old file, which a file system, a snapshot or a solid-state disk can keep;
- an archive taken before, which a restore brings back, so run the rewrite after a restore too;
- what the server writes after the rewrite.
Run it when it matters, such as after a redaction, after an account was removed, and before a backup that leaves the machine.