From 3a57427757dac8fc4a7c29bb7342eb1661599aca Mon Sep 17 00:00:00 2001 From: thecodacus Date: Tue, 15 Sep 2026 18:03:14 +0530 Subject: [PATCH 1/2] Fix legacy workspace directory environment fallback --- server/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/index.ts b/server/src/index.ts index 19aa9ba..43b9382 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -54,9 +54,9 @@ import { getBuiltinCommands } from "./pi/builtins.js"; import { isValidSlug, slugify } from "./slug.js"; import { getSettingDefaults, getSettings, getStoredSettings, setSettings } from "./db.js"; -// WORKSPACE_ROOT is the new name; WORKSPACE_ROOT still works for existing deploys. +// WORKSPACE_ROOT is the new name; WORKSPACES_DIR still works for existing deploys. const WORKSPACE_ROOT = path.resolve( - process.env.WORKSPACE_ROOT || process.env.WORKSPACE_ROOT || "/workspaces" + process.env.WORKSPACE_ROOT || process.env.WORKSPACES_DIR || "/workspaces" ); const PORT = Number(process.env.PORT || 4100); /** From 7b7ee10fb541de1e261f85d1190a048d99da67ff Mon Sep 17 00:00:00 2001 From: thecodacus Date: Tue, 15 Sep 2026 18:29:31 +0530 Subject: [PATCH 2/2] docs: explain native and container workspace paths --- docs/guide/deploying.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/guide/deploying.md b/docs/guide/deploying.md index 81536e1..c192438 100644 --- a/docs/guide/deploying.md +++ b/docs/guide/deploying.md @@ -32,6 +32,17 @@ The portal listens on `:4100`. Compose uses `network_mode: host`, so it binds that port directly on the host — which is also what lets pi reach a llama-server running on the same machine at `localhost`. +## Workspace paths + +For a native installation, set `WORKSPACE_ROOT` to the directory containing your +projects. The legacy `WORKSPACES_DIR` variable is also accepted when +`WORKSPACE_ROOT` is unset. If both are set, `WORKSPACE_ROOT` wins; with neither +set, the server uses `/workspaces`. + +With the supplied Compose files, `WORKSPACES_DIR` selects the **host** directory +mounted at `/workspaces`. Keep the portal's `WORKSPACE_ROOT=/workspaces` so it +uses the path visible inside its container. + ## Installing add-ons To install Browser or Voice from Settings: