Skip to main content

LAN Install

LAN mode is for the common team or multi-machine setup: a single Prism backend runs on a home server or internal host, and any number of workstations connect to it as clients. The client does not need Docker — the backend stack lives elsewhere. For personal-mode install (everything on one machine), see Install overview. For setting up the backend server itself, see server-side install.

Prerequisites

On the client machine:
  • Node.js 18+ (for the Prism CLI)
  • Git
  • At least one supported editor: Claude Desktop, Claude Code, Cursor, or Codex
  • PowerShell 7+ on Windows (the launcher requires it)
On the LAN:
  • A reachable Prism backend (see server-side install or DEPLOY.md). Default LAN URL on a fresh bin/prism-server-install.sh deployment is http://server1.home.lan:41765.
  • A valid API key for that backend.

What you’ll need from the server admin

Two values: The URL defaults to http://<--host>:<--port> — so if the server uses the server1.home.lan:41765 convention, you don’t need to pass either flag; just --api-key.

Install

One-time CLI build (same for every mode):
Then the LAN install:
On a TTY with no --mode, you’ll get an interactive 1/2/3 picker — choose 2 for LAN. Override --port <n> if the server runs on a non-default port.

What the installer does

prism install --mode lan runs these steps in order:
  1. LAN preflight — verifies /health is reachable on the target URL and that the API key authenticates against /api/v1/projects. Fails loudly with one message per issue, before touching any config files. Common causes of failure here: wrong URL, wrong key, firewall blocking the port, backend down.
  2. MCP Node-shim build — runs npm install and tsc in mcp-node/ so mcp-node/dist/server.js exists and is fresh. Idempotent: skips the build when dist is newer than every src file. Per SPEC-054 the MCP shim is Node, not Python — there is no mcp/.venv, no pip install, and no Python prereq.
  3. Credentials file — writes ~/.prism/credentials.personal.json with mode:"lan", the resolved URL, and the API key. The coder launcher and prism status both read this file.
  4. Editor MCP blocks — writes the mcpServers.prism block into each detected editor’s config (Claude Desktop, Claude Code, Cursor, Codex), pointing command at node, args at the absolute path to cli/dist/mcp-launcher.js, and env at the LAN URL + key + per-editor identity vars (e.g. PRISM_AGENT_SURFACE). The launcher is a thin indirection: on every editor restart it stats mcp-node/src/ against mcp-node/dist/, rebuilds when stale, then spawns the real Node shim with stdio inherited — keeping running editors current even when restarts bypass prism install and prism update.
  5. Launcher setup — chmod + symlink bin/codercoder.sh on Unix; bin/coder.cmd shim invoking pwsh on Windows. Managed block appended to ~/.zshrc / ~/.bashrc (Unix) or User PATH updated via [Environment]::SetEnvironmentVariable (Windows).

Retrieving the server API key

On the backend machine (requires SSH access):
If the key in this file returns HTTP 401 against the live backend, it’s stale — the bootstrap key was regenerated and the credentials file was not re-synced. Workaround: borrow the current working key from any already-connected LAN client’s ~/.prism/credentials.personal.json, which carries the key the server actually accepts right now.

Verifying the install

After prism install --mode lan completes:
Should print the backend health + mode + project count. Example:
(Counter-intuitively the backend reports mode=personal even in LAN deployments — mode on the backend side describes backend provisioning, not install mode. The client-side mode is lan and lives in the credentials file.) Then restart your editor(s) to pick up the new MCP configuration. Claude Desktop / Cursor / Codex re-read MCP config on launch. Claude Code picks it up on the next claude invocation.

Troubleshooting


Uninstall

Removes the prism MCP block from each editor, strips the managed PATH block from the shell rc / User PATH, removes the coder symlink or coder.cmd shim. Credentials file is left in place (keys are sensitive but cheap to regenerate; easier to keep them than re-copy after a re-install).

What LAN install does NOT cover

  • Running the backend itself. If you need to stand up server1 or equivalent, see server-side install.
  • Cloud-hosted Prism. Not yet available; will use prism login flow when it ships. See Install overview.
  • Per-persona daemon (SPEC-070). The always-on listener daemon ratified by SPEC-070 v0.2 / ADR #42 is forthcoming. When it ships, it’ll run as a user-level launcher unit (LaunchAgent / systemd-user with linger / Task Scheduler logon-trigger) on each LAN client, own WS continuity across editor idle/suspend, and absorb project-bootstrap responsibilities (deps install, venv activation) currently parked as no-op deprecations on bin/coder. See INSTALL.md §“Deprecated flags” for the launcher-flag migration status.
Last modified on July 7, 2026