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/.
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.exampleEnvironment 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
| Variable | Default | Meaning |
|---|---|---|
OPENAI_BASE_URL | OpenAI-compatible endpoint, without /v1. With only OPENAI_API_KEY: https://api.openai.com | |
OPENAI_API_KEY | its key. Daemon and terminal chat refuse to start with neither set | |
OPENAI_MODEL | auto | the model when there is no models.json |
OPENAI_REASONING_EFFORT | the endpoint's | low, medium, high, xhigh; an agent or a chat overrides it |
NOCTURN_MODELS | nocturn-data/models.json | the model presets file (below) |
Server
| Variable | Default | Meaning |
|---|---|---|
NOCTURN_HOST | all interfaces | default of serve --host; 127.0.0.1 for this machine only |
NOCTURN_PORT | 8080 | default of serve --port; where auth finds the daemon |
NOCTURN_HOSTNAMES | comma-separated DNS names allowed besides IPs, localhost, .local; others get 403 | |
NOCTURN_DEV_ORIGINS | comma-separated extra browser origins, for app development; never on a daemon others reach | |
NOCTURN_METRICS_TOKEN | enables GET /metrics (Prometheus) for this bearer token |
Vault and secrets
| Variable | Default | Meaning |
|---|---|---|
NOCTURN_MASTER_PASSPHRASE | unlocks every workspace's vault; first use writes master.salt. Unset: vaults locked. No recovery |
Attachments and media
| Variable | Default | Meaning |
|---|---|---|
NOCTURN_ATTACHMENT_MAX_BYTES | 10485760 (10 MiB) | largest image in a chat |
NOCTURN_ATTACHMENTS_PER_MESSAGE | 4 | images per message |
NOCTURN_AUDIO_MAX_BYTES | 8388608 (8 MiB) | largest voice note |
NOCTURN_FILE_MAX_BYTES | 16777216 (16 MiB) | largest document (PDF) on a work item |
NOCTURN_SHOW_MAX_BYTES | 262144 (256 KiB) | largest block a show tool puts into a chat |
NOCTURN_SHOW_MAX_ROWS | 500 | most rows of a shown table |
Voice
| Variable | Default | Meaning |
|---|---|---|
NOCTURN_TRANSCRIBE | openai if NOCTURN_TRANSCRIBE_MODEL and an endpoint are set, else gemini if GEMINI_API_KEY, else off | who transcribes voice notes: openai, gemini, off; one named without what it needs stops the start |
NOCTURN_TRANSCRIBE_MODEL | gemini-3.5-flash for gemini | transcription model; openai needs one that takes audio |
GEMINI_API_KEY | Gemini key, for transcription and spoken sessions | |
GEMINI_LIVE_MODEL | live audio model; spoken sessions need it and GEMINI_API_KEY | |
NOCTURN_SPEAKER_MODEL | WeSpeaker ResNet34 ONNX checkpoint; unset, speaker recognition is off | |
NOCTURN_VOICE_CAPTURE | folder for each device's microphone audio as 16 kHz WAV | |
NOCTURN_VOICE_APPROVE | nocturn voice only: terminal, or a delay after which each approval is allowed; unset, refused |
Knowledge
| Variable | Default | Meaning |
|---|---|---|
NOCTURN_EMBED_BASE_URL | OPENAI_BASE_URL | embedding endpoint (/v1/embeddings appended); with no endpoint at all, no knowledge_search |
NOCTURN_EMBED_API_KEY | OPENAI_API_KEY | its key |
NOCTURN_EMBED_MODEL | auto | embedding model, never OPENAI_MODEL |
NOCTURN_EMBED_DIMS | 768 | vector length. Changing model or length: delete knowledge.idx.json, re-index |
Push
Needs an app built with your own Apple or Firebase account.
| Variable | Default | Meaning |
|---|---|---|
NOCTURN_APNS_KEY | iPhone: 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_ID | the key's id, the Apple team id, the app's bundle id | |
NOCTURN_APNS_PRODUCTION | sandbox | a 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_CREDENTIALS | Android: Firebase service account key, JSON or path; unset, Android push is off |
SSH, Library and logs
| Variable | Default | Meaning |
|---|---|---|
NOCTURN_SSH_TIMEOUT | 1m | ssh_exec timeout when the call names none |
NOCTURN_SSH_MAX_TIMEOUT | 10m | longest timeout a call may name; not below NOCTURN_SSH_TIMEOUT |
NOCTURN_SSH_MAX_OUTPUT | 65536 (64 KiB) | bytes of stdout, and of stderr, per command |
NOCTURN_CATALOG_URL | https://efuturetoday.github.io/nocturn/catalog.json | the Library's catalog: https:// (http:// on loopback), a local path, or off |
NOCTURN_CATALOG_DEV_KEY | base64 Ed25519 public key also accepted for plugin signatures | |
NOCTURN_LOG | info | debug, 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.
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):
| Field | Default | Meaning |
|---|---|---|
default | preset a chat runs on when it names none | |
historyImages | 4 | images of earlier messages resent each turn; 0: only the turn's own |
imageModel | preset 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[].label | the name | shown in the app |
presets[].model | the provider's model id | |
presets[].images, .audio, .effort | false | takes images (image model: edits pictures); hears audio; takes a reasoning effort |
presets[].imageApi | chat | image model: chat or images (Images API) |
presets[].pricePerImage | image 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.
| File | What 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.md | system prompt for chats and voice (not agents; Persona); missing or empty: the built-in one |
workspace.json | title shown on screen |
permissions.json | the permission tree's stored rules |
vault.enc | the workspace's secrets (encrypted) |
secrets.json | secret sources and where each vault entry may be sent; no values (version 2; 1 still read) |
secret-aliases.json | alias of each mirrored source item |
agents/<name>/agent.md | one 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>.jsonl | work items and collections; an item's last 50 versions |
inbox.json | the Inbox |
wakes.json | chats waiting to resume themselves |
widgets.json | Home widgets and watches |
profile.json | household profile: places, language, units, time zone |
ssh-hosts.json | SSH host keys a person approved |
knowledge.idx.json | document index, with its model and length |
voices.json | voices this workspace recognises |
grants.json, mcp-server.json, reminders.json | older 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.
{ "title": "Home", "forAWhile": "30m", "parkFor": "72h", "widgetIdle": "1h" }| Key | Default | Meaning |
|---|---|---|
title | the folder's name | what the app shows; Settings › Workspaces sets it |
forAWhile | 2h | how long an answer "for a while" lets a chat go on without asking; read at every answer |
parkFor | 168h (7 days) | how long an agent's draft waits for you before it is dropped |
widgetIdle | 30m | how long widgets keep refreshing after a device last looked; never keeps them refreshing |