Ask for the model provider on every start

run.sh shows a window (zenity form, terminal prompts without zenity) for
a base URL, token, auth header and optional model list. Left empty,
Claude Desktop starts normally with the claude.ai sign-in. Otherwise it
runs in its third-party gateway mode: run.sh writes the managed config
(inferenceProvider "gateway" and friends) and copies it into the created
container as root, because Claude Desktop ignores
/etc/claude-desktop/managed-settings.json unless root owns it. The host
copy is deleted right away; nothing is kept between starts.

Claude Desktop only allows plain http to loopback, so for an http://
gateway launch-apps.sh runs socat on 127.0.0.1:18080 and forwards to it.
localhost is rewritten to host.docker.internal for servers on the host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-02 18:54:41 +01:00
co-authored by Claude Opus 5.5
parent 9b921eeae5
commit 0315d5816e
5 changed files with 153 additions and 3 deletions
+15 -2
View File
@@ -16,8 +16,21 @@ Docker and an X server (or XWayland) is needed on the host.
docker stop claude-desktop # stop everything
```
The shared folder is mounted at `/workspace` in both containers. Sign in to
Claude Desktop on every start; the sign-in is not kept. Closing Claude
On every start a window asks for the model provider:
- **Base URL empty:** Anthropic's models; sign in to claude.ai as usual.
- **Base URL set:** Claude Desktop runs in its third-party "gateway" mode, with
no claude.ai account: Chat, Code and Cowork send their requests to that URL
with the token. The server must speak the Anthropic Messages API
(`/v1/messages`), e.g. a self-hosted model behind LiteLLM. Models are
optional (comma-separated, first = default); without them Claude Desktop
asks the server's `/v1/models`. A server on this machine is reachable as
`http://host.docker.internal:PORT` (`localhost` is rewritten to that) and must
listen on an address Docker can reach. With `http://` the token is sent
unencrypted.
The shared folder is mounted at `/workspace` in both containers. Neither the
sign-in nor the token is kept between starts. Closing Claude
Desktop or Ghidra's project window stops everything.
The launcher runs `run.sh` from this checkout, so re-run `./install.sh` after