Skip to content

v0.21.1.

Complete release notes · 2026-12-02. Read upgrade instructions and runtime limits before deploying.

Highlights

  • A first-run setup no longer answers 500, "database is locked", when a background write begins while the admin password is hashed; a registration, a password reset and an SSO sign-in that enrolls an account had the same order.
  • A standby replica streams from its primary (a committed change is on it within a second, not a minute), and the volume a promotion left behind can be brought back as the database's standby again, rewound in seconds with no copy of the data directory to make.
  • A standby of a Redis or Valkey database: a replica built in seconds with nothing copied, promoted by hand or taking over by itself, the previous volume brought back; and synchronous replication for every engine, opt-in: the database's writes wait for its standby.

Action needed: No. What is new for a database on a node needs its agent 0.21.1 or newer; the card says so until the agent is updated.

Added

  • A standby replica streams from its primary. A standby used to replay the database's WAL archive alone, so a committed change was on it within about a minute. It now streams from the primary too, and a committed change is on it within a second (streaming in GET /v1/databases/:id/standby, "Streaming from the primary" on the card and in ninedeploy databases standby status). The archive stays what the standby falls back to when the primary has recycled WAL it had not received, and what point-in-time recovery keeps. The primary is asked for one thing: one line in its pg_hba.conf that admits the standby's connection, added by the panel before the standby starts. There is no role and no password of its own: the standby connects as the database's own user, with the password its container already carries for the day it is promoted. On a node this needs the agent 0.21.1 or newer; with an agent that can build a standby but is too old to stream (0.21.0) the standby has the archive alone, and the status says so (streamingRefusal). A standby that was ready without streaming, built by an earlier release or on such a node, is started again with streaming by itself once its host can. A promotion without the handover now loses the primary's last moment at most, where it lost up to a minute.
  • The previous volume can be brought back as the standby. A promotion keeps the volume the database ran on before, and until now it was good for nothing but being deleted: there was no way back to it. It can now become the database's standby again (Bring back as the standby on the card, ninedeploy databases standby rewind <id>, POST /v1/databases/:id/standby/rewind): pg_rewind brings it to the database as it is now, taking what it needs from the database and from the archive, and it is started as a standby that streams from the primary. No copy of the data directory is made and no room for one is needed: measured at 1.5 seconds for a crashed primary of 62 MB, and no rewind at all for a volume a handover stopped cleanly. What the volume holds that the database never saw is lost, as it was at the promotion. From then on it is the standby's volume: removing the standby removes it, and there is nothing left to finalize. The read-only switch that a handover leaves on the old primary is dropped with the rewind, so that the volume can be promoted again later. The status says when it cannot be brought back (rewindRefusal: a standby is live, the database is not running, an upgrade is in progress). On a node this needs the agent 0.21.1 or newer; the card says so with an older one. The volume has to be able to follow the database: when the retention already removed the WAL since the promotion, the build fails and says so, and the volume stays kept (a standby from a base backup is the way then).
  • A standby of a Redis or Valkey database. Only a PostgreSQL database could have a standby. A Redis or Valkey database, on the panel host or on its node (a node needs its agent 0.21.1 or newer), has one now, from the same card and the same commands (Create standby, ninedeploy databases standby create <id>): a replica, a second server started with the database's own image, command and limits on a volume of its own, which receives the whole dataset from the database and then every write it acknowledges within a second. Nothing is copied for it and no point-in-time recovery is needed; it is ready in seconds (measured: linked about six seconds after its start, the first full sync included). Promote the standby is a planned handover that loses nothing the database acknowledged: its writes are held, the replica receives the last of them, the database's container is removed, the replica is promoted and its dataset saved on its volume, and that volume starts under the database's name (a few seconds of downtime: measured at 3.6 seconds under the database's name, from the first request it did not answer to the first it did). Promote without the handover is for a database that does not answer: what it had not passed on is missing, and the previous volume keeps it. The previous volume is deleted (Delete the previous volume) or brought back as the standby (Bring back as the standby, ninedeploy databases standby rewind <id>): started as the replica again on that same volume, and given what it missed since or the whole dataset. The automatic failover is offered as for PostgreSQL: armed, the panel asks the database every thirty seconds, starts a stopped container again once, and hands the database to the replica, where it stands, when it is still gone two minutes later or has not answered for ten; a standby is built again and armed, and left unarmed after three automatic failovers of the database in a day. What the database had not passed on is then missing. On a node the replica is built beside its database, on the database's own bridge, through the agent: the servers are asked by name from a catalogue (db.standby, command), and the database's password reaches the cli through the environment of the agent's docker client, on no command line. The status says which engine's standby it is (engine in GET /v1/databases/:id/standby).
  • Synchronous replication, opt-in per standby. A standby was always a little behind: a commit returned as soon as the database wrote it, so the crash of the database could lose its last moment. With Turn synchronous replication on on the card, ninedeploy databases standby sync <id> on, PUT /v1/databases/:id/standby with {"synchronous": true} or synchronous at the creation, the database's writes wait for the standby while it streams: a PostgreSQL commit returns once the standby flushed it (about three milliseconds more, measured on PostgreSQL 18.7), and a Redis or Valkey database refuses a write while its replica is away (measured on Redis 8.8.4 and Valkey 9.1.4). A standby that does not stream is not waited for: the panel lifts the setting within one pass and sets it again when the standby streams. It is lifted before a removal, before a handover's switch and after every promotion, told again after a restart of a Redis or Valkey database (which forgets it), and the standby built again after a promotion keeps it. On a node it needs agent 0.21.1 or newer. The Doctor says when the database is set to wait for a standby that does not stream (standby_sync_waiting).
  • A preview copy of a MySQL or MariaDB database. A pull request preview could get a copy of its PostgreSQL and Redis-family databases only. MySQL and MariaDB join them, with one difference: their backup is the whole server, its accounts among it, so the copy never comes from the backup. It comes from a dump of the application database taken at that moment (measured on mysql:9.7 and mariadb:12.3: about 400 ms for a small one), and it keeps the credentials of its own first start: production's password fails on the copy and the copy's fails in production, and what production has beside the application database (other databases, other accounts) is not on the copy. MongoDB and databases on a node are not copied yet.

Changed

  • Template ids no longer name the catalog they came from. The Hub's 192 templates converted from the Coolify and Dokploy catalogs are named for their apps now: coolify-apprise-api is apprise-api, dokploy-meilisearch is meilisearch-stack. Every id that was shipped still finds its template: a bookmark, an old CLI command, a service installed before the change and a plugin manifest all resolve the old id, and the API answers with the template's id of today. GET /v1/templates says stack: true for a compose stack. The two catalogs are credited in docs/TEMPLATE_MIRRORS.md, which also lists the names chosen for the apps both catalogs carry.

Fixed

  • The node guide no longer says that a Redis or Valkey database on a node has no standby. A line from before one could be built there was left in NODE_OPERATIONS.md, under a paragraph that says the opposite.
  • The Doctor no longer says that the standby of a node's database is down. It looked for the standby's container on the panel host's Docker, where a node's standby never is, so every ready standby of a database on a node was reported as not running (its container "gone"), since standbys came to nodes in 0.21.0. A node's standby is on its node's Docker, which the scan does not see; it is skipped as a node's database is.
  • The first admin account is no longer created under a lock that a background write could trip over. The password was hashed inside the transaction that creates the account, after it had read, and for the whole of the hash the transaction held the database's read lock. A write that began in the meantime (the metrics collector's sweep, every thirty seconds) took the write lock, could not commit, and the account could not go on: both waited out the five-second busy timeout, the sweep failed and the setup answered 500. A registration, a password reset and an SSO sign-in that enrolls an account had the same order. In each the password is hashed before the transaction opens, and every check keeps its order. The browser journeys found it on a first run (2026-11-29); test/lib/passwordHashOutsideTransaction.test.ts holds each of the four at its hash, on a database file.

Internal

  • The standby's streaming: engine/standbySpec.ts (standbyConninfo, standbyServerArgs(streaming) with primary_conninfo, and which commands a node's agent accepts), the catalogue's STANDBY_REPLICATION_SCRIPT and the agent's db.standby action replicationRule (lib/databaseStandbyNames.ts; no SQL and no shell command crosses to a node), standby.replayState with a third column (the WAL receiver's status), database_standbys.streaming (migration 0133), AGENT_STANDBY_STREAMING_VERSION (0.21.1; it must equal the release number), facts with streaming, the journal's pass starting a ready standby again with streaming (once in ten minutes at most), and streamingRefusal in the status. Tests: test/engine/postgresStandby.test.ts, test/agentOpsDatabaseStandby.test.ts, test/lib/nodeDatabaseStandby.test.ts, test/lib/standbyDeps.test.ts, test/lib/databaseStandby.test.ts, test/lib/databaseStandbyNode.test.ts, and real Docker on both hosts (test/integration/databaseStandby.integ.test.ts: a commit on the standby within seconds with no WAL switch, and a standby started on the archive alone streaming after the next pass; test/integration/databaseStandbyNode.integ.test.ts: through the agent). Measured on postgres:18.7-alpine before the design: the image's pg_hba.conf admits a replication connection over the socket only; one line and a reload admit it over TCP; the WAL receiver takes the password from PGPASSWORD; a commit is on the standby in 0.3 to 0.4 s; the fallback to the archive and back.
  • The previous volume brought back: engine/standbySpec.ts (STANDBY_REWIND_SCRIPT, the helper's flags and label, standbyLabels naming the volume the standby runs on, previousVolumeOf), rewindPreviousVolume (engine/postgresStandby.ts) and the agent's db.standby action rewind (sealed; the password in a 0600 env file that is gone when the rewind ends), the node's hands (rewind, canRewind, startStandby on the volume the row names), the journal's build (phase rewind: the database admits the replication connection, the rewind, the start; no disk check and no base backup; the connection insisted on), the kept-volume pointer cleared at admission and given back when the build fails or is cut (a restart of the panel, a build no process owns: a volume brought back is never removed with its build), rewindStandby, rewindRefusal in the status, and standbyRequestTimeoutMs for rewind. Tests: test/engine/postgresStandby.test.ts, test/agentOpsDatabaseStandby.test.ts, test/lib/nodeDatabaseStandby.test.ts, test/lib/standbyDeps.test.ts, test/lib/databaseStandby.test.ts, test/lib/databaseStandbyNode.test.ts, test/modules/databaseStandbys.test.ts, and real Docker on both hosts (test/integration/databaseStandby.integ.test.ts: after a planned handover and after a crash the previous volume is the standby again, and takes writes once it is promoted again; test/integration/databaseStandbyNode.integ.test.ts: through the agent); the SDK, the CLI and the card each with their own.
  • Measured before and during the design, on postgres:18.7-alpine and on postgres:18: pg_rewind recovers a crashed cluster itself, and with --restore-target-wal and the target's restore_command written first it takes the segments it lacks from the archive (after the recovery's checkpoint a crashed primary's own pg_wal no longer holds them); 1.3 to 1.5 s for a crashed primary of 62 MB (84 MB copied), "no rewind required" in 0.6 s for a volume a handover stopped cleanly; the standby is ready about four seconds after a handover and about six after a crash. Without data checksums and wal_log_hints it refuses, and touches nothing. The replication rule has to be in the source first (the helper's own connection). When it really rewinds, the database's configuration files come over; when it does not they stay, with the read-only switch a handover left: promoted again, that volume refused every write, so the script drops the setting. A primary that was killed rather than stopped leaves its postmaster.pid behind, naming PID 1 (the postmaster is PID 1 in the image), and PID 1 is alive in the helper too: single-user mode took the directory for in use, so the script removes that file, and both hosts make sure first that no container mounts the volume. A standby's container on a node carries no ninedeploy.managed label of its own: docker.runSpec reserves it. A volume brought back goes on from where the promotion left it, so it needs the WAL since then, on the database or in the archive: after a prune to the base backup taken after the promotion, the database answered "requested WAL segment … has already been removed" for ever and the standby never moved, while the build called it ready; the build insists on the connection now and fails with the reason (a standby from a base backup is still ready without one). The first hosted run of the crash scenario promoted a standby it had just started, before it answered on a slow runner; the scenario waits for it now.
  • The standby of a Redis or Valkey database: engine/redisStandby.ts (the replica's command: the primary's container and the database's password as masterauth; INFO replication read as the replica's state and offsets, CLIENT PAUSE ... WRITE and CLIENT UNPAUSE, REPLICAOF NO ONE, BGSAVE waited for), the engine-neutral part of the journals moved to a leaf, lib/standbyJournal.ts (rows, statuses, the kept volume, the refusals; the PostgreSQL journal re-exports it), the journal lib/cacheStandby.ts (phases start, rewind, pause, catchup, stop-primary, promote, persist, switch; the build waits for the link, two minutes at most; the handover waits for the catch-up, two minutes at most, and is given up before the primary is touched; a promotion cut by a restart goes on by the phase on its row, and from the primary's removal on nothing is asked of the primary; writes held by a run that died are let go when the next run gives the promotion up, and end by themselves within ten minutes), the dispatch at every entry point of lib/databaseStandby.ts by the database's engine (discardStandby too: a database deleted with its standby), and the automatic failover: arming at the creation and after, the watch (the leaf's lookAtPrimary, which the PostgreSQL journal takes from there now), the promotion by the panel with failoverReason, the standby built again and armed, and the pause after as many automatic failovers as the row says, engine in the status schema, and a major version upgrade refused while a standby of any engine is live (standby_exists, said before anything is planned or recorded). Tests: test/engine/redisStandby.test.ts, test/lib/cacheStandby.test.ts, test/modules/databaseStandbys.test.ts, and real Docker (test/integration/databaseStandbyRedis.integ.test.ts: Redis and Valkey); the SDK, the CLI and the card each with their own. On a node: lib/nodeCacheStandby.ts (the hands of the replica's journal over the agent: STANDBY_COMMANDS in lib/databaseStandbyNames.ts, the replica's own identity nodeReplicaStandbyIdentity, and the agent's db.standby action command in agentOps/databaseStandby.ts, which binds the database by its volume's and container's labels and runs the cli with the password in the environment of its docker client; spawnValidatedStream takes variables as the line channel does), the journal's hands chosen by the database's host (cacheHandsFor, the row read in the journal's shape at every entry point), assertHost (the agent 0.21.1 or newer), and the registry's kill switch for db.standby being the database's alone: the archive's switch is read by the op for a PostgreSQL request, and asked for by the PostgreSQL hands before a build (a node whose owner turned archiving off can still build a standby of a Redis or Valkey database). Tests: test/lib/nodeCacheStandby.test.ts (the hands, each with a scripted agent), test/lib/cacheStandbyNode.test.ts (the journal over them, the panel host's Docker forbidden), test/agentOpsDatabaseStandby.test.ts (the command action: by name, bound, the password off every command line), and real Docker with the agent's own code in the process (test/integration/databaseStandbyRedisNode.integ.test.ts: built, promoted with the handover, the row switched in the node's column, the volume started under the database's name by the node's runtime, finalized).
  • Measured before the design on redis:8.8 (8.8.4) and valkey/valkey:9.1 (9.1.4): a replica is the primary's command with --replicaof and --masterauth; it links about six seconds after its start (the image's diskless sync waits five), refuses writes, and has an acknowledged write in 0.3 s; CONFIG REWRITE fails on the image ("The server is running without a config file"), so a promoted volume is restarted with the database's own command instead of being rewritten; a replica that is restarted is a replica again; the persistence is the image's own (save 3600 1 300 100 60 10000, no AOF), so the dataset is saved with BGSAVE before the switch; a paused primary stops cleanly in 0.4 s; a promoted volume is up in about a second; the previous volume started with the replication arguments resynchronizes by itself, in part or in full. The image's server runs as PID 1 without a configuration file, and the replica's container carries the database's password twice on its command line (--requirepass and --masterauth), as the database's own carries it once. For the automatic failover (December 1, 2026): a container stopped by hand stays exited with a restart count of 0, the policy not starting it; started again, the server answers in 133 ms and its replica's link is up again in 4.3 s. A server that cannot start again (a dataset it refuses to load: "Fatal error loading the DB") reads restarting, and running now and then between its restarts, its count reaching 2 in 435 ms; the replica meanwhile keeps its link down and its data, and REPLICAOF NO ONE makes it the database. A server blocked for its clients (CLIENT PAUSE ... ALL) keeps its container running with a count of 0 while a client waits out its time: that is the silent case. (DEBUG SLEEP is off on the image.)
  • Synchronous replication: lib/standbyJournal.ts (SyncHands, keepSynchronous: the database is asked what it holds and told only when it differs), engine/postgresStandby.ts (setSynchronous by ALTER SYSTEM and a reload, synchronousNow), engine/redisStandby.ts (replicaWrites, replicaWritesNow, minReplicasOf), the catalogue (standby.syncOn, standby.syncOff, standby.syncState; replica.syncOn, replica.syncOff, replica.syncState), the rewind's script dropping synchronous_standby_names with the read-only switch, both journals' pass and settings (measureStandby, measureCacheStandby, configureFailover: the database answers before the row changes), releaseSynchronousStandby before a deletion stops the database, the node's hands by name, packages/db (database_standbys.synchronous, migration 0134_standby_sync), the CLI (standby sync, --synchronous), the card, the Doctor's standby_sync_waiting, the OpenAPI text and the guides (DATABASES_BACKUPS 13 and 14, NODE_OPERATIONS, CURRENT_STATUS, RESTART_STATE, ARCHITECTURE). Measured before the design: on postgres:18.7-alpine a commit 2.1 ms asynchronous and 5.3 ms synchronous, the setting surviving a restart of the primary, a commit waiting for ever with the standby away and statement_timeout not cutting it, and a base backup copying the primary's postgresql.auto.conf with the setting (a standby built from one carries it: a promoted standby is told to wait for none); on redis:8.8 and valkey/valkey:9.1 CONFIG SET min-replicas-to-write 1 refusing a write at once with the replica stopped and after about eleven seconds with it paused, and the setting gone after a restart.

Source CHANGELOG.md at f3f9bea7