From 22b1ed5b7a370cb634c5fa376d0f522f2eb100c9 Mon Sep 17 00:00:00 2001 From: Yibo Xi <26184740+xybio@users.noreply.github.com> Date: Sun, 4 Oct 2026 02:37:42 +0800 Subject: [PATCH] docs: document headless NAS deployment (#710) * docs: document headless NAS deployment * docs: keep NAS gateway private during setup --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/README.md b/README.md index e6f73f7c5..a2f3be466 100644 --- a/README.md +++ b/README.md @@ -800,6 +800,51 @@ the container as healthy (Compose: `depends_on: condition: service_healthy`) with no curl in the image. Bind-mounting a folder at `/config` in place of a named volume works too; it has to be writable by uid 65532. +#### NAS with agents on other machines + +Magpie can run on a headless NAS as a shared gateway even when the agents that +use it (Claude Code, Codex, OpenCode, and so on) run on other computers. The +container does not discover agent installations on the NAS host or on remote +machines: configure those agents to use the NAS address and an enabled gateway +key. See [Connecting anything else](#connecting-anything-else) for the +protocol-specific base URLs. Keep `3425` behind a firewall or VPN and do not +expose it publicly without gateway-key authentication. + +For a bind-mounted configuration directory, the directory must be writable by +the non-root container user (uid 65532): + +```sh +sudo chown -R 65532:65532 /volume1/docker/magpie/config +``` + +An example Docker Compose project is: + +```yaml +services: + magpie: + image: ghcr.io/yetone/magpie:latest + restart: unless-stopped + ports: + # Keep both ports on loopback until LAN sharing and a gateway key exist. + - "127.0.0.1:3425:3425" + - "127.0.0.1:3430:3430" + environment: + MAGPIE_ADDR: 0.0.0.0:3425 + MAGPIE_PUBLIC_URL: http://:3425 + MAGPIE_WEB_KEY: + volumes: + - ./config:/config + command: [web, --addr, 0.0.0.0:3430, --no-open] +``` + +Open `http://127.0.0.1:3430/?k=` through an SSH tunnel to +configure providers. Turn on *Share on local network*, then create a gateway +key for each remote agent host. After that, change the gateway mapping to +`3425:3425` (or bind it only to the NAS interface or VPN address) and recreate +the container so remote agents can reach it. For Internet access, prefer a +VPN such as Tailscale or WireGuard; if a reverse proxy is used, it must +authenticate clients itself when it forwards to Magpie over loopback. + ### Developing ```sh