Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Service states

The service is always in one of five states: Starting, Locked, Checking, Ready or Unavailable. The state decides what the request listeners do with a request and which admin commands run. Only Ready serves requests; every other state answers 503 with a short reason, so a caller can tell a locked vault from a broken one (§15).

Terms follow the glossary. The errors reference lists every refusal these states cause.

The state diagram

stateDiagram-v2
    [*] --> Starting
    Starting --> Locked: interactive unlock required
    Starting --> Checking: TPM or host unlock succeeds and memory is locked
    Locked --> Checking: authorized unlock succeeds and memory is locked
    Checking --> Ready: storage and current approval verify
    Checking --> Unavailable: invalid policy or damaged shared state
    Ready --> Checking: explicit reload
    Ready --> Locked: explicit lock or configured key removal
    Unavailable --> Checking: authorized repair or committed transaction recovery
    Unavailable --> Locked: explicit lock
    Ready --> [*]: stop and clear memory

The diagram is the one in the specification. The table below says the same in words.

FromToWhen
StartingLockedThe vault needs an interactive unlock: every Development start, and a Protected or Container start whose host unlock handoff was absent or refused.
StartingCheckingA host unlock succeeded: in the Protected and Container profiles, the unlock handoff opened the vault at startup. On a protected install the host’s handoff unit unseals that identity from the TPM (TPM unlock).
LockedCheckingiron-vault unlock succeeded.
CheckingReadyThe config check passed: storage and the current approval verify.
CheckingUnavailableThe config check failed: the policy is invalid, or shared state is damaged.
ReadyCheckingA reload (SIGHUP), a config approve about to commit, or a committed replace or rm.
ReadyLockediron-vault lock. Key removal (a YubiKey) comes in a later phase.
UnavailableCheckingA config approval from policy invalid, or an authorized repair.
UnavailableLockediron-vault lock.
ReadystoppedThe service stops and clears its memory.

Any other move is refused, not performed. status can also print stopped, a marker for a service that has stopped from Ready; it is not one of the five states.

What each state means

StateVault identity in memoryRequests getWhat to do
Startingno503 lockedWait; it lasts a moment.
Lockedno503 lockediron-vault unlock, or iron-vault init if there is no vault yet.
Checkingyes503 checkingWait for the check to finish.
ReadyyesservedNothing.
Unavailableyes, but no policy or records503 policy invalid or 503 recovery neededRead status and the log’s config.check-failed. For policy invalid, approve a good config.

While the service is not Ready, the request listeners come from the published config.toml without its approval verified. They answer only 503 with the reason: they never identify a caller, select a route or touch a credential. That way a caller sees why it is refused, instead of a refused connection.

A listener that cannot be opened, whether provisional or approved, is left out and the others keep serving, so the state does not change. iron-vault status lists it under Listeners not open: with a reason: tls-key-mismatch, tls-file-unreadable, tls-certificate-invalid, tls-key-unusable, address-in-use, plain-http-off-loopback, socket-path, socket-activation-missing, socket-activation-mismatch or bind-refused. The log names the path or address. Fix the cause and approve a config again to open it; the entry drops off when the listener opens or the config no longer names it.

Unavailable has two reasons:

  • policy invalid: the config or its approval did not verify, or a verified config would not activate. A hand edit of the published config is the usual cause (Tamper detection and recovery). Approving a good config moves the service through Checking to Ready.
  • recovery needed: the vault’s shared state is damaged, or a committed change could not be finished. The log’s remediation field says what to do.

A damaged credential record is not a state. Only the routes that use it answer 503, and the rest keep working. status lists it. The same goes for an OAuth account record that needs login or is unusable.

Admin commands by state

ping, status and caller-token run in every state. list runs in every state too, but shows credentials only when the vault is open. The rest run only where this table says; elsewhere they are refused with wrong-state, or for config approve with approval-unavailable.

CommandStartingLockedCheckingReadyUnavailable
unlock, unlock --recoveryyes
init, importyes
recovery checkyesyes
lockyesyes
config approveyespolicy invalid only
add, replace, rm, exportyes
reload (SIGHUP)yes

A SIGHUP in any state but Ready is ignored, so a reload is never a way out of Unavailable.

status

iron-vault status prints one field per line, in a fixed order. It changes nothing, holds no secret, and works in every state. It exits 0 when the service is Ready and 4 otherwise, so a script can wait on it.

service: ready
profile: development — no isolation from malware running as alice
vault: unlocked
vault id: 2a682de7-b14d-4900-9ea9-0c968e1a6589
approval committed: 4
approval highest reserved: 4
memory protection: NOT protected, swap protection unavailable (RLIMIT_MEMLOCK soft limit is 8315834368 bytes, not unlimited)
recovery last checked: 2026-11-06 (1 day ago)
credential httpbin_key: healthy
credential venice_chat: healthy
FieldValuesMeaning
servicestarting, locked, checking, ready, unavailable, stoppedThe service state.
reasonpolicy invalid, recovery neededOnly when the service is unavailable: why.
profileprotected, container, development — no isolation from malware running as <user>The deployment profile, fixed when the binary was built (below).
vaultlocked, unlocked, not initialized (run iron-vault init), initialization unfinished (run iron-vault init again), import unfinished (run iron-vault import again), reset unfinished (run iron-vault reset again)Whether a vault exists and is open. unlocked means Checking or Ready. Unavailable shows locked: a failed check closes the vault’s records, though the service keeps the vault identity.
vault ida UUID, or unknownThe vault’s ID. Unknown while no vault is open.
approval committeda number, none, or unknown while the vault is lockedThe approval version of the active config.
approval highest reserveda number, or unknown while the vault is lockedThe highest version ever reserved. Higher than the committed version after an approval that failed once it had reserved one.
memory protectionlocked against swap, NOT protected, swap protection unavailable (<why>), NOT protected, unsupported on this platformWhether the service’s memory is kept out of swap. Only locked against swap means it is.
host unlockunlocked, absent, unseal_failed, owner_locked, refusedHow the startup host unlock came out; the line is absent in the development profile, which tries none. unseal_failed means the host’s TPM unseal failed, as after a firmware dbx or KEK update, and the service waits for a passphrase unlock.
recovery last checkedsee belowWhen recovery check last proved the recovery key opens this vault.
credential <name>healthy, or damaged (<damage>); unavailable routes: <routes>, or needs login (<cause>); unavailable routes: <routes>, or unusable (<cause>); unavailable routes: <routes>One line per credential, in name order. The damage is missing, substituted or unreadable. A needs-login cause is refused or uncertain. An unusable OAuth account record loaded but cannot serve: its cause is client missing, client damaged, not a client record (the record it names as its client is another kind), or origin outside resource hosts (it may reach a host its client’s provider definition does not list).
credentialsnone, unknown while the vault is lockedPrinted instead of the credential lines when there are none, or they are unknown.
route <name>unavailable (pinned CA unavailable)One line per route that cannot serve for a reason of its own.
Listeners not open:then one line per listener, <name>: <what failed> (<reason>)Printed only when a listener failed to open; the reasons are listed above.

The vault ID, the approval versions and the credentials are sealed with the vault identity, so they are unknown in Starting, Locked and Unavailable, and status prints them as unknown.

recovery last checked takes one of these forms:

FormMeaning
2027-02-01 (37 days ago)The UTC date of the last good check, and the days since. today and 1 day ago for zero and one.
never (reminders counting since 2026-11-06)No check yet; reminders count from that date.
unknown (the vault is not initialized)There is no vault.
unknown (no check record yet)recovery.toml does not exist.
unknown (the check record is unusable (<error kind>))recovery.toml could not be read.

Any of these ends in , overdue inside the parentheses when a recovery reminder is due. Run iron-vault recovery check: see Check and store your recovery key.

Development mode and a protected install

The deployment profile is fixed at build time, never by config or flag, so a packaged binary cannot be switched into development mode. Each profile is named in status, in ping, and as deployment_profile in every log record.

ProtectedDevelopmentContainer
Built withno feature (the .deb)--features dev-mode--features container
Runs asthe iron-vault system accountyouthe iron-vault account in the image
Admin principalsroot, so you use sudoyouroot only
Unlock at startupfrom the host unlock handoff when one is there (files); otherwise Locked, unlock with the vault passphrasenone: starts Lockedfrom the host unlock handoff when one is there (files); otherwise Locked, as protected
Memory not locked against swapstays Locked: unlock, init and import are refused with memory-unprotectedunlocks anyway; status says NOT protectedas protected
Callerspeer account, token or listenertoken or listener only: a peer caller may never be the service’s own account, and in development that is yousee docker-compose.md
TCP listenersfrom systemd socket unitsbound by the servicebound by the service
Filessystem pathsyour XDG directoriesthe protected paths, inside the container
Isolation from malware running as youyesnonefrom the host’s ordinary accounts, not from whoever controls Docker

Development mode relaxes nothing else: callers still authenticate, routes are still checked, TLS is still verified, responses are still scrubbed, the vault is still encrypted and configs still need approval. It refuses to run as root.

A protected install’s memory rule is why it can sit in Locked with nothing wrong in its config: the service has not failed, so systemd does not restart it. Fix the limit (LimitMEMLOCK=infinity on the unit), restart the service and unlock. After any restart or upgrade a passphrase install starts Locked again and needs unlock.