Remove ntfy: notifications go only through the app notification stream

Server: drop ntfy publishing (stage hooks, run outbox, chat attention, chat
tool notify, auto-switch and schedule notices), the chat push outbox (its
table is dropped at startup), ntfy status/endpoints and PIPELINES_NTFY_*.
The app_notifications stream, subscribe/clear and kinds are unchanged.
Notification settings keep run_finished/chat_needs_you/chat_reply_finished;
ntfy_enabled is accepted and ignored and its stored row is never read.

Stage type=ntfy is rejected: "ntfy stages were removed; notifications go to
the Pipelines apps — use the stage notify hook". The notify hook remains.

Installer: no ntfy build, accounts, config or supervisor child; manifest
gets top-level "mode" (legacy ntfy.mode still read). Reinstall retires an
old ntfy (safe PID-file stop, deletes binary, config, data dir, token, log,
with a note in logs/install.log); uninstall cleans leftovers.

App: ntfy settings section replaced by "Notification events"; texts updated.
Docs: docs/ntfy.md folded into docs/notifications.md; install, docker, cli,
author skill references updated; security review M1 marked resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 23:24:24 +00:00
parent 806b5eca46
commit fc7dbb0ac0
138 changed files with 1958 additions and 4651 deletions
+50 -91
View File
@@ -1,84 +1,72 @@
# Pipeline server + ntfy in one Compose project (Android)
# Pipeline server in a Compose project
## Complete installer (recommended for both services in Docker)
## Complete installer (recommended for Docker)
Run `./install --docker` from an interactive terminal (Docker is the explicit
`--docker`/`docker` mode; `./install.sh` remains a compatibility alias, and a bare
`./install` now performs the native host installation). It handles Compose
configuration, ntfy users/permissions/token, image build, container skill install,
first-time container harness provider login (OpenCode by default; `./install
--docker --harness pi` configures Pi and skips OpenCode login), startup, and an
authenticated test notification. Choose your own provider in the configured
configuration, image build, container skill install, first-time container
harness provider login (OpenCode by default; `./install --docker --harness pi`
configures Pi and skips OpenCode login), startup and a status check. Choose your
own provider in the configured
harness; signup/login credentials stay in the Docker volume, not your host
account. Re-run to update while
preserving `.env`, tokens, histories and volumes. Use `--relogin` to connect another
provider. No fixed OpenCode Go login is required. Health/publishing checks do not
prove model inference or phone reception.
The phone-facing ntfy URL uses the detected LAN IP; both services bind `0.0.0.0` by default.
There are no networking questions. Advanced URL/bind/timezone flags remain optional.
preserving `.env`, histories and volumes. Use `--relogin` to connect another
provider. No fixed OpenCode Go login is required. Health checks do not prove
model inference. The server binds `0.0.0.0` by default. There are no networking
questions; `--timezone` and `--port` remain optional.
The steps below are for manual setup or a developer/legacy local Pipelines server
with Docker ntfy; they are **not** the supported installation and are not needed when
you use `./install`.
Notifications reach the Pipelines apps through the server itself (browser
notifications in the web app, the **Receive notifications in Pipelines**
background service or the open app on Android, the app on iOS and macOS); see
[Notifications](notifications.md). There is no ntfy service any more.
## Manual developer/legacy: local pipeline server, Docker ntfy
Re-running `./install --docker` over an installation from before this change
retires its ntfy: it removes the Compose project's `ntfy` container and
`<project>_ntfy-data` volume (ntfy's caches and accounts, which nothing reads any
more), `secrets/ntfy-token.txt` and the `NTFY_BASE_URL`/`NTFY_BIND_ADDRESS` lines
in `.env`, and recreates the server with `--remove-orphans`. Running it again
finds nothing left to remove. `./uninstall` removes any leftover ntfy container
and volume too.
The steps below are for manual setup or a developer/legacy local Pipelines
server; they are **not** the supported installation and are not needed when you
use `./install`.
## Manual developer/legacy: local pipeline server
To reuse your host OpenCode login without container authentication (manual,
developer/legacy use—not a supported installation):
developer/legacy use, not a supported installation):
```sh
docker compose up -d ntfy
# Bootstrap ntfy users/token as described below, then:
sh scripts/run-local-server.sh
go run ./cmd/pipelines-tui -url ws://127.0.0.1:8080/connect
```
Do not run `docker compose up -d` for this mode: that starts the pipeline container
too. The local launcher uses the existing host database and OpenCode account,
publishes via localhost:8090, and advertises `.env`'s `NTFY_BASE_URL` to the TUI.
The top bar shows **ntfy**, the external server URL, and topic beside the pipeline
server address on every page.
No credentials are included in the public setup data. Stop any existing local
pipeline server before launching another against the same database/port.
The local launcher uses the existing host database and OpenCode account. Stop
any existing local pipeline server before launching another against the same
database/port.
`compose.yaml` runs two services: `pipelines` (Go server + OpenCode V2) and `ntfy`.
The pipeline server publishes internally to `http://ntfy/pipelines`; Android connects
to your host's LAN/VPN URL. No host OpenCode service or credential database is
mounted. Separate volumes persist pipeline history, workspace files, OpenCode
credentials/sessions, and ntfy data. Do not use `docker compose down -v` unless
you intend to delete those volumes.
**Verification:** `docker compose build pipelines` completed, and
`docker compose up -d ntfy` started ntfy. A local authenticated Markdown upload
was accepted with a phone-facing attachment URL. The local server's WebSocket
advertised the public URL/topic and accepted the notification test pipeline.
Go race tests and vet passed. Pipeline-container startup/model authentication
and Android delivery are still **not tested**. Existing host history is preserved;
the local server was restarted with notification configuration. The image now
also includes python3 so the installer regression suite can run inside the
container; a real 40x16/80x24/120x36 terminal UI review remains an independent
step.
`compose.yaml` runs one service, `pipelines` (Go server + OpenCode V2). No host
OpenCode service or credential database is mounted. Separate volumes persist
pipeline history, workspace files and OpenCode credentials/sessions. Do not use
`docker compose down -v` unless you intend to delete those volumes.
## 1. Local settings
Start Docker Desktop/Colima/your Docker daemon first. Choose the host address your
phone can reach. Example (replace the LAN IP):
Start Docker Desktop/Colima/your Docker daemon first.
```sh
python3 scripts/configure-compose.py \
--ntfy-url http://192.168.1.20:8090 \
--bind-address 0.0.0.0
python3 scripts/configure-compose.py
docker compose config --quiet
```
The helper detects the **host's timezone** and writes it to `.env`, so the Linux
containers do not silently schedule in UTC. It refuses to overwrite `.env` or an
existing token. If detection is unavailable, use `--timezone Europe/London` (or
your actual IANA timezone). Rerun/edit settings if you move/change timezones.
containers do not silently schedule in UTC. It refuses to overwrite `.env`. If
detection is unavailable, use `--timezone Europe/London` (or your actual IANA
timezone). Rerun/edit settings if you move/change timezones.
The helper creates an empty, protected token file for bootstrap; no notifications
are sent until it is filled. `.env`, `secrets/`, and `data/` are git-ignored and
excluded from image builds. The container publishes port **8080**; the default
`.env`, `secrets/`, and `data/` are git-ignored and excluded from image builds. The container publishes port **8080**; the default
host mapping is **8081**, bound to host `0.0.0.0`, avoiding the existing native
server on 8080. Query the actual mapped port with
`docker compose port pipelines 8080`. The unauthenticated pipeline WebSocket API
@@ -86,32 +74,11 @@ shares that port, so expose it only on a trusted LAN/VPN and never to the public
internet.
Use HTTP only on a trusted LAN or encrypted VPN. For public access, use HTTPS
with a reverse proxy/VPN; configure the external URL in `NTFY_BASE_URL`. The
container's attachment URLs use that external URL, not the internal service name.
Both host port mappings default to `0.0.0.0`; firewall them appropriately. The
Pipelines API has no authentication and must not be exposed to untrusted networks.
with a reverse proxy/VPN. The host port mapping defaults to `0.0.0.0`; firewall
it appropriately. The Pipelines API has no authentication and must not be
exposed to untrusted networks.
## 2. Bootstrap ntfy users and token
```sh
docker compose up -d ntfy
docker compose exec ntfy ntfy user add pipeline-publisher
docker compose exec ntfy ntfy access pipeline-publisher pipelines write-only
docker compose exec ntfy ntfy user add phone-reader
docker compose exec ntfy ntfy access phone-reader pipelines read-only
docker compose exec -T ntfy ntfy token add pipeline-publisher | python3 scripts/save-ntfy-token.py
```
User creation prompts for passwords. Keep `secrets/` mode **0700** on the host.
The helper extracts only the raw token (the ntfy CLI includes prose in its response)
and makes the final file readable inside the non-root pipeline container: local Compose
file secrets are bind mounts and do not reliably remap uid/mode. Its private parent
directory protects the source file from other host users. Do not commit tokens
or paste them into a chat. Recreating/replacing the secret file requires restarting
the pipeline container. The application accepts `_TOKEN_FILE` or `_TOKEN`, not
both, and never puts the token in model prompts, outputs, or diagnostics.
## 3. Authenticate the harness, then start the server
## 2. Authenticate the harness, then start the server
```sh
python3 scripts/build_metadata.py # resolve releases and stamp revision/dirty identity
@@ -151,18 +118,11 @@ bundled example pipelines, seeded once; an existing database is never changed.
Open `:templates` and use **Submit template** to name/review/publish another copy,
or **Customize** to edit it first. All bundled examples are manual-only.
## 4. Android
## 3. Notifications
Install ntfy, add the custom server `http://192.168.1.20:8090` (or your HTTPS/VPN
URL), sign in as `phone-reader`, and subscribe to **pipelines**. This is the single
system-wide notification topic, shared by every pipeline. Grant notifications
and background operation as required by your Android app/device. Outside your
LAN, enable the VPN or use your HTTPS address. `localhost` on Android is the
phone, not your server. No iOS/APNS upstream is needed for this Android setup.
Use the app to confirm a test notification and download an attachment before
relying on unattended schedules. This phone/background-delivery check has **not
been performed**. Attachments/messages expire after seven days in this config.
Notifications come through the Pipelines apps, connected to this server; see
[Notifications](notifications.md). If you subscribed to the old `pipelines`
topic in the ntfy app, remove that subscription.
## Existing data and rebuilds
@@ -179,8 +139,7 @@ resolves the current releases, use `python3 scripts/build_metadata.py`. A plain
The workspace volume does not automatically replace its existing source tree
on image rebuild; back it up and update it explicitly if you need new source for
Go verification. Do not delete it casually: it may contain user-created artifacts.
`compose.yaml` still uses ntfy's `latest` tag; pin a tested version/digest before
production. OpenCode and Pi are not fixed version pins: `./install` resolves the
OpenCode and Pi are not fixed version pins: `./install` resolves the
current supported OpenCode V2 release from the single documented complete
`GET /repos/{owner}/{repo}/git/matching-refs/tags/v2` response — a complete bounded
array with no page/per_page query and no `Link` pagination (never the moving