commit 698ca1f82625d9defdc6fca71d794804f4f0c9af
parent be263d6e77ad710c29318cdf0cd64e9441620e1c
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 9 Nov 2026 21:40:51 -0500
docker: UMTOOL_ALLOWED_HOSTS -- umtool reached by a LAN IP, a domain or a Tailscale name names it, or its pages' writes are refused
RUNNING_IN_DOCKER.md (Reaching the editor from another machine), .env.example, and the umtool service's environment in docker-compose.yml.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
3 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/.env.example b/.env.example
@@ -34,6 +34,11 @@
# umtool. Private, same rules as the editor.
#UMTOOL_BIND=0.0.0.0
+# The names umtool is reached by when not localhost (a LAN IP, a custom domain,
+# a Tailscale name): its pages' writes are refused from any other (DNS
+# rebinding). Comma-separated, no ports. RUNNING_IN_DOCKER.md, "Reaching the
+# editor from another machine".
+#UMTOOL_ALLOWED_HOSTS=archive-box.lan,192.168.1.20
# The published port numbers, if 8080-8083 collide with something you run.
# These are the OUTSIDE ports; the ports inside the containers never change.
diff --git a/RUNNING_IN_DOCKER.md b/RUNNING_IN_DOCKER.md
@@ -224,6 +224,22 @@ of a YAML config file and a mandatory database. Templates are in
Both attach through Caddy's `forward_auth`. The overlays set
`ARCHILYZER_AUTH_MODE=forward` for you.
+**umtool answers writes only to the names it knows.** Its pages' writes --
+Save version and Open in draft, an ingredient's actions, every ⌘K command
+(`POST /api/cli`) -- are refused when the address the browser used is not
+this machine (`localhost`, `*.localhost`, `127.x`, `::1`): a page whose DNS
+name is re-pointed at the box (DNS rebinding) must not drive it. Caddy passes
+the address on, so reaching umtool as `http://192.168.1.20:8083`, a custom
+domain or a Tailscale name reads fine and refuses every write until you name it:
+
+```sh
+# .env — host names or IPs, comma-separated, no ports
+UMTOOL_ALLOWED_HOSTS=archive-box.lan,192.168.1.20,archive-box.tail1234.ts.net
+```
+
+On the host (`archilyzer service install`), set it in the unit's environment
+the same way. An SSH tunnel to `127.0.0.1:8083` needs nothing.
+
### The rail, and its escape hatch
```
diff --git a/docker-compose.yml b/docker-compose.yml
@@ -216,6 +216,9 @@ services:
environment:
<<: *app-env
UMTOOL_CACHE_DIR: /data/builds/umtool-cache
+ # The names umtool is reached by besides localhost (a LAN IP, a domain,
+ # a Tailscale name): its pages' writes are refused from any other.
+ UMTOOL_ALLOWED_HOSTS: ${UMTOOL_ALLOWED_HOSTS:-}
volumes:
- corpus:/data/transcripts
- config:/data/config