Skip to content

Move production to a new Debian 13 droplet #747

Open

Description

@HMarzban

Summary

The production host runs Debian 11. Debian 11 LTS ended on 2026-08-31, so the host gets no more security fixes.

This issue upgrades the current droplet in place, in two hops: 11 → 12 → 13. Debian does not support a skip. Each hop gets its own DigitalOcean snapshot and one reboot. Rollback is a restore of the pre-hop snapshot. The maintainer ruled this on 2026-11-16 (Decision 1).

Each hop is a full outage, because this is the only production host. It is blocked on the Preconditions below.

Benchmark

Field Value
Metric (1) Editing pause per hop, seconds from the step 7 stop to the first saved edit after the step 11 start. (2) Lost edits in the content-safety block, count. (3) Known CVEs in installed packages on the production host, count. (4) Edge probe failures per hop, seconds.
Before (1) Not measured yet: read at each hop. (2) Not measured yet. (3) Not measured yet: the maintainer runs debsecan in step 2, on Debian 11. Debian 11 LTS ended on 2026-08-31, so a pending-upgrade count would read 0 there. (4) Not measured yet.
After Not measured yet.
Condition Same droplet, same size, same region and VPC, same managed collab database. Two hops, one value each, exact. M1 and M5 rows after the upgrade form a new sample (#796, #760).
How to run (1) A test browser types one line every 10 s in the content-safety test pad. Read the "createdAt" of the newest "Documents" row before step 7, and the first one after step 11. (2) The content-safety block. (3) debsecan | wc -l for known CVEs. debsecan --suite <codename> --only-fixed | wc -l is a second row (fix available, not installed). (4) A one-second laptop probe on https://docs.plus/api/health (the #746 step 12 loop). Prometheus runs on this host, so it records nothing while the host is down. The laptop probe gives the seconds.
Pass rule (1) Exact seconds per hop, posted. (2) 0. (3) Exact counts, posted for Debian 11 and Debian 13. The --only-fixed count is 0 on Debian 13. (4) Exact seconds per hop, posted. Stop rule: if a step 10 check fails, do not run step 11 or the next hop. Fix it, or run Rollback.
Guard The content-safety block, at each hop. Before each snapshot, no store job waits, and every *-dlq queue is at wait=0. Failed store jobs and the DLQ are 0 24 h after hop 2. The container list and the GlitchTip issue count match step 1 after each hop.
Owner Maintainer: every step and every read. Agent in the repo: drafts the Measured comment.
Claim "Production moved from Debian 11 to Debian 13 in place, with N s and M s of editing pause and 0 lost edits."

Rows

Metric Before (take in steps 1-2) After Method
OS and security support Debian 11; LTS ended 2026-08-31 Not measured yet; target Debian 13, LTS to 2030-06-30 /etc/os-release
Known CVEs in installed packages Not measured yet: Debian 11 Not measured yet: Debian 13 debsecan | wc -l
CVEs with a fix available but not installed (second row) Not measured yet: --suite bullseye Not measured yet: --suite trixie debsecan --suite <codename> --only-fixed | wc -l
Editing pause, hop 1 and hop 2 — Not measured yet Test browser; "createdAt" rows
Edge probe failures, hop 1 and hop 2 — Not measured yet 1-second laptop probe
Store queue and DLQ before each snapshot — Not measured yet; no waiting store job, DLQ wait=0 Step 7 Redis read
Lost edits — Not measured yet Content-safety block
Running containers 25 (host read, 2026-11-16) Not measured yet; the same names docker ps, step 1 list
Backup timers 7, after #748 (0 on 2026-11-11) Not measured yet systemctl list-timers --all | grep -c docsplus-backup
Next push deploy — Not measured yet gh run list, on prod.docs.plus

n: one exact value per hop for the pause and probe rows. One upgrade, exact, for the loss row.

Evidence

  • SSH as the deploy user, 2026-11-11. /etc/os-release says Debian GNU/Linux 11 (bullseye). uname -r prints 5.10.0-39-cloud-amd64. /var/run/reboot-required exists. The host has been up since 2026-05-01.
  • Host read, read-only, 2026-11-16 19:57Z. Debian 11.11. Kernel 5.10.0-46 is installed but not running. Root disk 158G, 124G used, 28G free. RAM 15 GiB.
  • Host read, 2026-11-16. Every app service runs in Docker 29.1.3, in 25 containers. App data is on the managed Postgres cluster, not on this host.
  • Host read, 2026-11-16. Failed units: pm2-superuser.service (Move the production runner to its systemd unit and its own root, and remove the stage runner #743) and vnstat.service.
  • Host read, 2026-11-16. The Docker apt source is download.docker.com/linux/ubuntu bullseye, the Ubuntu repo. Third-party sources also include pgdg (client only), the two DigitalOcean agents, and yarn.
  • Host read, 2026-11-16. Host redis-server 6.0.16 listens on 127.0.0.1:6379. The app uses the docsplus-redis container.
  • Host read, 2026-11-16 20:26Z (agent, read-only). The host Redis on 6379 holds 0 keys, and CLIENT LIST showed only the reading client. All apt sources are .list files; there are no deb822 .sources files. docker-ce is 5:29.1.3-1~debian.11~bullseye and containerd.io is 2.2.0-2~debian.11~bullseye, so the installed builds are already Debian builds. haproxy is not installed.
  • Host read, 2026-11-16 20:26Z. PM2 also runs TinyDocy's three apps from /opt/projects/editor.docs.plus, one of them a second Redis. They go through both hops.
  • Debian news, 2026-08-31. Debian 11 LTS ended. Paid ELTS covers only a subset of packages.
  • wiki.debian.org/LTS, read 2026-11-08. Debian 12 LTS runs to 2028-06-30, and Debian 13 LTS to 2030-06-30.
  • SSH, 2026-11-11. /etc/docker/daemon.json sets three registry mirrors, one of them a third-party mirror. This issue does not change it.
  • Read from code at 0b302b222. Every deploy job runs on the prod.docs.plus runner label (.github/workflows/prod.docs.plus.yml:479, :695, :1186, :1251). So a stopped runner stops every deploy.
  • Move the production runner to its systemd unit and its own root, and remove the stage runner #743 evidence, 2026-11-11. TinyDocy's three apps run under PM2 on this host.

Risk

  • Every new Debian 11 flaw stays open on the internet-facing host.
  • Each hop is a full outage on the only production host.
  • Rollback is a snapshot restore. It loses Prometheus, Loki, GlitchTip and Uptime Kuma data written after the snapshot.

Preconditions

Do not start hop 1 until each is done:

Steps

Deploy: no deploy. Two outage windows, one per hop. Merges to main stop during each window. Hop 2 may follow hop 1 in the same window, once hop 1 passes step 10.

Prepare (no outage)

  1. Owner: maintainer, SSH as the deploy user. Record the inventory. Post counts and versions only.

    nproc; free -g; df -h /
    docker version --format '{{.Server.Version}}'
    dpkg -l docker-ce containerd.io | tail -n 2
    docker ps --format '{{.Names}}' | sort > "$HOME/containers-before.txt"; wc -l < "$HOME/containers-before.txt"
    systemctl --failed --plain --no-legend
    grep -rh '^[^#]' /etc/apt/sources.list /etc/apt/sources.list.d/
    apt-mark showhold; dpkg --audit

    Also record the GlitchTip issue count (GlitchTip → Issues, all projects) and curl -sS -o /dev/null -w '%{http_code}\n' https://status.docs.plus from a laptop.

  2. Owner: maintainer, SSH with sudo. Take the CVE befores: sudo apt-get install -y debsecan. Then debsecan | wc -l and debsecan --suite bullseye --only-fixed | wc -l.

  3. Owner: maintainer, SSH with sudo. Stop the host Redis service, if nothing uses it. Keep the redis-server package: it owns /usr/bin/redis-server, which PM2 editor-redis (TinyDocy) runs.

    redis-cli -h 127.0.0.1 -p 6379 CLIENT LIST
    redis-cli -h 127.0.0.1 -p 6379 INFO keyspace
    sudo ss -tnp | grep ':6379'

    Pass: CLIENT LIST shows only this redis-cli, and ss shows no other client. Record the key count. If any process connects, stop, and ask its owner (TinyDocy first). Then run sudo systemctl disable --now redis-server. Do not purge the package. Each hop upgrades it, and editor-redis starts the new binary at the reboot; its PM2 args keep no data on disk.

  4. Owner: maintainer, SSH with sudo. Yarn. Host read, 2026-11-16: the five PM2 apps (stage.docs.plus-runner, prod.docs.plus-runner, editor-next, editor-redis, editor-hocus) start through bash, bun or redis-server, and editor.docs.plus has a bun.lock. No crontab line or systemd unit names yarn. If that still holds, and no unit, cron job or PM2 app uses yarn, run sudo apt-get purge -y yarn, and delete its apt source file. If something uses it, keep it. Its source line changes in step 8 only if it names a codename.

  5. Owner: maintainer, SSH with sudo. Bring Debian 11 fully up to date: sudo apt-get update && sudo apt-get full-upgrade. Pass: dpkg --audit prints nothing. apt-mark showhold prints nothing, or each hold is recorded here.

Each hop

Run steps 6-11 twice:

  • Hop 1: OLD=bullseye, NEW=bookworm, target VERSION_ID 12.
  • Hop 2: OLD=bookworm, NEW=trixie, target VERSION_ID 13.

Set both in the shell before step 7, and again after the step 9 reboot. The DigitalOcean snapshot (step 7) comes before each hop.

  1. Owner: maintainer. Announce the window, and stop merges to main. Start the content-safety block and the one-second laptop probe.

    Content safety. Use one throwaway test pad that you create for this window. Never use /demo. Run it through steps 7-11.

    • Two browsers type in the test pad until step 7. One of them types one line every 10 s, for the pause read.
    • One tab goes offline before step 7, and comes back after step 11.
    • One tab closes within 1 s of an edit, and is reopened after step 11.
    • After step 11, both browsers reload to the same text, with no lost line.
    • Failed store jobs and the DLQ are 0 before the snapshot, and 24 h after hop 2.
    • Delete the test pad after hop 2.
  2. Owner: maintainer, SSH, then the DigitalOcean console. Stop the runner, drain the store queue, and hold the app services down. Then take the snapshot.

    cd /opt/actions-runner/prod && sudo ./svc.sh stop
    cd /opt/projects/prod.docs.plus/.deploy/current
    docker compose -f docker-compose.prod.yml --env-file .env.production stop hocuspocus-server
    # wait: the Grafana worker dashboard shows no waiting store job and an empty store DLQ
    docker compose -f docker-compose.prod.yml --env-file .env.production stop rest-api hocuspocus-worker

    Record the per-queue counts. Post counts only.

    R() { docker exec docsplus-redis redis-cli "$@"; }
    for k in $(R --scan --pattern 'bull:*:meta'); do q=${k#bull:}; q=${q%:meta}
      echo "$q wait=$(R LLEN "bull:$q:wait") delayed=$(R ZCARD "bull:$q:delayed") failed=$(R ZCARD "bull:$q:failed")"
    done | sort > "$HOME/queues-$NEW.txt"

    Pass: no waiting store job, and every *-dlq queue at wait=0.

    Docker restarts during the upgrade and at boot. Then restart: always would start these services on a half-upgraded host. So hold them down until step 11:

    for s in rest-api hocuspocus-server hocuspocus-worker; do
      for c in $(docker ps -aq --filter "label=com.docker.compose.service=$s"); do
        docker update --restart=no "$c" >/dev/null && docker inspect -f '{{.Name}} {{.HostConfig.RestartPolicy.Name}}' "$c"
      done
    done | tee "$HOME/restart-no.txt"

    Then take a DigitalOcean snapshot of the droplet, named pre-$NEW. Wait until it finishes. It is a live snapshot, taken with the app services down; Prometheus, Loki and the GlitchTip Postgres recover from their own write-ahead logs. Record its minutes; they count in the editing pause. Expect a watchdog page while the runner is down (Make CI failures reach Telegram: set the watchdog secrets, alert on red E2E pushes #557).

  3. Owner: maintainer, SSH with sudo, inside tmux or screen. Switch every apt source from OLD to NEW. This covers Debian, its security line, pgdg, the two DigitalOcean agents, and yarn if kept.

    sudo sed -i "s/$OLD/$NEW/g" /etc/apt/sources.list /etc/apt/sources.list.d/*.list

    Hop 1 only: the Docker source moves from the Ubuntu repo to the Debian repo.

    f=$(grep -rl download.docker.com /etc/apt/sources.list.d/)
    sudo sed -i 's#download.docker.com/linux/ubuntu#download.docker.com/linux/debian#' "$f"

    Pass: grep -rn "$OLD" /etc/apt/sources.list /etc/apt/sources.list.d/ prints nothing. sudo apt-get update prints no error. If Docker reports a key error, fetch its key from https://download.docker.com/linux/debian/gpg. Record apt-cache policy docker-ce.

  4. Owner: maintainer, SSH with sudo, in the same tmux. Upgrade, then reboot once.

    sudo apt-get upgrade --without-new-pkgs
    sudo apt-get full-upgrade
    dpkg --audit
    sudo reboot

    At each config-file prompt, keep the installed version. Record each file here. dpkg --audit prints nothing before the reboot.

  5. Owner: maintainer, SSH and a laptop. Check the host before the app services start.

    . /etc/os-release; echo "$VERSION_ID"
    apt-cache policy | grep -m1 "$NEW-security"
    grep -rn "$OLD" /etc/apt/sources.list /etc/apt/sources.list.d/
    docker ps --format '{{.Names}}' | sort | diff "$HOME/containers-before.txt" -
    docker ps --filter health=unhealthy --filter health=starting -q
    systemctl --failed --plain --no-legend
    systemctl is-active "$(cat /opt/actions-runner/prod/.service)"
    systemctl list-timers --all | grep -c docsplus-backup

    Pass:

    • VERSION_ID is the target. One security line. The OLD grep prints nothing.
    • The container diff lists only the three held services.
    • No container is unhealthy or starting, after a few minutes.
    • No failed unit beyond the step 1 list.
    • The runner unit is active. The backup timer count is 7.
    • From a laptop, gh api repos/docs-plus/docs.plus/actions/runners --jq '.runners[]|[.name,.status]|@tsv' prints prod.docs.plus online.

    If a check fails, do not start the services. Fix it, or run Rollback.

  6. Owner: maintainer, SSH and a laptop. Start the app services, and run the Verify Deployment checks (prod.docs.plus.yml:1032).

    awk '{sub(/^\//, "", $1); print $1}' "$HOME/restart-no.txt" | xargs -r docker update --restart=always
    cd /opt/projects/prod.docs.plus/.deploy/current
    docker compose -f docker-compose.prod.yml --env-file .env.production start rest-api hocuspocus-worker hocuspocus-server
    • traefik and docsplus-redis run. webapp, rest-api, hocuspocus-server, hocuspocus-worker and admin-dashboard each run and report healthy.

    • The internal smoke checks pass, as in prod.docs.plus.yml:1063-1082.

    • From a laptop:

      for h in docs.plus prodback.docs.plus admin.docs.plus status.docs.plus; do
        p=/; [ "$h" = prodback.docs.plus ] && p=/health
        curl -sS -o /dev/null -w "%{http_code} $h\n" "https://$h$p"
      done

      Pass: 200 for each.

    • Grafana → Explore → Prometheus: probe_success is 1 for every probe.

    • Read the first saved edit's "createdAt" for the pause. Stop the laptop probe, and post its failure seconds.

    • Finish the content-safety block. Reopen merges to main.

After hop 2

  1. Owner: maintainer, SSH. Take the CVE afters: debsecan | wc -l and debsecan --suite trixie --only-fixed | wc -l. Check the GlitchTip issue count and the status.docs.plus code against step 1.
  2. Owner: maintainer. 24 h after hop 2, check Grafana and the store queues. Then let the next push-to-main deploy run.
  3. Owner: maintainer, DigitalOcean console. Keep both snapshots for 14 days. Then delete them.

Verify

Check Owner and command Before After
OS . /etc/os-release; echo "$VERSION_ID" 11 12 after hop 1, 13 after hop 2
Security source apt-cache policy | grep -m1 trixie-security — One line
Old sources grep -rn bookworm /etc/apt/sources.list /etc/apt/sources.list.d/ after hop 2 — No output
Containers docker ps, against step 1 25 The same names; none unhealthy
Failed units systemctl --failed pm2-superuser.service, vnstat.service No new unit
Probes Grafana → Explore → Prometheus: probe_success 1 per probe 1 per probe
Runner gh api repos/docs-plus/docs.plus/actions/runners --jq '.runners[]|[.name,.status]|@tsv' prod.docs.plus online prod.docs.plus online
Next deploy The next push-to-main deploy — success, on prod.docs.plus
Saves land Collab database: SELECT max("createdAt") FROM "Documents"; before step 7 and after step 11 — Moves forward; store dead-letter queue empty
Content safety The step 6 block, each hop — Every line passes; 0 lost edits
Status page Laptop: curl -sS -o /dev/null -w '%{http_code}\n' https://status.docs.plus Step 1 The same code
Backups systemctl list-timers --all | grep -c docsplus-backup 7, after #748 7
GlitchTip Issue count, steps 1 and 12 Step 1 count The same
Alerts Grafana, 24 h after hop 2 — No firing alert except Deadman
Host network The checks of a host network item tracked privately — Pass

Rollback

Use it when a hop fails step 10 or step 11.

  1. Owner: maintainer, SSH. If the app services already run on the new release, run the step 7 stop and drain first. Pass: no waiting store job, and the DLQ at wait=0.
  2. Owner: maintainer, DigitalOcean console. Restore the droplet from that hop's pre-$NEW snapshot. The droplet keeps its addresses.
    • The restore loses Prometheus, Loki, GlitchTip and Uptime Kuma data written after the snapshot.
    • Saves are not lost. They live in the managed collab database, and the store queue was drained before the snapshot.
  3. Owner: maintainer, SSH. The snapshot holds the three services at restart=no. Run the step 10 checks against the old release. Then run step 11.
  4. Run the step 6 content-safety block again.

Acceptance criteria

  • Every precondition above is checked.
  • The host reports Debian 13, with trixie-security as an apt source, and no bullseye or bookworm source.
  • The host redis-server service is disabled, and the package stays for editor-redis. Yarn is removed, or its use is recorded.
  • After each hop, every step 1 container runs, none is unhealthy, and the probes are 1.
  • The editing pause and the probe failure seconds are posted for each hop.
  • status.docs.plus answers with its old monitors and history.
  • The next push-to-main deploy is green on prod.docs.plus.
  • New "Documents" rows appear after each hop, and the store dead-letter queue is empty.
  • The content-safety block passes at each hop, with 0 lost edits, and the test pad is deleted.
  • Seven backup timers run after hop 2.
  • The GlitchTip issue count matches step 1.
  • 24 hours after hop 2, Grafana shows no firing alert except Deadman.
  • After 14 days, both snapshots are deleted.
  • The Benchmark After values are posted here.

Decisions

  1. How do we leave Debian 11? Ruled 2026-11-16: upgrade the current droplet in place, 11 → 12 → 13. The host read on 2026-11-16 shows that it is possible. Debian 13 LTS runs to 2030-06-30, against 2028-06-30 for Debian 12. Buy ELTS only if the upgrade cannot finish within 4 weeks.
  2. Snapshot and window (defaults accepted 2026-11-16). Each hop takes a live snapshot with the app services down (step 7). Both hops may run in one window, once hop 1 passes step 10. Turn off SSH password login on the production host, and add fail2ban #744 stays Related, not a precondition.

Related

Activity

  1. added this to the v2.3.6 milestone on Nov 11, 2026
  2. added
    Security
    on Nov 11, 2026
  3. modified the milestones: v2.3.6, v2.3.7 on Nov 12, 2026
  4. HMarzban commented on Nov 12, 2026

    @HMarzban
    CollaboratorAuthor

    Moved to v2.3.7, 2026-11-12 (maintainer ruling). v2.3.6 ships on 2026-11-14 with only finished, measured work, and the work and its measurement take longer than the cut allows. The before values and the plan in this issue stay as they are.

  5. HMarzban commented on Nov 16, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-11-16: Decision 1: upgrade the current droplet in place, 11 → 12 → 13. The maintainer prefers this if it is possible. The host read below shows that it is.

    Host read (agent, read-only, 2026-11-16 19:57Z)

    What the in-place path needs

    1. Two hops, 11 → 12 → 13, one reboot each. Debian does not support a skip.
    2. A DigitalOcean snapshot before each hop. Rollback is a snapshot restore. It loses Prometheus, Loki and GlitchTip data written after the snapshot.
    3. Each hop is a full outage, because this is the only production host.
    4. The Docker apt source points at the Ubuntu repo: download.docker.com/linux/ubuntu bullseye. Change it to linux/debian with the new codename at each hop.
    5. Switch the other third-party sources at each hop: pgdg (client only), the two DigitalOcean agents, and yarn. Remove yarn if nothing on the host uses it.
    6. Host redis-server 6.0.16 listens on 127.0.0.1:6379. The app uses the docsplus-redis container. Confirm that nothing uses the host Redis, then remove it before hop 1.
    7. Move the production runner to its systemd unit and its own root, and remove the stage runner #743 moves the runner to svc.sh before hop 1, so the runner comes back after each reboot.

    What changes in this issue

    The new droplet, the Reserved IP cutover and step 9b (moving Prometheus history) are no longer needed. #756 keeps its full scope, because the host stays. The step plan will be rewritten for the in-place path and shown to the maintainer before it is posted.

  6. HMarzban commented on Nov 16, 2026

    @HMarzban
    CollaboratorAuthor

    Review, 2026-11-16 (maintainer approved). The body now follows the Decision 1 ruling: upgrade in place, 11 → 12 → 13.

    • The new droplet, the Reserved IP, the new-host build and step 9b (moving Prometheus) are gone.
    • Each hop: drain, hold the three app services at restart=no, take a live DigitalOcean snapshot, switch sources, upgrade, reboot, check the host, then start the services.
    • Rollback restores the pre-hop snapshot. It loses Prometheus, Loki, GlitchTip and Uptime Kuma data written after it. Saves are safe in the managed database.
    • Host reads (read-only, 2026-11-16) are in Evidence. The host Redis on 6379 is unused (0 keys), but its package stays, because TinyDocy's editor-redis runs that binary. Nothing uses yarn.
    • Cut: the room-load and event-loop rows, the 7-day quiet window, and the MaxAuthTries and LoginGraceTime edits (the Turn off SSH password login on the production host, and add fail2ban #744 cut). Turn off SSH password login on the production host, and add fail2ban #744 is now Related.
  7. HMarzban commented on Nov 17, 2026

    @HMarzban
    CollaboratorAuthor

    Content-safety checklist. The shared checklist lives in release-product §Content-safety checklist. Run it for this issue, plus the extra checks in this body. Record each item as pass or fail in the Measured comment, as §Measured comment format says. The list in this body stays as it is (#762, ruling A).

  8. HMarzban commented on Nov 18, 2026

    @HMarzban
    CollaboratorAuthor

    Measured, 2026-11-18: production is on Debian 13

    The host moved from Debian 11 to 12 to 13 in place, in two hops, as ruled. Every check passed after each hop. The next push deploy, the 24 h read and the snapshot clean-up are still open (see "Left").

    Results

    Metric Before After Method
    OS and security support Debian 11; LTS ended 2026-08-31 Debian 13; LTS to 2030-06-30 /etc/os-release
    Kernel 5.10.0-39-cloud-amd64 6.12.117+deb13-cloud-amd64 uname -r
    Known CVEs in installed packages 6,515 2,329 (64% fewer) debsecan | wc -l, n = 1 per side, 07:16Z and 08:18Z
    CVEs with a fix available but not installed n/a: the tracker dropped the bullseye feed (HTTP 404) 117 debsecan --suite <codename> --only-fixed | wc -l
    Host-side pause, hop 1 — 502 s (07:55:23Z to 08:03:45Z) drain stop to start PASS
    Host-side pause, hop 2 — 692 s (08:04:59Z to 08:16:31Z) drain stop to start PASS
    Store queue and DLQ before each hop — 0 waiting store jobs, every *-dlq at wait=0, both hops Redis read in drain
    Running containers 25 25, the same names, none unhealthy docker ps against the step 1 list
    Upgradable packages — 0 apt list --upgradable

    Versions after: OpenSSL 3.5.7, OpenSSH 10.0p1, Docker 29.10.0, containerd 2.4.2, Compose 5.8.0, host Node 26.13.1, host Redis 8.0.2.

    The pause is a host-side upper bound. It runs from the drain stop to the start stage PASS, and it includes the minutes between stages. The step 6 first-saved-edit read and the laptop edge probe were not taken.

    How it ran

    A staged host script ran every step, to land as scripts/ops/upgrade-host.sh. Each stage checks its own pass rule and stops on a failure. Each one wrote one RESULT line to a ledger on the host.

    • Before the window. Three apt sources failed apt-get update: pgdg (bullseye-pgdg moved to apt-archive.postgresql.org), Docker (the Ubuntu repo has no bullseye) and yarn (key changed). The first two were fixed. Yarn was purged with its source and key: nothing used it (step 4).
    • PM2. Its boot unit had failed since the 2026-05-01 boot. PM2 now runs 7.1.2 on bun, and the unit restores its apps at boot. See the Move the production runner to its systemd unit and its own root, and remove the stage runner #743 and Reboot the production host to load the installed kernel updates #708 comments.
    • Host Node. v26.13.1 from NodeSource replaced Debian's nodejs 12, and the v14 copy in /usr/local/bin was moved out of PATH.
    • Hop 1. 4 min 7 s of upgrade. It left 6 config files for review, each with the local version in place. sshd_config kept the local port and PermitRootLogin no.
    • Hop 2. 5 min 3 s of upgrade. It left 4 config files for review.

    Deviations from the plan

    Left

    • 24 h after hop 2 (from 2026-11-19 08:16Z): Grafana alerts, failed store jobs and the DLQ.
    • The GlitchTip issue count against step 1, and the next push deploy on prod.docs.plus.
    • Remove 140 obsolete packages, no earlier than 24 h after hop 2.
    • Delete both snapshots on or after 2026-12-02.
    • Found before the upgrade, not caused by it: status.docs.plus has no container. The host has no uptime-kuma container, volume or image, so Traefik answers with its default certificate and a 404. A (build): uptime-kuma deploy recreates it with no history.
  9. HMarzban commented on Nov 18, 2026

    @HMarzban
    CollaboratorAuthor

    Snapshots deleted, 2026-11-18

    The maintainer deleted both pre-hop snapshots, pre-bookworm and pre-trixie, on 2026-11-18. That is earlier than the planned 2026-12-02. No newer snapshot was taken.

  10. HMarzban commented on Nov 18, 2026

    @HMarzban
    CollaboratorAuthor

    Cleanup and snapshot, 2026-11-18

    The cleanup stage of scripts/ops/upgrade-host.sh removed what the two hops left behind. Every verify check passed.

    Results

    Metric Before After Method
    Known CVEs in installed packages 2,329 1,527 (34% fewer) debsecan | wc -l, n = 1 per side, 08:18Z and 13:01Z
    CVEs with a fix available but not installed 117 11 (90% fewer) debsecan --suite trixie --only-fixed | wc -l
    Disk used on / 94G 82G (12% less) df -h /
    Kernels installed 5 2 ls /boot
    Running containers 25 25 docker ps
    PM2 apps online 4 4 pm2 jlist
    • Removed: 259 packages. 136 were in no current apt source, and 123 more were packages nothing needs any more. They include the three 5.10 kernels, the obsolete ntp, Python 2.7, 3.7, 3.9 and 3.11, and the old compilers and LLVM. It also purged 23 leftover configs, 12 upgrade copies and a 9.3G yarn cache.
    • Kept: kernel 6.12.117 (running) and 6.1.0-56 (fallback in grub), unattended-upgrades and ntpsec. It also kept libssl1.1, libffi6 and libreadline7, because the hand-built /usr/local Python 3.13 links them.
    • Checks after: dpkg --audit clean, both kernels in grub, the time service active, the /usr/local Python loads, and apt-get update is clean.

    Snapshot

    This corrects the earlier comment, which said no newer snapshot was taken. The maintainer took post-trixie of the Debian 13 host (100.09 GB), and it finished before the cleanup. It is the only rollback point now. DigitalOcean automated backups are off, so #748 is still the only planned off-host copy.

    Left

  11. HMarzban commented on Nov 20, 2026

    @HMarzban
    CollaboratorAuthor

    Measured, 2026-11-20: 24 h after the upgrade

    The 24 h read after hop 2 passes. In the 24 h after hop 2, no alert fired, no store job failed, and every *-dlq queue stayed at 0. No container restarted, no unit failed, and GlitchTip has no new issue. The next push deploy is still open: the first push after the upgrade stopped in CI, before the deploy job (see "Left").

    The read is read-only. It ran on 2026-11-20 from 06:31Z to 06:45Z, about 46 h after hop 2. The window rows come from Prometheus and Grafana history, so they cover the exact 24 h.

    • W1: the 24 h after hop 2, 2026-11-18 08:16:31Z to 2026-11-19 08:16:31Z.
    • W2: the rest, 2026-11-19 08:16:31Z to 2026-11-20 06:31Z (22.3 h).
    • Before: the 24 h, or the 7 days, before the hop 1 drain at 2026-11-18 07:55:23Z.

    No row pools data from before the upgrade with data after it.

    Pass rule

    Rule (from the body) Result Pass
    Guard: failed store jobs and the DLQ are 0, 24 h after hop 2 0 failed store jobs in W1 and W2. Every *-dlq was at 0 in every state, in W1, W2 and the live read Yes
    Verify, Alerts: no firing alert except Deadman Live: 1 of 67 rules firing, the Deadman heartbeat. 0 alerts fired in W1 Yes
    Verify, Containers: the same names, none unhealthy 25 running, the same names as the step 1 list, none unhealthy Yes
    Verify, Failed units: no new unit 0 failed units Yes
    Verify, GlitchTip: the issue count matches step 1 0 new issues since step 1. Step 1 recorded no number, so this is rebuilt from first_seen Yes, rebuilt

    Results

    Metric Before After Method
    Alerts that fired — W1: 0. W2: 1 (event-loop stall, 3 min) Grafana alert annotations, /api/annotations?type=alert, 241 rows from 2026-11-18 07:21Z
    Rules firing at read time — 1 of 67 (Deadman heartbeat); 67 of 67 with health ok Grafana /api/prometheus/grafana/api/v1/rules, 2026-11-20 06:32Z
    Failed store jobs 0 at the hop 2 drain W1: 0. W2: 0. Live: 0 increase(jobs_total{status="failed"}[24h]); Redis ZCARD bull:store-documents:failed
    Store jobs completed — W1: 42. W2: 128 increase(jobs_total{queue="store-documents",status="completed"})
    *-dlq jobs, any state (3 queues) wait=0 at the hop 2 drain W1 max: 0. W2 max: 0. Live: 0 max_over_time(queue_jobs{queue=~".*-dlq"}); Redis LLEN and ZCARD per list
    Store queue backlog 0 at the hop 2 drain W1 max: 0 waiting. Live: 0 in wait, active, paused, delayed, prioritized, failed max_over_time(queue_jobs{queue="store-documents"}); Redis per list
    Document saves rejected or on the fallback — W1: 0. W2: 0 increase(document_store_rejections_total), increase(document_persist_fallback_total)
    Container restarts — 0 of 25 since the hops docker inspect RestartCount; changes(container_start_time_seconds) in W1 and W2
    Kernel OOM kills — W1: 0. W2: 0 increase(node_vmstat_oom_kill)
    Running containers 25 (step 1 list, 07:05:01Z) 25, the same names, none unhealthy docker ps against the step 1 list
    Failed systemd units 2 (pm2-<deploy user>.service, vnstat.service) 0 (none left) systemctl --failed
    GlitchTip issues 77 first seen before step 1 77; 0 new since step 1 GlitchTip DB, read-only: issue_events_issue, not deleted
    GlitchTip events 7 in the 24 h before W1: 1 (85% fewer). W2: 8 GlitchTip DB: issue_events_issueevent by timestamp; 97 in the 7 days before
    hocuspocus-server minutes with event-loop lag over 1 s 7 daily counts: 1, 2, 5, 2, 13, 11, 5 (median 5) W1: 8 (60% more than the median, inside the before range). W2: 5 count_over_time((max(nodejs_eventloop_lag_max_seconds{job="hocuspocus-server"}) > 1)[24h:60s])
    hocuspocus-server worst event-loop lag 7 daily maxima: 1.31 s to 2.80 s (median 1.97 s) W1: 1.37 s (30% lower than the median). W2: 2.71 s max_over_time(nodejs_eventloop_lag_max_seconds)
    Blackbox probes failing 0 failed samples in the 24 h before (Prometheus records nothing while the host is down) W1: 3 failed samples. W2: 5 failed samples, 17:49:07Z to 17:49:37Z probe_success, 4 probes, 30 s scrape

    The two lag rows are the same service on the same host. But the before days hold other replicas and other traffic, so the rows are a range check, not a speed claim.

    Notes on the rows

    • W1 probes. Two of the three failed samples are at 08:16:31Z, the moment the start stage passed. The third is one prodback.docs.plus/health/supabase sample at 13:42:31Z. No probe alert fired.
    • W2 stall alert. "Node.js event-loop stall (>1s, repeated)" fired on 2026-11-20 at 01:15:30Z on hocuspocus-server with 1.03 s. It cleared at 01:18:30Z. It is a warning rule. W1 had 13 pending entries for it, and none fired.
    • W2 probe dip, 2026-11-19 17:49:07Z to 17:49:37Z. All four probes failed in the same cycle, and docs.plus failed twice. They timed out at about 9.5 s, then docs.plus and the Supabase health probe got 503. Traefik's health checks to webapp, rest-api, hocuspocus and admin all timed out from 17:49:13Z to 17:49:43Z. Host CPU rose from 7% to 25% for about one minute. No container restarted, no OOM kill was counted, and no deploy ran. No probe alert fired (2 pending entries). Cause, read 2026-11-20: a burst of outside traffic slowed the edge proxy. The apps, the host and its network stayed healthy, and Prometheus scraped the apps directly through the dip. It is not tied to the upgrade. The follow-up is Keep one client from slowing the edge proxy for every site #802.
    • Pending entries. W1 had 24, and W2 had 39. In W1 they were: event-loop stall 13, "Edits arriving but no document saved" 7, app p95 latency 3, edge p95 latency 1. Only the one W2 stall went on to fire.
    • GlitchTip. Step 1 took no issue count. The row counts issues by first_seen against the step 1 list time (07:05:01Z). An issue resolved or deleted in the GlitchTip UI is not seen by this rebuild.

    Left

  12. HMarzban commented on Nov 21, 2026

    @HMarzban
    CollaboratorAuthor

    Found 2026-11-21: the cleanup stage stopped every deploy job

    What happened. On 2026-11-18 at 13:00:12Z, upgrade-host.sh cleanup ran apt-get autoremove --purge. It removed libicu76, because apt had it marked automatic. The GitHub Actions runner is a .NET tarball, not a package. It loads ICU with dlopen, so apt and the stage's ldd scan could not see that it needs it.

    Why nobody saw it. The runner's Listener started at 08:10Z that day, before the removal, and kept ICU loaded. So the runner stayed online, and the Runner Watchdog passed. But each job starts a new Runner.Worker, and every one crashed at once: "Couldn't find a valid ICU package installed on the system". Build Images then hung with 0 steps until its timeout.

    Effect. No production deploy ran from 2026-11-18 to 2026-11-21. Production stayed on afd06574b (2026-11-17). The jobs that ran on GitHub's own runners were not affected.

    Fixed on the host, 2026-11-21 (maintainer ran it):

    • sudo apt-get install -y libicu76, which also marks it manual;
    • Runner.Listener --version prints 2.338.2;
    • the rerun of run 44901986374 ended success, and production runs 6da3a609e since about 12:48Z.

    Script fix (13a9faff9):

    A dry run of autoremove --purge now removes nothing. The CVE count and the 24 h results above are not affected.

  13. HMarzban commented on Nov 21, 2026

    @HMarzban
    CollaboratorAuthor

    Note: why the Runner Watchdog stayed green, 2026-11-21

    The Runner Watchdog checks only that a self-hosted runner is online (runner-watchdog.yml). Through the ICU outage, the old Listener stayed online, so it stayed green from 2026-11-18 to 2026-11-21. That is correct for what it checks.

    The signal that did exist: both deploy runs ended failure, and their Run Report showed Build Images with no steps and no start time. The first run also had a real test failure, and that hid the hung job.

    Why no Telegram alert came: both deploy alerts are steps on the self-hosted runner itself. When Runner.Worker cannot start, no step runs.

    Decision: no workflow change. An independent review checked this against the no-over-engineering rule. Its reasons:

    • The known cause is closed by 13a9faff9. cleanup keeps ICU, and preflight checks that a new runner process starts.
    • After Move the production runner to its systemd unit and its own root, and remove the stage runner #743, a systemd restart loads libraries fresh, so a broken runner would go offline, and the watchdog pages.
    • An off-host alert in the Run Report job would also page on normal cancels, when a newer push replaces a deploy. Filtering those out is more logic than one rare event needs.

    Rule for next time: a self-hosted job that ends with no steps means the runner host is broken, not the code. Run Runner.Listener --version on the host first. Reopen this only if it happens again from a new cause.

  14. HMarzban commented on Nov 24, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-11-24

    Push (build): uptime-kuma to recreate status.docs.plus (uptime-kuma-data volume), confirm https://status.docs.plus returns 200, and close #747.

    Next step: include uptime-kuma in the next (build): back push and close #747.

  15. HMarzban commented on Nov 24, 2026

    @HMarzban
    CollaboratorAuthor

    Rollback note (2026-11-24 Adviser audit on #742): the 2026-11-18 post-trixie snapshot predates the 2026-11-21 #742 chmod/chown and host cleanup. After any restore from post-trixie, re-run #742 steps 2–3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DevOpsSecurity

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions