From e2b6db31b19a3544f6148a5c27e2b3a5c9118deb Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 16 Nov 2026 11:58:54 +0000 Subject: [PATCH 1/8] Upgrade PostgreSQL 14 to 15 First draft --- .../blog/2026/11/postgresql-upgrade.md | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 nuxt/content/blog/2026/11/postgresql-upgrade.md diff --git a/nuxt/content/blog/2026/11/postgresql-upgrade.md b/nuxt/content/blog/2026/11/postgresql-upgrade.md new file mode 100644 index 0000000000..74bb52cf10 --- /dev/null +++ b/nuxt/content/blog/2026/11/postgresql-upgrade.md @@ -0,0 +1,115 @@ +--- +title: 'Migrating from PostgreSQL 14 to 16' +authors: + - ben-hardill +date: '2026-12-20' +description: Learn how to upgrade the PostgreSQL Database used with FlowFuse Docker and Kubernetes. +tags: + - flowfuse + - kubernetes + - docker + - postgresql + - postgres +--- + +PostgreSQL v14 passed it's End Of Supported Life at the start of November 2026, to ensure on going support we are migrating to PostgreSQL v16. + +As part of the FlowFuse v3.4.0 release we are shipping PostgreSQL v16, the following are the instructions for upgrading from any version greater than v2.10.0. + +If you are starting with version v2.10.0 or older please follow [these instructons](https://github.com/FlowFuse/docker-compose/blob/main/UPGRADE.md) to move to v3.3.0 first. + + + +## Assumptions + +Through out this document the following assumptions will be made + +### Docker + +- Docker Compose commands include the `-p flowfuse` option to set the project name. Your project name can be found by running `docker compose ls` +- The posgres service in the `docker-compose.yml` has not_ been edited (specifically the `POSTGRES_PASSWORD` and `POSTGRES_USER` environment variables) + +### Kubernetes + +- The FlowFuse helm chart was installed into the `flowfuse` namespace +- You are using the bundled PostgreSQL database, not an externally installed and configured install. Specifically the following Helm values are **not** set: + - `postgresql.host` + - `postgresql.auth.username` + - `postgresql.auth.password` + - `postgresql.auth.database` + +If these your install is different then the commands will need to be updated to match your specific environment. + +## Backup + +Before starting any migration it is important to ensure a full backup of the database is performed. + +The following commands will write a compressed database backup to a file called `flowfuse-db-backp-sql.bz2` in the current directory. + +### Docker + +```bash +docker exec -it flowfuse-postgres-1 pg_dump flowforge | bzip2 > flowfuse-db-backup-sql.bz2 +``` + +You should also take a copy of your current `docker-compose.yml` file + +```bash +cp docker-compose.yml docker-compose-backup.yml +``` + +### Kubernetes + +```bash +PGPASSWORD=`kubectl -n flowfuse get secrets flowfuse-secrets -o json | jq -r '.data."postgres-password"' | base64 -d` +kubectl -n flowfuse exec -it flowfuse-postgresql-0 -- /bin/sh -c "env PGPASSWORD=$PGPASSWORD pg_dump -U postgres flowforge" | bzip2 > flowfuse-db-backup-sql.bz2 +``` + +## Upgrade + +### Docker + +Once the backup has completed the following steps need to be completed to upgrade the PostgreSQL instance. These instructions insert part 2 into the [normal upgrade instructions](https://flowfuse.com/docs/install/docker/#upgrade) + +1. Stop the docker compose project + ```bash + docker compose -p flowfuse down --rmi all + ``` +2. Run the in place database upgrade + ```bash + docker run --rm -it --name pgupdate -v flowfuse_db:/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -e POSTGRES_USER=root -e PGAUTO_ONESHOT=yes pgautoupgrade/pgautoupgrade:16-trixie + ``` +3. Download the latest Docker Compose files + ```bash + curl -L -o docker-compose.yml https://github.com/FlowFuse/docker-compose/releases/latest/download/docker-compose.yml + ``` +4. Make sure the `.env` file is present and contains your installation-specific configuration. Download an example `.env` file if needed: + ```bash + curl -o .env.example https://raw.githubusercontent.com/FlowFuse/docker-compose/refs/heads/main/.env.example + ``` +5. Pull the latest version of the default stack container (and any other stacks you have configured) + ```bash + docker pull flowfuse/node-red:latest + ``` +6. Start the project depending on the TLS configuration (replace `$projectName` with your project name): + + - automatic TLS: + ```bash + docker compose --profile autossl -p flowfuse up -d + ``` + - any other scenario: + ```bash + docker compose -p flowfuse up -d + ``` + + +### Kubernetes + +The Kubernetes upgrade is handled by the helm chart. Using v2.x.x of the helm chart will include an init container to the PostgreSQL subchart that will perform an inplace upgrade at startup (and no-op on subsequent restarts). + +The usual Kubernetes instructions should be followed. + + +## Rollback + +Should there be a problem the following instauctions can be \ No newline at end of file From ddf27f5c3011b1fac07d73b0acf85ae284fa16b4 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Tue, 17 Nov 2026 09:46:44 +0000 Subject: [PATCH 2/8] Fixes --- .../blog/2026/11/postgresql-upgrade.md | 67 +++++++++++++++---- 1 file changed, 53 insertions(+), 14 deletions(-) diff --git a/nuxt/content/blog/2026/11/postgresql-upgrade.md b/nuxt/content/blog/2026/11/postgresql-upgrade.md index 74bb52cf10..1d748f7ee3 100644 --- a/nuxt/content/blog/2026/11/postgresql-upgrade.md +++ b/nuxt/content/blog/2026/11/postgresql-upgrade.md @@ -12,9 +12,9 @@ tags: - postgres --- -PostgreSQL v14 passed it's End Of Supported Life at the start of November 2026, to ensure on going support we are migrating to PostgreSQL v16. +PostgreSQL v14 passed it's End Of Supported Life at the start of November 2026, to ensure on going support we are migrating our Docker Compose and Kubernetes installs to PostgreSQL v16. -As part of the FlowFuse v3.4.0 release we are shipping PostgreSQL v16, the following are the instructions for upgrading from any version greater than v2.10.0. +As part of the FlowFuse v3.4.0 release we are shipping PostgreSQL v16, the following are the instructions for upgrading from any version greater than FlowFuse v2.10.0. If you are starting with version v2.10.0 or older please follow [these instructons](https://github.com/FlowFuse/docker-compose/blob/main/UPGRADE.md) to move to v3.3.0 first. @@ -91,25 +91,64 @@ Once the backup has completed the following steps need to be completed to upgrad ```bash docker pull flowfuse/node-red:latest ``` -6. Start the project depending on the TLS configuration (replace `$projectName` with your project name): - - - automatic TLS: - ```bash - docker compose --profile autossl -p flowfuse up -d - ``` - - any other scenario: - ```bash - docker compose -p flowfuse up -d - ``` +6. Start the project depending on the TLS configuration: + - automatic TLS: + ```bash + docker compose --profile autossl -p flowfuse up -d + ``` + - any other scenario: + ```bash + docker compose -p flowfuse up -d + ``` ### Kubernetes The Kubernetes upgrade is handled by the helm chart. Using v2.x.x of the helm chart will include an init container to the PostgreSQL subchart that will perform an inplace upgrade at startup (and no-op on subsequent restarts). -The usual Kubernetes instructions should be followed. +The usual Kubernetes [upgrade instructions](https://flowfuse.com/docs/install/kubernetes/#upgrade) should be followed. ## Rollback -Should there be a problem the following instauctions can be \ No newline at end of file +Should there be a problem the following instauctions can be used to revert to the previous FlowFuse version and PostgreSQL v14. + +### Docker + +1. Stop any running containers + ```bash + docker compose -p flowfuse down --rmi all + ``` +2. Replace the new `docker-compose.yml` with the backup + ```bash + cp docker-compose-backup.yml docker-compose.yml + ``` +3. Delete PostgreSQL v16 database volume + ```bash + docker volume rm flowfuse_db + ``` +4. Bring up the containers but do not start them + - automatic TLS: + ```bash + docker compose --profile autossl -p flowfuse up -d --no-start + ``` + - any other scenario: + ```bash + docker compose -p flowfuse up -d --no-start + ``` +5. Start the PostgreSQL container + ```bash + docker start flowfuse-postgres-1 + ``` +6. Restore the backup + ```bash + bzcat flowfuse-db-backup-sql.bz2 | docker exec -it flowfuse-postgres-1 pg_restore -c flowforge + ``` +7. Restart other containers + ```bash + docker compose -p flowfuse start + ``` + +### Kubernetes + +TODO \ No newline at end of file From 7fe5b9816e9afbd88b767a9b35bf54d5716d1e75 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Tue, 17 Nov 2026 14:59:56 +0000 Subject: [PATCH 3/8] fix title --- nuxt/content/blog/2026/11/postgresql-upgrade.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuxt/content/blog/2026/11/postgresql-upgrade.md b/nuxt/content/blog/2026/11/postgresql-upgrade.md index 1d748f7ee3..e97b2075e8 100644 --- a/nuxt/content/blog/2026/11/postgresql-upgrade.md +++ b/nuxt/content/blog/2026/11/postgresql-upgrade.md @@ -1,5 +1,5 @@ --- -title: 'Migrating from PostgreSQL 14 to 16' +title: 'Migrating from PostgreSQL v14 to v16' authors: - ben-hardill date: '2026-12-20' From 910dc006dbe0acca2d4e12f3321d1febc7f578db Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Fri, 20 Nov 2026 11:03:46 +0000 Subject: [PATCH 4/8] Kube restore instructions --- .../blog/2026/11/postgresql-upgrade.md | 75 ++++++++++++++++--- 1 file changed, 64 insertions(+), 11 deletions(-) diff --git a/nuxt/content/blog/2026/11/postgresql-upgrade.md b/nuxt/content/blog/2026/11/postgresql-upgrade.md index e97b2075e8..cc35eb6c22 100644 --- a/nuxt/content/blog/2026/11/postgresql-upgrade.md +++ b/nuxt/content/blog/2026/11/postgresql-upgrade.md @@ -109,7 +109,7 @@ The Kubernetes upgrade is handled by the helm chart. Using v2.x.x of the helm ch The usual Kubernetes [upgrade instructions](https://flowfuse.com/docs/install/kubernetes/#upgrade) should be followed. -## Rollback +## Restore from Backup Should there be a problem the following instauctions can be used to revert to the previous FlowFuse version and PostgreSQL v14. @@ -119,15 +119,11 @@ Should there be a problem the following instauctions can be used to revert to th ```bash docker compose -p flowfuse down --rmi all ``` -2. Replace the new `docker-compose.yml` with the backup - ```bash - cp docker-compose-backup.yml docker-compose.yml - ``` -3. Delete PostgreSQL v16 database volume +2. Delete PostgreSQL v16 database volume ```bash docker volume rm flowfuse_db ``` -4. Bring up the containers but do not start them +3. Bring up the containers but do not start them - automatic TLS: ```bash docker compose --profile autossl -p flowfuse up -d --no-start @@ -136,19 +132,76 @@ Should there be a problem the following instauctions can be used to revert to th ```bash docker compose -p flowfuse up -d --no-start ``` -5. Start the PostgreSQL container +4. Manually start the PostgreSQL container ```bash docker start flowfuse-postgres-1 ``` -6. Restore the backup +5. Restore the backup ```bash bzcat flowfuse-db-backup-sql.bz2 | docker exec -it flowfuse-postgres-1 pg_restore -c flowforge ``` -7. Restart other containers +6. Restart other containers ```bash docker compose -p flowfuse start ``` ### Kubernetes -TODO \ No newline at end of file +If the PostgreSQL + +1. Scale the FlowFuse Deployment to 0 instance + ```bash + kubectl -n flowfuse --replicas=0 deployment flowforge + ``` +2. Scale the FlowFuse FileServer to 0 instance + ```bash + kubectl -n flowfuse --replicas=0 deployment flowforge-file + ``` +3. Scale the Postgres server to 0 instance + ```bash + kubectl -n flwofuse --replicas=0 statefulsets flowfuse-postgresql + ``` +4. Start a Ubuntu pod with the Postgres Volume mounted + ```bash + kubectl -n flowfuse apply -f - < Date: Fri, 20 Nov 2026 11:15:15 +0000 Subject: [PATCH 5/8] move to december --- nuxt/content/blog/2026/{11 => 12}/postgresql-upgrade.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename nuxt/content/blog/2026/{11 => 12}/postgresql-upgrade.md (98%) diff --git a/nuxt/content/blog/2026/11/postgresql-upgrade.md b/nuxt/content/blog/2026/12/postgresql-upgrade.md similarity index 98% rename from nuxt/content/blog/2026/11/postgresql-upgrade.md rename to nuxt/content/blog/2026/12/postgresql-upgrade.md index cc35eb6c22..6f85a9eb36 100644 --- a/nuxt/content/blog/2026/11/postgresql-upgrade.md +++ b/nuxt/content/blog/2026/12/postgresql-upgrade.md @@ -2,8 +2,9 @@ title: 'Migrating from PostgreSQL v14 to v16' authors: - ben-hardill -date: '2026-12-20' +date: '2026-12-18' description: Learn how to upgrade the PostgreSQL Database used with FlowFuse Docker and Kubernetes. +subtitle: Keeping PostgreSQL up to date. tags: - flowfuse - kubernetes @@ -161,7 +162,7 @@ If the PostgreSQL ```bash kubectl -n flwofuse --replicas=0 statefulsets flowfuse-postgresql ``` -4. Start a Ubuntu pod with the Postgres Volume mounted +4. Run an Ubuntu pod as a Job to delete the corupt data ```bash kubectl -n flowfuse apply -f - < Date: Fri, 20 Nov 2026 18:41:04 +0530 Subject: [PATCH 6/8] Add frontmatter and upgrade warning to PostgreSQL upgrade post --- .../blog/2026/12/postgresql-upgrade.md | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/nuxt/content/blog/2026/12/postgresql-upgrade.md b/nuxt/content/blog/2026/12/postgresql-upgrade.md index 6f85a9eb36..81f22643c1 100644 --- a/nuxt/content/blog/2026/12/postgresql-upgrade.md +++ b/nuxt/content/blog/2026/12/postgresql-upgrade.md @@ -1,16 +1,37 @@ --- title: 'Migrating from PostgreSQL v14 to v16' +metaTitle: 'Upgrade FlowFuse PostgreSQL 14 to 16 on Docker & Kubernetes' +subtitle: Back up, upgrade and roll back the database behind self-hosted FlowFuse authors: - ben-hardill date: '2026-12-18' -description: Learn how to upgrade the PostgreSQL Database used with FlowFuse Docker and Kubernetes. -subtitle: Keeping PostgreSQL up to date. +description: Upgrade the PostgreSQL database behind self-hosted FlowFuse from v14 to v16 on Docker Compose or Kubernetes, with backup and rollback steps. tags: + - posts - flowfuse + - how-to - kubernetes - docker - postgresql - postgres +tldr: + - PostgreSQL v14 reached end of life in November 2026, so FlowFuse v3.4.0 moves self-hosted Docker Compose and Kubernetes installs to PostgreSQL v16. + - Docker Compose installs upgrade the database in place with a one-off container. Kubernetes installs upgrade it automatically through v2.x of the Helm chart. + - If something goes wrong, you can restore your database from the backup you take before starting, on Docker Compose or Kubernetes. +cta: + type: contact + title: Need a hand with your upgrade? + description: Talk to our team about upgrading your self-hosted FlowFuse installation. +meta: + faq: + - question: "Why is FlowFuse moving from PostgreSQL 14 to 16?" + answer: "PostgreSQL v14 reached the end of its supported life in November 2026. To keep the database supported, FlowFuse v3.4.0 ships PostgreSQL v16 for Docker Compose and Kubernetes installs." + - question: "Do these steps apply if I use an external PostgreSQL database?" + answer: "No. The steps cover the PostgreSQL database bundled with FlowFuse's Docker Compose files and Helm chart. If your install uses a database you manage yourself, the commands need to be adapted to your environment." + - question: "What if I'm running FlowFuse v2.10.0 or older?" + answer: "Upgrade to v3.3.0 first using the [Docker Compose upgrade instructions](https://github.com/FlowFuse/docker-compose/blob/main/UPGRADE.md), then follow this guide to move to PostgreSQL v16." + - question: "Can I roll back if the upgrade goes wrong?" + answer: "Yes. Restore the database from the backup you take before upgrading. The [Restore from Backup](#restore-from-backup) section has the steps for Docker Compose and Kubernetes." --- PostgreSQL v14 passed it's End Of Supported Life at the start of November 2026, to ensure on going support we are migrating our Docker Compose and Kubernetes installs to PostgreSQL v16. @@ -21,6 +42,15 @@ If you are starting with version v2.10.0 or older please follow [these instructo +::warning +**Action required if you self-host FlowFuse on Docker Compose or Kubernetes.** FlowFuse v3.4.0 moves the bundled database from PostgreSQL v14 to v16. Before you upgrade: + +- Back up your database, and on Docker Compose your `docker-compose.yml` too. +- On Docker Compose, run the one-off database upgrade (step 2 under [Upgrade](#upgrade)) before you start the new stack. +- On Kubernetes, upgrade with v2.x of the Helm chart, which upgrades the database when it starts. +- On FlowFuse v2.10.0 or older, move to v3.3.0 first. +:: + ## Assumptions Through out this document the following assumptions will be made From c6d358b0c2715720b4e5fb97744870a4d2b6811b Mon Sep 17 00:00:00 2001 From: sumitshinde-84 Date: Fri, 20 Nov 2026 18:55:49 +0530 Subject: [PATCH 7/8] Lead the subtitle with end of life and tighten the external database FAQ --- nuxt/content/blog/2026/12/postgresql-upgrade.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nuxt/content/blog/2026/12/postgresql-upgrade.md b/nuxt/content/blog/2026/12/postgresql-upgrade.md index 81f22643c1..6900a8eb52 100644 --- a/nuxt/content/blog/2026/12/postgresql-upgrade.md +++ b/nuxt/content/blog/2026/12/postgresql-upgrade.md @@ -1,7 +1,7 @@ --- title: 'Migrating from PostgreSQL v14 to v16' metaTitle: 'Upgrade FlowFuse PostgreSQL 14 to 16 on Docker & Kubernetes' -subtitle: Back up, upgrade and roll back the database behind self-hosted FlowFuse +subtitle: "PostgreSQL v14 is end of life. Here's how to upgrade." authors: - ben-hardill date: '2026-12-18' @@ -27,7 +27,7 @@ meta: - question: "Why is FlowFuse moving from PostgreSQL 14 to 16?" answer: "PostgreSQL v14 reached the end of its supported life in November 2026. To keep the database supported, FlowFuse v3.4.0 ships PostgreSQL v16 for Docker Compose and Kubernetes installs." - question: "Do these steps apply if I use an external PostgreSQL database?" - answer: "No. The steps cover the PostgreSQL database bundled with FlowFuse's Docker Compose files and Helm chart. If your install uses a database you manage yourself, the commands need to be adapted to your environment." + answer: "The steps assume the PostgreSQL database that comes with FlowFuse's Docker Compose and Helm installs. If your setup is different, for example you run your own database, you'll need to update the commands to match your environment." - question: "What if I'm running FlowFuse v2.10.0 or older?" answer: "Upgrade to v3.3.0 first using the [Docker Compose upgrade instructions](https://github.com/FlowFuse/docker-compose/blob/main/UPGRADE.md), then follow this guide to move to PostgreSQL v16." - question: "Can I roll back if the upgrade goes wrong?" From 9c9888624c55af4b1950cf903b08b5fcd39e4273 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 23 Nov 2026 11:09:54 +0000 Subject: [PATCH 8/8] Apply suggestion from @hardillb --- nuxt/content/blog/2026/12/postgresql-upgrade.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuxt/content/blog/2026/12/postgresql-upgrade.md b/nuxt/content/blog/2026/12/postgresql-upgrade.md index 6900a8eb52..96fb50a9a9 100644 --- a/nuxt/content/blog/2026/12/postgresql-upgrade.md +++ b/nuxt/content/blog/2026/12/postgresql-upgrade.md @@ -48,7 +48,7 @@ If you are starting with version v2.10.0 or older please follow [these instructo - Back up your database, and on Docker Compose your `docker-compose.yml` too. - On Docker Compose, run the one-off database upgrade (step 2 under [Upgrade](#upgrade)) before you start the new stack. - On Kubernetes, upgrade with v2.x of the Helm chart, which upgrades the database when it starts. -- On FlowFuse v2.10.0 or older, move to v3.3.0 first. +- On FlowFuse v2.10.0 or older on installed with Docker Compose, move to v3.3.0 first. :: ## Assumptions