Skip to content

Reference

Configuration ​

nocturn is configured by environment variables, models.json for model presets, and a few files in each workspace. Everything it keeps lies in one folder, nocturn-data/.

ini
OPENAI_BASE_URL=https://llm.home.example
OPENAI_API_KEY=your-key-here
OPENAI_MODEL=your-model-id
NOCTURN_MASTER_PASSPHRASE=a-long-passphrase
NOCTURN_HOSTNAMES=nocturn.home.example

Environment variables ​

nocturn reads .env in the folder it starts in, then the environment (which wins). A number or duration that does not parse stops the start, naming the variable; unknown variables are ignored. Durations are Go durations (90s, 5m, 1h30m). A switch takes true, 1, yes or on and false, 0, no or off, in any case; unset is off. .env.example lists the same variables.

Model endpoint ​

VariableDefaultMeaning
OPENAI_BASE_URLOpenAI-compatible endpoint, without /v1. With only OPENAI_API_KEY: https://api.openai.com
OPENAI_API_KEYits key. Daemon and terminal chat refuse to start with neither set
OPENAI_MODELautothe model when there is no models.json
OPENAI_REASONING_EFFORTthe endpoint'slow, medium, high, xhigh; an agent or a chat overrides it
NOCTURN_MODELSnocturn-data/models.jsonthe model presets file (below)

Server ​

VariableDefaultMeaning
NOCTURN_HOSTall interfacesdefault of serve --host; 127.0.0.1 for this machine only
NOCTURN_PORT8080default of serve --port; where auth finds the daemon
NOCTURN_HOSTNAMEScomma-separated DNS names allowed besides IPs, localhost, .local; others get 403
NOCTURN_DEV_ORIGINScomma-separated extra browser origins, for app development; never on a daemon others reach
NOCTURN_METRICS_TOKENenables GET /metrics (Prometheus) for this bearer token

Vault and secrets ​

VariableDefaultMeaning
NOCTURN_MASTER_PASSPHRASEunlocks every workspace's vault; first use writes master.salt. Unset: vaults locked. No recovery

Attachments and media ​

VariableDefaultMeaning
NOCTURN_ATTACHMENT_MAX_BYTES10485760 (10 MiB)largest image in a chat
NOCTURN_ATTACHMENTS_PER_MESSAGE4images per message
NOCTURN_AUDIO_MAX_BYTES8388608 (8 MiB)largest voice note
NOCTURN_FILE_MAX_BYTES16777216 (16 MiB)largest document (PDF) on a work item
NOCTURN_SHOW_MAX_BYTES262144 (256 KiB)largest block a show tool puts into a chat
NOCTURN_SHOW_MAX_ROWS500most rows of a shown table

Voice ​

VariableDefaultMeaning
NOCTURN_TRANSCRIBEopenai if NOCTURN_TRANSCRIBE_MODEL and an endpoint are set, else gemini if GEMINI_API_KEY, else offwho transcribes voice notes: openai, gemini, off; one named without what it needs stops the start
NOCTURN_TRANSCRIBE_MODELgemini-3.5-flash for geminitranscription model; openai needs one that takes audio
GEMINI_API_KEYGemini key, for transcription and spoken sessions
GEMINI_LIVE_MODELlive audio model; spoken sessions need it and GEMINI_API_KEY
NOCTURN_SPEAKER_MODELWeSpeaker ResNet34 ONNX checkpoint; unset, speaker recognition is off
NOCTURN_VOICE_CAPTUREfolder for each device's microphone audio as 16 kHz WAV
NOCTURN_VOICE_APPROVEnocturn voice only: terminal, or a delay after which each approval is allowed; unset, refused

Knowledge ​

VariableDefaultMeaning
NOCTURN_EMBED_BASE_URLOPENAI_BASE_URLembedding endpoint (/v1/embeddings appended); with no endpoint at all, no knowledge_search
NOCTURN_EMBED_API_KEYOPENAI_API_KEYits key
NOCTURN_EMBED_MODELautoembedding model, never OPENAI_MODEL
NOCTURN_EMBED_DIMS768vector length. Changing model or length: delete knowledge.idx.json, re-index

Push ​

Needs an app built with your own Apple or Firebase account.

VariableDefaultMeaning
NOCTURN_APNS_KEYiPhone: APNs .p8 key, path or PEM (\n for line breaks); unset, iPhone push is off
NOCTURN_APNS_KEY_ID, NOCTURN_APNS_TEAM_ID, NOCTURN_APNS_BUNDLE_IDthe key's id, the Apple team id, the app's bundle id
NOCTURN_APNS_PRODUCTIONsandboxa switch, on: Apple's production service (TestFlight, App Store); a value that is no switch turns iPhone push off, naming it in the log
NOCTURN_FCM_CREDENTIALSAndroid: Firebase service account key, JSON or path; unset, Android push is off

SSH, Library and logs ​

VariableDefaultMeaning
NOCTURN_SSH_TIMEOUT1mssh_exec timeout when the call names none
NOCTURN_SSH_MAX_TIMEOUT10mlongest timeout a call may name; not below NOCTURN_SSH_TIMEOUT
NOCTURN_SSH_MAX_OUTPUT65536 (64 KiB)bytes of stdout, and of stderr, per command
NOCTURN_CATALOG_URLhttps://efuturetoday.github.io/nocturn/catalog.jsonthe Library's catalog: https:// (http:// on loopback), a local path, or off
NOCTURN_CATALOG_DEV_KEYbase64 Ed25519 public key also accepted for plugin signatures
NOCTURN_LOGinfodebug, info, warn, error. Daemon: stderr (JSON when not a terminal); terminal chat: nocturn.log

Data folder ​

./nocturn-data/ next to .env; no flag moves it. In the container image: /data/nocturn-data.

text
nocturn-data/
├── workspaces/           one folder per workspace; main always exists
│   └── .trash/           deleted workspaces, as <name>-<unix seconds>
├── devices.json          paired devices: name, class, token hash     (owner-only)
├── cli-bearer            the command line's credential; delete and restart to replace (owner-only)
├── master.salt           salt and check value of the master passphrase (owner-only)
├── models.json           model presets (optional)
├── catalog.json          the last Library catalog fetched
├── catalog-serials.json  highest signed serial accepted per Library plugin
└── nocturn.log           the terminal chat's log (rotated to nocturn.log.1 past 8 MiB)

models.json (missing: one preset, OPENAI_MODEL, with effort, without images; unparsable: the start stops):

FieldDefaultMeaning
defaultpreset a chat runs on when it names none
historyImages4images of earlier messages resent each turn; 0: only the turn's own
imageModelpreset the image tools draw with; unset, no image tools
presets[].name^[a-z0-9][a-z0-9-]{0,31}$; what an agent's model: names
presets[].labelthe nameshown in the app
presets[].modelthe provider's model id
presets[].images, .audio, .effortfalsetakes images (image model: edits pictures); hears audio; takes a reasoning effort
presets[].imageApichatimage model: chat or images (Images API)
presets[].pricePerImageimage model: USD, shown on each approval

A workspace ​

nocturn-data/workspaces/<name>/; name: lowercase letters, digits, -, _, starting with a letter or digit. The assistant's file tools see only mnt/. Files appear when first needed. Encrypted files are keyed to the passphrase, master.salt and the folder names: renaming or moving breaks them.

FileWhat it holds
mnt/files the assistant's file tools see and change
mnt/knowledge/documents to index and search
memory/memory notes, written only through memory_write
PERSONA.mdsystem prompt for chats and voice (not agents; Persona); missing or empty: the built-in one
workspace.jsontitle shown on screen
permissions.jsonthe permission tree's stored rules
vault.encthe workspace's secrets (encrypted)
secrets.jsonsecret sources and where each vault entry may be sent; no values (version 2; 1 still read)
secret-aliases.jsonalias of each mirrored source item
agents/<name>/agent.mdone agent
extensions/<name>/one extension: SKILL.md, plugin.json, plugin.js, mcp.json, manifest.json, config.json, secrets.enc
mail/the mailbox: mail.json, secrets.enc
chats/, agent-runs/conversations, agents' runs
attachments/pictures, voice notes and documents sent to chats and items
work.json, work-revisions/<id>.jsonlwork items and collections; an item's last 50 versions
inbox.jsonthe Inbox
wakes.jsonchats waiting to resume themselves
widgets.jsonHome widgets and watches
profile.jsonhousehold profile: places, language, units, time zone
ssh-hosts.jsonSSH host keys a person approved
knowledge.idx.jsondocument index, with its model and length
voices.jsonvoices this workspace recognises
grants.json, mcp-server.json, reminders.jsonolder formats, migrated once on first open (the first two kept as .migrated)

workspace.json ​

The parts of a workspace a person edits. Every key is optional; a missing or unreadable value is the default.

json
{ "title": "Home", "forAWhile": "30m", "parkFor": "72h", "widgetIdle": "1h" }
KeyDefaultMeaning
titlethe folder's namewhat the app shows; Settings › Workspaces sets it
forAWhile2hhow long an answer "for a while" lets a chat go on without asking; read at every answer
parkFor168h (7 days)how long an agent's draft waits for you before it is dropped
widgetIdle30mhow long widgets keep refreshing after a device last looked; never keeps them refreshing

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