inbuxa uninstall, and the webmail's secret for a host server beside a host webmail #22

Merged
jcoffey-dev merged 2 commits from feat/uninstall into main 2026-10-12 20:46:29 +00:00
Owner

Two commits: a fix for a bug in v2026.10.12.3, then inbuxa uninstall.

1. Fix: the webmail on the host couldn't sign anyone in beside a server on the host

A host server reads the webmail's client secret from server.env, and the installer wrote it there only for a webmail in a container. With both on the host, the server registered no client for the webmail. It answered healthy and signed nobody in.

  • serverEnv now passes the secret whenever there's a webmail here, in either shape. A unit test covers both.
  • all-host.sh only checked health, so it missed this. It now has the server sign someone in for the webmail's address through nginx, which fails without the fix.
  • Verify gives each check up to a minute. A converge brings the front ends up last, and a just-started container can refuse the first connection.

Needs an installer release to reach anyone who ran that combination. Re-running the same install with the fixed installer repairs an existing install, since the server's environment is rewritten on converge.

2. inbuxa uninstall [--dry-run] [--yes] [--purge]

  • Removes what the installer put here: containers, units, the server binary and older ones kept for rollback, the console's and webmail's files, the webmail's user, and the installer's Node.
  • Keeps the data: the server's volumes or directory and user, Caddy's certificates, credentials.txt, .env, dns.zone. The install record is marked removed, so install again with the same options converges onto it: same mailboxes, no first boot.
  • --purge removes the data too, including volumes by name, since after a keeping uninstall there's no compose file left to name them. It leaves <dir>/backups and names it for you to delete.
  • Never touched: Docker and other distribution packages, and your web server's loaded config (it tells you about that). It also tells a joined machine that its server still lists these front ends.
  • Taking off one component is install with it skipped, so uninstall console points there.
  • status reports "uninstalled, data kept", and upgrade has nothing to do on it.

Tests

  • Unit tests: what's removed and kept, with and without --purge, in each shape, and the server's environment for both webmail shapes.
  • e2e:
    • uninstall-containers 22/22: a dry run, and a run without --yes, change nothing. Uninstall keeps the volumes, credentials and backups. Reinstalling brings the same mailbox back. Purge leaves only the backups.
    • uninstall-host 14/14: the units, binaries, the webmail's user and the Node are removed, and the server's data and user kept. Reinstall works, then purge.
    • all-host 18/18 (with the new sign-in check), webmail-host 18/18, upgrade-containers 17/17, install-local 26/26, install-host 43/43, status-export 16/16, topology 28/28, interface 22/22.

Left in phase 3: certs.

Two commits: **a fix for a bug in v2026.10.12.3**, then `inbuxa uninstall`. ### 1. Fix: the webmail on the host couldn't sign anyone in beside a server on the host A host server reads the webmail's client secret from `server.env`, and the installer wrote it there **only for a webmail in a container**. With both on the host, the server registered no client for the webmail. It answered healthy and signed nobody in. - `serverEnv` now passes the secret whenever there's a webmail here, in either shape. A unit test covers both. - `all-host.sh` only checked health, so it missed this. It now has the server sign someone in for the webmail's address through nginx, which fails without the fix. - `Verify` gives each check up to a minute. A converge brings the front ends up last, and a just-started container can refuse the first connection. **Needs an installer release** to reach anyone who ran that combination. Re-running the same `install` with the fixed installer repairs an existing install, since the server's environment is rewritten on converge. ### 2. `inbuxa uninstall [--dry-run] [--yes] [--purge]` - **Removes** what the installer put here: containers, units, the server binary and older ones kept for rollback, the console's and webmail's files, the webmail's user, and the installer's Node. - **Keeps the data:** the server's volumes or directory and user, Caddy's certificates, `credentials.txt`, `.env`, `dns.zone`. The install record is **marked removed**, so `install` again with the same options converges onto it: same mailboxes, no first boot. - **`--purge`** removes the data too, including volumes by name, since after a keeping uninstall there's no compose file left to name them. It leaves `<dir>/backups` and names it for you to delete. - **Never touched:** Docker and other distribution packages, and your web server's loaded config (it tells you about that). It also tells a joined machine that its server still lists these front ends. - **Taking off one component** is `install` with it skipped, so `uninstall console` points there. - `status` reports "uninstalled, data kept", and `upgrade` has nothing to do on it. ### Tests - Unit tests: what's removed and kept, with and without `--purge`, in each shape, and the server's environment for both webmail shapes. - **e2e:** - **uninstall-containers 22/22:** a dry run, and a run without `--yes`, change nothing. Uninstall keeps the volumes, credentials and backups. Reinstalling brings the same mailbox back. Purge leaves only the backups. - **uninstall-host 14/14:** the units, binaries, the webmail's user and the Node are removed, and the server's data and user kept. Reinstall works, then purge. - all-host **18/18** (with the new sign-in check), webmail-host 18/18, upgrade-containers 17/17, install-local 26/26, install-host 43/43, status-export 16/16, topology 28/28, interface 22/22. **Left in phase 3:** `certs`.
jcoffey-dev added 2 commits 2026-10-12 20:40:25 +00:00
A server on the host reads the webmail's client secret from server.env,
and it was written there only for a webmail in a container. With the
webmail on the host as well, the server registered no client for it: the
webmail answered healthy and signed nobody in. In v2026.10.12.3.

serverEnv now gives the secret whenever there is a webmail here, in
either shape. all-host.sh, which only checked the webmail's health, now
asks the server, through nginx, to sign someone in for the webmail's
address -- which is what failed.

Verify also gives each check up to a minute: a converge brings the front
ends up last, and a container started a moment before can refuse the
first connection, which isn't a problem to report.
`inbuxa uninstall [--dry-run] [--yes] [--purge]` takes away what the
installer put on this machine: the compose project's containers, the
units, the server's binary and the older ones kept for rollback, the
console's and the webmail's files, the webmail's user, the installer's
own Node. The data stays -- the server's volumes or its directory and
user, Caddy's certificates, credentials.txt, .env, dns.zone -- and the
install record, marked removed, so `install` run again with the same
options converges onto it: the same mailboxes, no first boot.

--purge takes the data too, volumes by name as well (after an uninstall
that kept them there is no compose file left to name them), all but
<dir>/backups, which it names for the operator to delete. Docker, other
distribution packages and the configuration an operator's own web server
loads are never touched; the last is said, as is a joined server that
still lists these front ends. One component off is `install` with it
skipped, and uninstall says so rather than doing it a second way.

status says what was uninstalled and what was kept; upgrade has nothing
to do on it.

Tests: what is removed and kept, with and without --purge, in each
shape. e2e: uninstall-containers 22/22 (a dry run and a run without --yes
change nothing; uninstalled with volumes, credentials and backups kept;
installed again with the same mailbox signing in; purged to the backups
alone), uninstall-host 14/14 (units, binaries, the webmail's user and
Node gone, the server's data and user kept, back again, then purged).
upgrade-containers, install-local, install-host, status-export, topology,
interface, all-host and webmail-host pass.
jcoffey-dev merged commit a1a12ac22e into main 2026-10-12 20:46:29 +00:00
jcoffey-dev deleted branch feat/uninstall 2026-10-12 20:46:29 +00:00
Sign in to join this conversation.