Download Latest Version OpenEstate v0.9.1 -- Cheque Queue Validation Fix source code.zip (2.5 MB)
Home / v0.8.4
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-10-15 8.8 kB
v0.8.4 -- Safer upgrades, a stricter database, and the API off the network source code.tar.gz 2026-10-15 1.9 MB
v0.8.4 -- Safer upgrades, a stricter database, and the API off the network source code.zip 2026-10-15 2.4 MB
Totals: 3 Items   4.3 MB 0

Security advisory: GHSA-x58f-9wjq-rjgj (Low severity). Every install should upgrade.

This release changes some behaviour. The API stops answering on port 3000 from other machines, and the upgrade script refuses to go back to an older version. Read "Before you upgrade" first. Nothing else about day-to-day use changes.

Before you upgrade: behaviour changes

The API now listens on 127.0.0.1 only

Until v0.8.3 the API listened on every network interface, so anyone on your network could reach http://<server>:3000 directly and skip nginx (its TLS, its limits, and the real client address used for rate limits and the audit log). From v0.8.4 it listens on 127.0.0.1:3000, and it believes forwarded headers only from a proxy on the same machine. Nothing changes for an install that uses the bundled nginx.

If something reached port 3000 directly, such as a monitoring check from another machine or a reverse proxy or load balancer on a different host, it stops working after the upgrade. Set API_HOST=0.0.0.0 (or the address it should listen on) in /etc/openestate/openestate.env, run sudo systemctl restart openestate-api, and firewall port 3000 so only that proxy can reach it. A tunnel such as cloudflared should point at nginx (port 80 or 443), not at port 3000.

The upgrade script refuses to go backwards

From v0.8.4, upgrade-native.sh stops before backing up, building or changing anything if the version you name is older than the one running, or if your database already has changes that version does not contain. It says which, and the current version keeps running. There is no option to force it: to go back to an older version, restore the backup taken before your last upgrade with restore-native.sh. It also checks that the code it builds is exactly the commit it downloaded, and prints that commit ("Deploying <commit> (<version>)"). This protects upgrades run with the v0.8.4 script or later; the upgrade to v0.8.4 itself still runs your current script, so give it the release tag.

Some records can no longer be deleted

  • An installment that has interest charged can't be deleted, so a payment-plan edit that would remove it is refused with a plain message. Deleting an interest rule that has charged interest is refused the same way. (In practice no interest is charged yet; see "Known limitation".)
  • An applicant or broker who has a portal account can't be deleted directly in the database. The app never deletes them, so this only matters to someone removing rows by hand.

Upgrading

:::bash
cd /opt/openestate-src/deploy/native
sudo ./upgrade-native.sh --ref v0.8.4

Always give the release tag, never a branch name such as master.

Four harmless warnings, once

Your installed v0.8.3 script builds this upgrade, so it prints four pnpm warnings starting "Failed to create bin at /opt/openestate-src/apps/openestate/releases/…" (for browserslist, webpack, vite and terser). The release itself is complete and works. The same pnpm bug has been leaving a small folder, apps/openestate, inside your source checkout on every install and upgrade. From v0.8.4, upgrades no longer print the warnings or add to it, but they don't remove what's already there. The folder holds only pnpm link files and is not part of OpenEstate, so you can delete it:

:::bash
sudo rm -rf /opt/openestate-src/apps/openestate

(If your source checkout is somewhere else, it is the apps/openestate folder inside it.)

v0.8.4 puts back 71 database links (foreign keys) that a 2026-08 migration had removed. Where existing rows already point at something that no longer exists, the link is still added and checks every new or changed row, but it is left "not valid" and nothing is changed or deleted. The upgrade never stops for this. Because the upgrade to v0.8.4 runs your current (v0.8.3) script, which cannot print that list, run this once afterwards:

:::bash
sudo /opt/openestate-src/deploy/native/check-foreign-keys.sh

It only reads. It exits 0 and says so if every link is checked; otherwise it lists each one with the table, column and number of rows involved, and exits 2. From v0.8.4 on, the upgrade script prints the same list itself.

If the upgrade stops at a migration

If the upgrade stops during the database migration, for example because it timed out waiting for a busy table, nothing from that migration was applied and the previous version keeps running. Before you run the upgrade again, mark the failed migration as rolled back:

:::bash
sudo -u postgres psql -d openestate -c "UPDATE _prisma_migrations SET rolled_back_at = now() WHERE finished_at IS NULL AND rolled_back_at IS NULL"

Without this, the next attempt stops with "P3009 ... found failed migrations". The upgrade script in v0.8.4 and later prints this command itself; the v0.8.3 script, which runs this upgrade, does not.

The database is called openestate on every install made with install-native.sh, and upgrade-native.sh only ever migrates a database of that name. To check yours without printing the password in the same line, run:

:::bash
sudo sed -nE 's#^DATABASE_URL=.*/([^/?"]+).*#\1#p' /etc/openestate/openestate.env

If your database runs on another server (you upgrade with --db-host), run the command there, or add -h <host> -U <superuser> to psql instead of sudo -u postgres.

v0.8.4 has several migrations, and they are applied one at a time. If the foreign-key step fails, the earlier v0.8.4 migrations (the one that limits the ledger escape hatch to the database superuser, and the one that moves the portal-link check to its own owner) may already be applied. The previous version keeps running correctly in that state: it never uses the escape hatch, and the portal-link check behaves the same under its new owner.

The project's address

The project now lives at https://github.com/stemAGH/openestate. The upgrade to v0.8.4 still works through GitHub's redirect from the old address. From v0.8.4 the upgrade script updates the address automatically. If you keep your own clone and git remote get-url origin doesn't show stemAGH, run:

:::bash
git remote set-url origin https://github.com/stemAGH/openestate.git

What else is new

  • The ledger's maintenance escape hatch works only for the database superuser. Before, any database role, including the ones the application signs in as, could use it to change or delete append-only financial rows.
  • The portal-link check can't be switched off by the application's own database role. Its database function now belongs to a role that cannot sign in.
  • New default permissions reach existing system roles on upgrade. Each system role remembers the defaults it was last given; an upgrade adds only defaults that are new. A permission an admin removed stays removed, and nothing is taken away. The first upgrade only records the starting point and prints how each role differs from its defaults, for an admin to review in Admin → Roles.
  • restore-native.sh works onto a fresh server: it creates the database roles a backup refers to before loading it.

Fixed

  • Two refreshes at the same moment no longer sign a user out, on staff and portal, for example when a browser restores several tabs at once. Every change to one user's sign-in tokens (sign-in, refresh, sign-out, and ending sessions after a password, 2FA or account change) now happens one at a time for that user, so each sees the others' results. Ending a user's sessions now also ends a refresh that is in progress at that moment.
  • A flaky test in the database package no longer fails CI at random.

Known limitation

Delayed-payment interest can't yet be switched on for a booking. Interest rules can be set up under Masters, but there is no way in the app to attach one to a booking, so no interest is charged in practice. A fix is planned for v0.9.

How it was checked

  • CI upgrades from v0.8.3 with v0.8.3's own script, on a clean database, on one with an orphaned row, and on one where a busy table makes a migration time out and the recovery command above is used; each time it checks money totals, open sessions, that port 3000 is closed to the network, and that going back is refused.
  • The upgrade was rehearsed on a test server restored from a v0.8.3 snapshot, with v0.8.3's own script and open staff and portal browser tabs. Money totals were unchanged, both tabs kept working, port 3000 was closed to the network, audit rows recorded the real client address, every foreign key validated, and a later attempt to go back to v0.8.3 was refused with nothing changed.
Source: README.md, updated 2026-10-15