Skip to content

Reference

Secrets reference ​

Where secrets are kept, how they are named, which hosts they reach, and the rules for typing a value.

Kinds of secret ​

KindName in the treeSet withChat default
an extension's credentialsecret/ext/<extension>/<credential>Set token on the extension, nocturn secret set <extension>[/<credential>]off: only the extension's own code uses it
an entry of nocturn's vaultsecret/vault/<name>nocturn secret set vault/<name> --host …ask
an SSH keysecret/vault/<name>Add an SSH key, nocturn secret set vault/<name> --ssh-user …ask
a mirrored source itemsecret/<alias>a connected sourceask
the mailboxmail/imap, mail/smtpSet up the mailbox, nocturn mail setupused by the mail tools only

Every secret names exact hosts it may go to. Sending it anywhere else, or nowhere, is off. A secret without a host is listed with no destination · cannot be used.

Sources ​

SettingFlagDefaultNotes
Server--urlhttps://; http:// only to the daemon's own machine
Collection--collectionname or id
Organisation--organizationwhen the collection name is not unique
Name--namefrom server and collection, e.g. vault-homelower-case letters, digits, -, at most 32; not vault or ext
Sync--sync5mat least 30s
Credentialsstdin, one per lineAPI key client ID, client secret, account email, master password

Supported type: bitwarden (Vaultwarden or Bitwarden). Several sources per workspace are allowed. An item whose name another source uses already gets the source's name after it: router-office.

Files ​

FileHolds
nocturn-data/master.saltthe salt and check value of the master passphrase
workspaces/<name>/vault.encthe workspace's secrets, AES-256-GCM
workspaces/<name>/secrets.jsonsources and where each vault entry may go; no values
workspaces/<name>/secret-aliases.jsonthe alias of each mirrored item
workspaces/<name>/extensions/<ext>/secrets.encan extension's own encrypted credentials

A workspace's key is derived from the passphrase, the salt and the workspace's name. Renaming or moving the folder breaks its encrypted files.

The passphrase ​

NOCTURN_MASTER_PASSPHRASE unlocks every workspace's vault. The first start with it writes master.salt. Without it, the vaults stay locked and nocturn runs without credentials. A wrong one leaves them locked and logs secret: master locked. There is no recovery.

Typing a value ​

The daemon accepts a value (a token, a password, a source's credentials, an SSH key) only over a private connection:

ConnectionPrivate
from the daemon's own machine, without forwarding headersyes
from a proxy on the daemon's machine that sends X-Forwarded-Proto: httpsyes
from a private address (10.x, 172.16–31.x, 192.168.x, IPv6 ULA) or link-local, without forwarding headersyes
through a proxy on another machine or in another containerno
from a public address, or 100.64.0.0/10no

Elsewhere the app disables the field and shows the command to run on the machine. A value is never sent back to a device.

Scans ​

WhenWhatOn a match
before a request leavesURL, body and the caller's headers: every stored value of 6 characters or more, in common encodings, and known token shapes (a gitleaks-derived rule set)the request is blocked: secret leak blocked
when an answer comes backthe body, line by line for a stream, up to 10 MiBthe value is replaced with [REDACTED]

Redirects are checked again at every hop, at most 10. A request that carries a named secret may not leave its host.

Commands ​

CommandDoes
nocturn secret lsnames of stored secrets
nocturn secret set <target>stores a value from stdin
nocturn secret set <extension>/<credential> --ref <source>:<item>points a credential at an item
nocturn secret rm <target>removes one
nocturn secret source add|set|remove|showmanages sources

All flags: CLI.

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