Cannot find the “allow-postgres14-upgrade” file on fresh install

1. What is the issue? Please be detailed.

I want to run the self-hosted version on my own server.

I Pulled the latest Version v2025.4.2 of ODK-Central and made docker compose up and got an issue with the postgres-upgrade.dockerfile

I suspect, that the pulled postgres version in the “postgres-upgrade.dockerfile” is not avaliable anymore. When i search for the provided github link in the dockerfile it gives me an 404: https://github.com/tianon/docker-postgres-upgrade/blob/master/9.6-to-14/Dockerfile

It cannot find the “allow-postgres14-upgrade” file.

2. What steps can we take to reproduce this issue?

Here is the while cli history i tried:

support@odk:~$ git clone https:// github. com/getodk/central.git/u
Cloning into 'central'...
remote: Enumerating objects: 3180, done.
remote: Counting objects: 100% (992/992), done.
remote: Compressing objects: 100% (368/368), done.
remote: Total 3180 (delta 865), reused 628 (delta 624), pack-reused 2188 (from 3)
Receiving objects: 100% (3180/3180), 779.19 KiB | 3.80 MiB/s, done.
Resolving deltas: 100% (1958/1958), done.
support@odk:~$ cd central/
support@odk:~/central$ git checkout v2025.4.2
Note: switching to 'v2025.4.2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

**HEAD is now at 993b14c Merge pull request** #1623 **from getodk/next**

support@odk:~/central$ touch .env
support@odk:~/central$ nano .env
support@odk:~/central$ ls
client docker-compose.yml enketo.dockerfile LICENSE.md nginx.dockerfile postgres-upgrade.dockerfile secrets.dockerfile server test
docker-compose.dev.yml docs files Makefile postgres14.dockerfile README.md SECURITY.md service.dockerfile
support@odk:~/central$ nano postgres-upgrade.dockerfile
support@odk:~/central$ nano postgres-upgrade.dockerfile
support@odk:~/central$ sudo docker compose pull
WARN0000 The "SYSADMIN_EMAIL" variable is not set. Defaulting to a blank string.
WARN0000 The "SYSADMIN_EMAIL" variable is not set. Defaulting to a blank string.
WARN0000 The "SYSADMIN_EMAIL" variable is not set. Defaulting to a blank string.
+ pull 9/9
✔ secrets Skipped No image to be pulled 0.0s
✔ postgres14 Skipped No image to be pulled 0.0s
✔ service Skipped No image to be pulled 0.0s
✔ nginx Skipped No image to be pulled 0.0s
✔ postgres Skipped No image to be pulled 0.0s
✔ Image redis:7.4.7 Pulled 1.5s
✔ Image registry.gitlab. com/egos-tech/smtp:1.1.5 Pulled 0.9s
✔ enketo Skipped No image to be pulled 0.0s
✔ Image ghcr. io/getodk/pyxform-http:v4.2.0 Pulled 1.5s
support@odk:~/central$ nano postgres-upgrade.dockerfile
support@odk:~/central$ sudo docker compose up -f docker-compose.yml -d
unknown shorthand flag: 'f' in -f
support@odk:~/central$ sudo docker compose -f docker-compose.yml up -d
WARN0000 The "SYSADMIN_EMAIL" variable is not set. Defaulting to a blank string.
WARN0000 The "SYSADMIN_EMAIL" variable is not set. Defaulting to a blank string.
WARN0000 The "SYSADMIN_EMAIL" variable is not set. Defaulting to a blank string.
+ Building 3.0s (30/65)
=> internal load local bake definitions 0.0s
=> => reading from stdin 2.61kB 0.0s
=> enketo internal load build definition from enketo.dockerfile 0.0s
=> => transferring dockerfile: 932B 0.0s
=> postgres14 internal load build definition from postgres14.dockerfile 0.0s
=> => transferring dockerfile: 513B 0.0s
=> postgres internal load build definition from postgres-upgrade.dockerfile 0.0s
=> => transferring dockerfile: 714B 0.0s
=> service internal load build definition from service.dockerfile 0.0s
=> => transferring dockerfile: 2.06kB 0.0s
=> secrets internal load build definition from secrets.dockerfile 0.0s
=> => transferring dockerfile: 110B 0.0s
=> nginx internal load build definition from nginx.dockerfile 0.0s
=> => transferring dockerfile: 1.16kB 0.0s
=> enketo internal load metadata for ghcr. io/enketo/enketo:7.5.1 0.6s
=> secrets internal load metadata for docker. io/library/node:22.22.0-slim 0.8s
=> postgres internal load metadata for docker. io/tianon/postgres-upgrade:14-to-15 2.8s
=> nginx internal load metadata for docker. io/jonasal/nginx-certbot:6.0.1 2.0s
=> postgres14 internal load metadata for docker. io/library/postgres:14.20 0.9s
=> postgres internal load .dockerignore 0.0s
=> => transferring context: 67B 0.0s
=> enketo 1/6 FROM ghcr. io/enketo/enketo:7.5.1@sha256:b43c15667164a3fcb3183df54e09d4e9b77b8b535c7f1c397e22388def19ef05 2.3s
=> => resolve ghcr. io/enketo/enketo:7.5.1@sha256:b43c15667164a3fcb3183df54e09d4e9b77b8b535c7f1c397e22388def19ef05 0.0s
=> => sha256:3ae06e461d76a048eaa603ec507468f703b1c155207990e9c5ba0b689ca13bcb 16.78MB / 627.83MB 2.3s
=> => sha256:3df61d1468c4f6eebb0f1c67ed6e6cf879ba8b405af5bba828e3077a142adf55 4.19MB / 144.60MB 2.2s
=> => sha256:81f234642412d76e3f0d913c36b1500350ab4a9af4cd4c4c7cb8fb6430aa713e 1.05MB / 1.71MB 2.2s
=> => sha256:33f2159cab19c4c3d99c3e7c994fdedf6f400f654f11d5f2b0eadfd1de62781c 2.10MB / 47.97MB 2.2s
=> enketo internal load build context 0.0s
=> => transferring context: 3.50kB 0.0s
=> secrets internal load build context 0.0s
=> => transferring context: 635B 0.0s
=> service 1/2 FROM docker. io/library/node:22.22.0-slim@sha256:5373f1906319b3a1f291da5d102f4ce5c77ccbe29eb637f072b6c7b70443fc36 2.0s
=> => resolve docker. io/library/node:22.22.0-slim@sha256:5373f1906319b3a1f291da5d102f4ce5c77ccbe29eb637f072b6c7b70443fc36 0.0s
=> => sha256:cd9ab0aa7de645eeb66edcb219492429b32ba52d15b200e2a1a825abcb272113 451B / 451B 0.4s
=> => sha256:723ba10a6202898fef83665f67851cc21b882feb71575601c31d5a731ab99179 1.71MB / 1.71MB 1.4s
=> => sha256:b06ed64e7a008278cf34abf2026687487ede329b69e00128254149c521a28114 3.31kB / 3.31kB 0.7s
=> => sha256:e31a949cc78c135e4c7782f1eaa160c32b8909ed92c92e1d93af305e90ab8836 7.34MB / 49.47MB 2.0s
=> => extracting sha256:b06ed64e7a008278cf34abf2026687487ede329b69e00128254149c521a28114 0.0s
=> nginx internal load build context 0.0s
=> => transferring context: 1.20MB 0.0s
=> postgres14 1/2 FROM docker. o/library/postgres:14.20@sha256:44b2944d4beb460aa7582fc2ae9f37bfee4a75788b76f2bf25312094029e4680 1.9s
=> => resolve docker. io/library/postgres:14.20@sha256:44b2944d4beb460aa7582fc2ae9f37bfee4a75788b76f2bf25312094029e4680 0.0s
=> => sha256:089c502730cab2327966bc808bf2b7a365e717cfceda6f43be3adb5f7e53da91 9.63kB / 9.63kB 0.5s
=> => sha256:3150133347a99fd894539151e3cd6f4165065ae7956a0bf6e5a65f9e4df1a405 5.24MB / 109.92MB 1.2s
=> => sha256:b6544802953379315b3bef4807c4b376dfa7038bbd8ca612a242256f9ba5176b 116B / 116B 0.4s
=> => sha256:5cbace69940d62ca97b32fb471301b455318af69c18370e12d69837278013cde 0B / 1.31MB 0.6s
=> => sha256:9ed2f6c0dc03ff84573f45560cdbb16215280354f9f8cce30a4666392d5c5b29 0B / 8.20MB 0.5s
=> postgres14 internal load build context 0.0s
=> => transferring context: 635B 0.0s
=> nginx stage-1 1/10 FROM docker. io/jonasal/nginx-certbot:6.0.1@sha256:fb56e7b630fc0083675f33ce3f23ed15618a54694c3f4ecafacb19ab60413e6f 0.8s
=> => resolve docker. io/jonasal/nginx-certbot:6.0.1@sha256:fb56e7b630fc0083675f33ce3f23ed15618a54694c3f4ecafacb19ab60413e6f 0.0s
=> postgres internal load build context 0.0s
=> => transferring context: 3.63kB 0.0s
=> CANCELED postgres 1/3 FROM docker. io/tianon/postgres-upgrade:14-to-15@sha256:645f82e81587564b6a22bdf07635bf5176a6b7c008e6e0c754f1ed0cc52cd815 0.0s
=> => resolve docker. io/tianon/postgres-upgrade:14-to-15@sha256:645f82e81587564b6a22bdf07635bf5176a6b7c008e6e0c754f1ed0cc52cd815 0.0s
=> ERROR postgres 2/3 COPY ./files/allow-postgres14-upgrade . 0.0s
=> CANCELED secrets 2/2 COPY files/enketo/generate-secrets.sh ./ 0.0s
=> CANCELED nginx intermediate 2/9 RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/\* 0.0s
=> CANCELED service pgdg 2/3 RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl gpg && rm -rf /va 0.0s
=> CANCELED nginx stage-1 2/10 RUN apt-get update && apt-get install -y netcat-openbsd 0.0s
=> CANCELED postgres14 2/2 COPY files/postgres14/start-postgres.sh /usr/local/bin/ 0.0s
=> CANCELED service stage-2 2/13 WORKDIR /usr/odk 0.0s
=> CANCELED enketo 2/6 WORKDIR /srv/src/enketo/packages/enketo-express 0.0s

postgres 2/3 COPY ./files/allow-postgres14-upgrade .:

---

+ up 0/6
⠙ Image central-postgres Building 3.0s
⠙ Image central-service Building 3.0s
⠙ Image central-enketo Building 3.0s
⠙ Image central-postgres14 Building 3.0s
⠙ Image central-secrets Building 3.0s
⠙ Image central-nginx Building 3.0s
postgres-upgrade.dockerfile:7

---

5 | # It's expected it will be provided by the sysadmin performing the upgrade.

6 | # Docker build will fail if this file is missing.

7 | >>> COPY ./files/allow-postgres14-upgrade .

8 |

9 | COPY files/postgres/upgrade-postgres.sh /usr/local/bin/

---

target postgres: failed to solve: failed to compute cache key: failed to calculate checksum of ref v9bnnqtoaxmkophatub8txw6k::t1k8bok3fopn47u6bn22n0ty7: "/files/allow-postgres14-upgrade": not found

3. What have you tried to fix the issue?

At the tianon postgres repo the oldest avaliable version is 14-to-15. and i tried to rewrite the postgres-upgrade.dockerfile to that version and it still failed.

Since it cannot find the “allow-postgres14-upgrade” file.

Just for your information: Since i can only post 2 hyperlinks, i put an additional “space” in each link from the cli, so it isn’t counted as a hyperlink.

In the provided cli text, i changed the line FROM tianon/postgres-upgrade:9.6-to-14 to FROM tianon/postgres-upgrade:14-to-15 in the postgres-upgrade.dockerfile.

When i don’t change the postgres-upgrade.dockerfile and leave the FROM tianon/postgres-upgrade:9.6-to-14 as it is, i get the same error.

I suspect, that with the newer versions of postgres-upgrade there is no “allow-postgres14-upgrade file anymore.

Please check, that a newer “postgres-upgrade” version is used. here is the dockerhub link from tianon/postgres-upgrade: https://hub.docker.com/r/tianon/postgres-upgrade/tags

4. Upload any forms or screenshots you can share publicly below.

Welcome, @LukeStarlord349, and I'm sorry to see you've hit this issue. Could you please double check that you created the allow-postgres14-upgrade file as described in step 8 of https://docs.getodk.org/central-install-digital-ocean/#getting-and-setting-up-central?

That file is intended to signify that it's ok to upgrade postgres. It makes the most sense in the case of an existing install upgrading to postgres14 but is also needed for new installations.

The upgrade image is pulled from Dockerhub where the 9.6-to-14 image still exists: https://hub.docker.com/layers/tianon/postgres-upgrade/9.6-to-14/

When you have a chance, we'd love to know more about what you're planning to use ODK for in the introductions thread.