Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

docs(voice): describe keys saved in the app, always-on LiveKit and the shared-key risk

shoudi zhengbaec4262a27c
diff --git a/.env.example b/.env.example
index 6c00aa89..aa2902c8 100644
--- a/.env.example
+++ b/.env.example
@@ -109,7 +109,8 @@ TEAMHUB_ARTIFACT_STORAGE_ROOT=.local/teamhub/artifacts
# PATH on the LIVEKIT_* below, with or without a voice key
# (scripts/dev-livekit.ts). node-services supervises
# the separate ASR, recorder and Live workers. Soniox enables recording,
-# dictation and archive recovery; empty keeps them off. Recordings go to
+# dictation and archive recovery; empty leaves them to a key saved in the
+# app. Recordings go to
# the artifact store through TeamHub, which also needs ffmpeg and ffprobe on
# its PATH.
SONIOX_API_KEY=
diff --git a/AGENTS.md b/AGENTS.md
index 4fe88fff..d3d2d097 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -11,7 +11,7 @@ Memory, and Voice services.
- `pnpm dev`: migrate the PostgreSQL that `TEAMHUB_DATABASE_URL` names, then run
Web, TeamHub, and the node-services process (Agent Service, Memory, LLM Wiki,
Document Runtime, Voice) on this machine, plus `livekit-server` from `PATH`
- while a voice key is set. It starts no containers; the developer runs
+ whether or not a voice key is set. It starts no containers; the developer runs
PostgreSQL.
- `docker compose up --build`: build and run every service in containers,
PostgreSQL and LiveKit included.
diff --git a/docker-compose.yml b/docker-compose.yml
index 48379d60..acf1267b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -46,7 +46,8 @@ services:
# Media server for voice. Browsers dial it on the published ports; TeamHub
# and the voice workers in node-services dial it on the Compose network.
- # Voice stays off until SONIOX_API_KEY is set.
+ # It always runs; a voice key saved in the app or set in .env starts the
+ # matching workers.
livekit:
mem_limit: 256m
image: "livekit/livekit-server:v1.13.6"
diff --git a/docs/voice.md b/docs/voice.md
index d6213d38..fed0d585 100644
--- a/docs/voice.md
+++ b/docs/voice.md
@@ -18,32 +18,33 @@ recording and dictation, [xAI](https://x.ai) for Grok Live voice mode; either
works without the other. Set a key in `SONIOX_API_KEY` or `XAI_API_KEY`, or
save it in the app when voice asks for it. A saved key applies at once,
without a restart; an environment key wins over a saved one and cannot be
-replaced from the app.
-
-- The Linger app: put the keys in `user.env` in its instance folder
- (`~/.simplexai/instances/desktop/`), or type them under Customize → API
- keys, then quit and reopen the app. The app starts the LiveKit server and
- ffmpeg it bundles while a key is set.
-- Docker Compose from this checkout already runs LiveKit and the voice
- workers, so set the key in `.env` and run `docker compose up --detach --wait`
- again.
-- `pnpm dev` starts a LiveKit server on this computer while a key is set in
- `.env`, with the ports and keys `.env` names. Install it first
- (`brew install livekit` on macOS, `curl -sSL https://get.livekit.io | bash`
- on Linux); recording also needs `ffmpeg` and `ffprobe` on `PATH`. Without
- `livekit-server` on `PATH`, `pnpm dev` says so and voice cannot connect.
-
-The desktop app asks for the keys under Customize → API keys on its setup
-page: a Soniox key for transcription and recording, an xAI key for Live (and a
-Composio key for connected apps). They are saved owner-only in
-`instances/desktop/user.env` under the install location and passed to the
-services each time the installation is configured, so new keys apply when the
-installation runs again or when stopped services start on the next launch. A
-Native installation's LiveKit and ffmpeg listen on `127.0.0.1` only (one TCP
+replaced from the app. Node Services starts the matching voice workers
+within seconds of a save and stops them when a key goes away.
+
+Saved keys are shared by everyone on the server, and any signed-in person can
+save or replace one. Live transcription and archive recovery send the audio to
+the Soniox account whose key is in effect, so on a server several people
+share, set `SONIOX_API_KEY` and `XAI_API_KEY` in the environment: that locks
+the keys against replacement from the app.
+
+- The Linger app always runs the LiveKit server and ffmpeg it bundles; save
+ the keys in the app. Keys written by hand into `user.env` in the instance
+ folder (`~/.simplexai/instances/desktop/`) act as environment keys: they win
+ over the app, and changing or removing one means editing that file and
+ reopening the app. A computer the app has no bundled voice tools for keeps
+ voice off.
+- Docker Compose from this checkout always runs LiveKit; save the keys in the
+ app, or set them in `.env` and run `docker compose up --detach --wait` again.
+- `pnpm dev` always starts a LiveKit server on this computer, with the ports
+ and keys `.env` names. Install it first (`brew install livekit` on macOS,
+ `curl -sSL https://get.livekit.io | bash` on Linux); recording also needs
+ `ffmpeg` and `ffprobe` on `PATH`. Without `livekit-server` on `PATH`,
+ `pnpm dev` says so and voice cannot connect.
+
+A Native installation's LiveKit and ffmpeg listen on `127.0.0.1` only (one TCP
port for signalling, one UDP port for media), so no media leaves the computer
except to the speech services (Soniox, xAI) and the voice model Node Services
-downloads on first use. Without a key, or without bundled tools for the
-computer, voice stays off.
+downloads when its voice role starts.
Browsers allow the microphone only on `localhost` or HTTPS, so voice from
another computer needs an HTTPS proxy in front of port 3000.