Skip to content

Concept

Where secrets live ​

Tokens, passwords and keys live in an encrypted vault per workspace, or stay in your Vaultwarden and are mirrored. The model never sees a value: it names a secret, and nocturn adds the value to a request on the way out, only for the host the secret belongs to.

The vault ​

  • One vault per workspace. nocturn-data/workspaces/<name>/vault.enc, encrypted with AES-256-GCM under a key of its own.
  • One passphrase unlocks them. NOCTURN_MASTER_PASSPHRASE, with the salt in nocturn-data/master.salt. Without the passphrase the vaults stay locked and nocturn runs without credentials. There is no recovery.
  • A workspace cannot reach another's secrets. Each key is derived from the workspace's name, so the workspace for a client's servers has no way to the family's mailbox.

Renaming or moving a workspace folder breaks its encrypted files; back one up together with master.salt.

A secret belongs to hosts ​

Every secret names the exact hosts it may be sent to: the host of an MCP server, a plugin's API, a mail server, an SSH host. Sending it anywhere else is off, whatever else the tree says. A secret without a host is not offered at all.

Who may use a secret is a row of the permission tree: secret/<alias>, with a cell for each holder. In a chat, using a mirrored item or a vault entry asks by default.

What goes out is scanned ​

Before a request leaves, nocturn scans the URL, the body and the headers for:

  1. Every stored value, in any common encoding, from six characters up.
  2. Well-known token shapes, from a gitleaks-derived rule set, even when the vault is locked.

A match blocks the request. What comes back is scanned the same way, and a stored value in it is replaced with [REDACTED] before the model reads it.

Values travel only privately ​

A secret's value reaches the daemon only over a private connection: from the machine nocturn runs on, from the home network, or over TLS. Otherwise the app shows the command to run on the machine instead. A value is never sent back to a device.

Vaultwarden ​

You can keep secrets where they are. nocturn reads one collection of a Vaultwarden or Bitwarden server with an account of its own, mirrors each item as secret/<alias>, and syncs every five minutes. It keeps a reference, not a copy. An item's https:// URI names the host it may go to. How: Connect Vaultwarden.

What this does not protect against ​

  • A compromised host. Anything running as your user can read the process. Disk encryption and OS isolation are the layer below.
  • Your model provider. Its output is gated, but it sees your conversations.
  • Plain HTTP on your network. The daemon has no TLS of its own; use a VPN or a TLS proxy from outside (Remote access).

nocturn is open source. Example hosts and people on these pages are made up.