CLI reference
Every subcommand of `luksbox`, with examples.
The luksbox binary is a single CLI with subcommands for every
vault operation. Run luksbox --help for the always-current list,
or luksbox <subcommand> --help for per-subcommand detail.
Subcommand index
Vaults and keyslots
| Command | Purpose |
|---|---|
create |
Create a new encrypted container with the first keyslot |
info |
Show the header without unlocking: cipher, header format, and every keyslot (kind, Argon2id cost, TPM SRK pinning, FIDO2 compatibility). --header <file> for a detached header |
size |
Show how much disk space a vault uses; set its maximum size or give back free space at its end |
mount |
Mount the vault as a real drive (FUSE on Linux/macOS, WinFsp on Windows). Runs in the background on every platform (Windows: 0.6.1+); -f keeps it in the foreground |
umount |
Unmount a mounted vault: luksbox umount <mountpoint>, mountpoint only. On Windows (0.6.1+) luksbox umount Z: works from any window of the same session and waits for the final flush. See Unmount |
enroll |
Add a new keyslot to an existing vault (passphrase, FIDO2, TPM 2.0, Secure Enclave, or a TPM / Secure Enclave hybrid PQ variant) |
update |
Replace one keyslot's secret in place (--slot N): a new passphrase, a new FIDO2 credential, or a re-sealed TPM slot. Keeps the slot's Argon2id cost unless --kdf |
revoke |
Disable a keyslot without rotating the MVK |
rotate-mvk |
Generate a new MVK, re-encrypt the vault and re-wrap every keyslot under it (interactive) |
upgrade-header |
Move a vault to header format v3, so a restored older keyslot table is detected (one-way, 0.6.0+) |
migrate-fido2-slot |
Migrate a pre-v0.3.0 FIDO2 keyslot to the cross-platform V4 convention |
migrate-to-v3 |
Copy a v2-format vault into a new v3-format vault (--dst <path>). See create |
list-fido2-devices |
Enumerate plugged-in FIDO2 authenticators with their device paths |
wizard |
Launch the interactive TUI - no flags to remember |
Files inside a vault
These unlock the vault, do one thing, and close it; no mount needed.
| Command | Purpose |
|---|---|
ls |
List a directory inside the vault (default /) |
put |
Copy a local file into the vault: luksbox put <vault> <local> <inner> |
get |
Copy a file out of the vault: luksbox get <vault> <inner> <local> |
cat |
Print a file from the vault to stdout |
mkdir |
Create a directory inside the vault |
rm |
Remove a file from the vault |
rmdir |
Remove an empty directory from the vault |
mv |
Rename or move a file or directory inside the vault: luksbox mv <vault> <old> <new> |
Deniable vaults
See Deniable vaults. All four take the
cipher, Argon2id parameters and credential type you chose at creation
(--cipher, --argon2-m, --argon2-t, --argon2-p, --credential).
| Command | Purpose |
|---|---|
deniable-init |
Create a deniable vault, whose header is indistinguishable from random bytes |
deniable-mount |
Mount a deniable vault (background by default, -f for foreground) |
deniable-info |
Check that a deniable vault opens with the given parameters, and print its header fields and header format |
deniable-upgrade-header |
Move a deniable vault to header format v3 (one-way, 0.6.0+) |
Utilities
| Command | Purpose |
|---|---|
genpass |
Print a random 20-character passphrase (about 99 bits) |
kdf-bench |
Time the Argon2id presets on this machine (--samples N), to choose --kdf |
cleanup-orphans |
List temp files a crashed run left next to a vault; --delete removes the safe ones (never a .rotating copy) |
panic |
Destroy a vault for good: overwrite its header and header mirror with random bytes (--wipe-data for the whole file). Asks for confirmation unless -y. See Panic mode |
Forensic and partial-recovery subcommands
These five live in their own section because they are post-incident tools, not day-to-day operations. See the forensics page for the workflow that ties them together.
| Command | Purpose |
|---|---|
header-backup |
Save the 8 KiB header bytes to a separate file. Equivalent to cryptsetup luksHeaderBackup |
header-restore |
Restore the on-disk header from a previously saved backup (HMAC-verified by default) |
header-dump |
Decrypt the metadata blob and emit a JSON tree of every inode, chunk reference, and keyslot summary |
check |
Walk every used chunk, AEAD-decrypt it, report per-chunk status. Read-only |
extract |
Forensic best-effort extract: same as get but tolerates per-chunk AEAD failures (with explicit --tolerate-errors flag) |
Common flags
| Flag | Used by | Purpose |
|---|---|---|
--header <path> |
most | Detached header (default: header inline at start of .lbx) |
--cipher <aes|aes-gcm|chacha> |
create |
AEAD primitive (default: aes = AES-256-GCM-SIV) |
--kdf <interactive|moderate|sensitive> |
create, enroll, update |
Argon2id preset. enroll and update default to the cost already in the vault (0.6.0+) |
--kdf-target-time <time> |
create |
Calibrate Argon2id to this unlock time instead of a preset; warns below 64 MiB / 3 passes |
--fido2 / --tpm2 / --tpm2-fido2 / --sep |
every command that unlocks a vault | Unlock with that kind of slot instead of the passphrase prompt |
--anchor <path> |
every command that unlocks a vault; create and deniable-init create it |
Rollback anchor: checked before the command runs, advanced after it changes the vault. Since 0.6.0 also honoured by enroll, revoke, update, rotate-mvk and header-restore. See header format v3 |
--fido2-device <path> |
global (FIDO2 ops) | Pin a specific authenticator (use list-fido2-devices to find paths). On Linux / macOS, required when more than one is plugged in (0.6.0+) |
--tpm-pin-srk |
global (commands that seal a new TPM slot: enroll, update, deniable-init, wizard) |
Record the TPM's storage root key in new TPM keyslots; unlock then refuses a substituted key. A pinned slot needs 0.6.0+ to unlock |
--kind <slot-kind> |
create, enroll, update |
Pick the keyslot kind: passphrase / fido2 / tpm2 / tpm2-pin / tpm2-fido2 / sep / the hybrid-pq* kinds / ... Each command accepts a different subset; see create and enroll |
--pq-hybrid <kyber-path> |
hybrid-PQ ops | Path to the .kyber seed file (create / enroll write a new one there) |
--header-v2 |
create, deniable-init |
Keep header format v2 so LUKSbox 0.5.x and earlier can still open the vault. See create |
--max-size <size> / --max <size> |
create / size |
Maximum size of the vault file (6G, 500M, unlimited). See size |
--sync |
mount, deniable-mount |
Eager flush: every metadata-mutating op is durable on return. Default is deferred (a 30 s background timer drives flushes), which keeps rm / cp -r fast on vaults with thousands of files. See mount -> Flush policy. |
-f / --foreground |
mount, deniable-mount |
Stay attached to the terminal instead of running in the background |
Environment variables
| Variable | Purpose |
|---|---|
LUKSBOX_PASSPHRASE |
The passphrase that unlocks the vault (avoids the prompt in scripts). Since 0.6.0 it is never reused as a new secret: enroll, update, migrate-to-v3 and new seed files take theirs from LUKSBOX_NEW_PASSPHRASE (they print a note and prompt otherwise) |
LUKSBOX_NEW_PASSPHRASE |
A new secret: the passphrase of a new vault or keyslot (create, enroll, update, migrate-to-v3), the PIN of a new tpm2-pin slot, the passphrase of a new .kyber seed file. create also accepts LUKSBOX_PASSPHRASE |
LUKSBOX_FIDO2_PIN |
Provide the FIDO2 PIN non-interactively. Ignored on Windows, where Windows asks for the PIN in its own prompt (0.6.1+) |
LUKSBOX_TPM_PIN |
The PIN of a PIN-protected TPM slot at unlock (0.6.0+). Never taken from LUKSBOX_PASSPHRASE or a piped passphrase: a wrong PIN counts toward the TPM's lockout |
LUKSBOX_SEED_PASSPHRASE |
At unlock, the .kyber seed-file passphrase when it differs from the slot passphrase (0.6.0+) |
LUKSBOX_SLOT_PASSPHRASE |
At unlock, the optional extra passphrase of a hybrid FIDO2 + ML-KEM slot added from the wizard (0.6.0+) |
LUKSBOX_TPM_PIN_SRK=1 |
Same as --tpm-pin-srk |
LUKSBOX_FORMAT_V2 |
Keep --format v2 vaults on v2 when a current LUKSbox writes to them. See create |
LUKSBOX_TEST_FAST_KDF |
Override Argon2id to weak-test parameters - debug builds only, compiled out of release binaries |
LUKSBOX_NO_FOLLOW_SYMLINKS |
Refuse to open vaults whose path is a symlink (paranoid mode) |
Instead of LUKSBOX_PASSPHRASE, you can pipe the passphrase on stdin
(cat pp.txt | luksbox ls my.lbx): other processes of the same user
can read a process's environment, but not its pipe. Giving both is
refused. The full list of variables that change a security property is
in SECURITY.md.
For full per-subcommand help: luksbox <subcommand> --help.
- luksbox create Create a new encrypted container.
- luksbox open Unlock a vault and run a follow-up command (or just verify it opens).
- luksbox mount Mount a vault as a real drive (FUSE / WinFsp).
- luksbox size How much disk space a vault uses; its maximum size; giving back free space at the end of the vault file.
- luksbox enroll Add a new keyslot to an existing vault.
- luksbox migrate-fido2-slot Migrate a pre-v0.3.0 FIDO2 keyslot to the cross-platform v0.3.0 (V4) wire convention.
- luksbox revoke Disable a keyslot without rotating the MVK.
- luksbox rotate-mvk Generate a fresh master volume key, re-encrypt the vault.
- luksbox upgrade-header Move an existing vault to header format v3, so a restored older keyslot table is detected.
- luksbox header-backup Save a copy of the 8 KiB header bytes for offline recovery.
- luksbox header-restore Replace a damaged on-disk header with a previously saved backup.
- luksbox header-dump Decrypt the metadata blob and emit a JSON tree of every inode and chunk reference.
- luksbox check Walk every used chunk in the vault, AEAD-decrypt it, and report per-chunk status.
- luksbox extract --tolerate-errors Forensic best-effort extract: recover what is still readable from a partly-corrupted file.