Keyturn docsStart here
How commands work
Learn these rules once; they hold for all 612 commands.
The grammar
keyturn <area> <action> [what] [--flags]
keyturn user show "Owen Price"
keyturn db compact mail/ --reduce-size --dry-run
keyturn acl set apps/sales.nsf --name -Default- --level readerHelp is built in, with real examples for every command:
$ keyturn --help # every area and action
$ keyturn help user # one area, a line per action
$ keyturn user delete --help # flags and examples
$ keyturn explain db compact # what it does, how, and how it checks the resultReads, changes and destructive changes
Every command has a tier. The command reference shows it next to each one.
| Tier | Meaning | What Keyturn asks |
|---|---|---|
| R Read | Looks only. 273 commands. | Your sign-in. Never a code. |
| M Change | Changes something that can usually be put back. 243 commands. | A one-time code (when the server has require-otp). |
| D Destructive | Deletes, resets or can't be reversed. 96 commands. | A code, and --yes (or a typed confirmation at the prompt). |
Keyturn checks a change's own arguments and reads what it needs before it sends your code, so a mistyped name or a refused right leaves the code unspent.
Preview, then change
Almost every change takes --dry-run: it says what would change and changes nothing, with no code. Then run the same line without it. After a change, Keyturn reads the result back and says whether it took effect (the "verified by" line in each command's help says how).
Output for people and for scripts
| Flag | Gives |
|---|---|
-o text (default) | Tables and sentences for people. |
-o json | The domctl/v1 envelope: result, warnings, problems, meta. Stable for scripts. |
-o csv | Any read's rows as CSV, ready for Excel or a target list. |
One server, several, or all
Reads (and a set of safe changes) fan out across servers. Each server is its own run, with its own sign-in and its own code, and the output has a section per server and a total.
keyturn session list --context-group domain # every server you connected to
keyturn cert expiring --servers mail1,mail2 # named profiles
keyturn fleet report --all-servers # every Server document in the Directory
keyturn task restart http --servers mail1,mail2 --fan-out-changes --yesA change across servers needs --fan-out-changes --yes on purpose, so it never happens by accident. Use --parallel N (4 by default) and --server-timeout (10 minutes) to pace it.
Plans: review many changes, approve once per server
A plan is a list of Keyturn commands you review and then apply as one run. Write one from a text file, a CSV, or any change with a target list. You approve it with one code per server, not one per change. The plan file never holds a code, password or token.
$ cat fix-acls.txt
acl set apps/sales.nsf --name -Default- --level reader --server apps1
acl set apps/budget.nsf --name -Default- --level reader --server mail1
$ keyturn plan -f fix-acls.txt # writes keyturn-plan-<hash>.json and shows it
$ keyturn plan show keyturn-plan-4c7053e5f9dd.json
$ keyturn apply keyturn-plan-4c7053e5f9dd.json # one code per server
$ keyturn batch status # runs on this machine
$ keyturn undo 20261110-051721-76d0 --dry-run # reverse a run, last change first- Runs are journaled. If one stops (a failure, a closed laptop),
keyturn batch resume RUNcarries on from the first step not done. - Pacing:
--rate 10/minspaces changes out;--window 22-06only changes between those local hours;--keep-goingruns past a failed step. - Undo covers ACL entries, group members, groups and people created, and Person fields. AdminP requests, console commands and deletes can't be undone, and Keyturn says so. Undo copies are kept 30 days.
- Two-person rule (optional,
plan-two-person = d-tieron the server): a plan with a destructive step waits for a second admin'skeyturn plan cosign.
Bulk by intent
Instead of listing targets yourself, name them. Keyturn runs the read that finds them, says how many, then previews, plans or applies.
| For | Flags | Example |
|---|---|---|
| Databases | --all --folder DIR --template NAME --where EXPR --match GLOB | db quota set --folder mail --limit 2048 --warning 1800 --dry-run |
| People | --where FORMULA --ou OU --members-of GROUP | user set CompanyName="Acme Boston" --ou Boston --dry-run |
| Groups | --where FORMULA --with-member NAME | group remove --with-member "Pat Doe/Sales/Acme" --member "Pat Doe/Sales/Acme" |
| Your own list | --targets FILE or --select '<read>' | db quota set --targets mail.txt --limit 2048 --apply |
Without --dry-run the line writes a plan for keyturn apply; add --apply to run it now. More than 25 targets at once also need --yes. Database facts for --where include sizeMB, freeMB, ods, fti, modifiedDays and template, for example --where 'sizeMB > 500 & !fti'.
Exit codes
| Code | Meaning |
|---|---|
| 0 | OK, including "already that way, nothing changed". |
| 1 | Failed: refused, or did not take effect. |
| 2 | Usage: a typo in the command line. |
| 3 | Permission denied. The message names the right or license needed. |
| 4 | Can't connect. |
| 5 | Accepted, but not confirmed within --timeout. Check again rather than retry. |
| 6 | Partly done (some steps of a batch failed). |
| 7 | A precondition failed. |
| 8 | Needs --yes. Nothing was sent. |
| 9 | Sign-in needed: a password or a one-time code. |
| 10 | A decision is open (export runs). |
What gets logged
Every change, console command, sign-in and second-factor event goes to the server console and log.nsf with the person's name. No password or code is ever logged. Your own machine keeps a log too:
$ keyturn meta audit tail # the last changes this machine made
$ keyturn meta audit export > audit.jsonl # for a SIEM or an archiveHCL, HCL Domino, Domino, Notes, HCL Traveler, HCL Verse and HCL Nomad are trademarks or registered trademarks of HCL Technologies Limited. Microsoft, Windows, Excel, Power Query and Power BI are trademarks of the Microsoft group of companies. macOS is a trademark of Apple Inc. Linux is the registered trademark of Linus Torvalds. Let's Encrypt is a trademark of the Internet Security Research Group. Claude and Claude Code are trademarks of Anthropic, PBC. Other names may be trademarks of their respective owners. KernalWorks is not affiliated with, sponsored by, or endorsed by any of them.