API keys can leak. Rotating an executor’s key on a schedule (or in response to a suspected leak) keeps blast radius small without taking any nodes offline. The flow is the same shape on both backends: issue a new key, walk it out to the executor, confirm the executor authenticated successfully, retire the old key.Documentation Index
Fetch the complete documentation index at: https://docs.novacula.io/llms.txt
Use this file to discover all available pages before exploring further.
When to rotate
- Routine — every 90 days for production keys (a good audit-friendly cadence).
- On exit — when a teammate who handled the key leaves or changes responsibilities.
- On suspicion — anytime you can’t account for where the key has been seen (chat logs, screenshots, dev laptops).
Steps (common to both backends)
Issue a new key
From Settings → API keys → Create API key:
- Use a name that makes the rotation explicit, e.g.
agent-1-2026-05. - Same
purpose(executor) as the old key. - Copy the plaintext value — it is shown only once.
Restart the executor process
The executor reads the API key once at startup. After replacing the key on disk, restart the process so the next
syncExecutor uses the new value.Confirm the new key authenticated
On the API keys page, the new key’s Last used column updates within ~5s. Cross-reference with the executor row’s “last used key” indicator — it should reflect the new key id.
Disable the old key
Once the new key is confirmed working:
- Find the old key in the list.
- Click Disable.
- Optionally Delete after a cooldown (a day is safe — gives you a clean rollback window).
401.Agent (bare-metal)
Replace the value in/etc/novacula/agent.toml:
syncExecutor after the restart.
Operator (Kubernetes)
Update theSecret and bounce the operator pod:
rollout restart is required.
Failure recovery
If the executor fails to come back up after the rotation:- Don’t disable the old key yet. Run on parallel keys until the new one works.
- Check the executor logs for the auth error message. The most common cause is a copy-paste error introducing whitespace.
- If you’ve already disabled the old key, re-enable it from the API keys list — disabled keys can be re-enabled (deleted ones cannot).
- If you’ve deleted the old key and the new one still fails, issue a third key and try again.
Why parallel keys
The reason this is zero-downtime is that the new key is active before the old is disabled. The executor restart cleanly hands off authentication; the control plane never refuses a sync because of the rotation itself. If you instead delete the old key first and then create a new one, you create a window where the executor can’t authenticate at all — its row will gooffline and any nodes assigned to it stop reconciling until the new key is in place.
Audit
Every key creation, disable, and delete is recorded in the audit log with actor + target. The key id (not the plaintext) appears in the log line so you can correlate it with the executor’sExecutorApiKeyUsage history.