cli: supabase docker image 15.8.1.094 does not start on local development with CLI

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

A clear and concise description of what the bug is.

Cannot start local CLI (version 2.23.4) with version 15.8.1.094 of supabase image.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. have a running project at version 15.8.1.085 (not necessary, but proves it is working)
  2. upgrade the linked remote project and re-link to get version 15.8.1.094 for the CLI in .temp/postgres-version
  3. npx supabase stop; npx supabase start
  4. See error below

Expected behavior

A clear and concise description of what you expected to happen.

The DB should restart just fine.

I tried stopping everything then deleting all docker images and volumes. Same error occurs. Only option is to revert to the default version installed by the CLI by removing .temp/postgres-version file.

Screenshots

If applicable, add screenshots to help explain your problem.

This is the error it ends with. It is repeated several times with timestamps about 7 seconds apart.

PostgreSQL Database directory appears to contain a database; Skipping initialization

pg_ctl: another server might be running; trying to start server anyway
waiting for server to start.... 2025-05-29 15:32:29.884 UTC [35] LOG:  pgaudit extension initialized
 2025-05-29 15:32:29.890 UTC [35] LOG:  pgsodium primary server secret key loaded
 2025-05-29 15:32:29.894 UTC [35] LOG:  vault primary server secret key loaded
 2025-05-29 15:32:29.918 UTC [35] LOG:  starting PostgreSQL 15.8 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
 2025-05-29 15:32:29.920 UTC [35] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
 2025-05-29 15:32:29.923 UTC [44] LOG:  database system was interrupted; last known up at 2025-05-29 15:31:38 UTC
 2025-05-29 15:32:29.988 UTC [44] LOG:  database system was not properly shut down; automatic recovery in progress
 2025-05-29 15:32:29.990 UTC [44] LOG:  redo starts at 0/1AFFC98
 2025-05-29 15:32:29.991 UTC [44] LOG:  invalid record length at 0/1B01148: wanted 24, got 0
 2025-05-29 15:32:29.991 UTC [44] LOG:  redo done at 0/1B010F0 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
 2025-05-29 15:32:29.994 UTC [42] LOG:  checkpoint starting: end-of-recovery immediate wait
 2025-05-29 15:32:29.999 UTC [42] LOG:  checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.002 s, total=0.006 s; sync files=3, longest=0.002 s, average=0.001 s; distance=5 kB, estimate=5 kB
 2025-05-29 15:32:30.002 UTC [35] LOG:  database system is ready to accept connections
 2025-05-29 15:32:30.005 UTC [47] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 2025-05-29 15:32:30.012 UTC [49] LOG:  pg_cron scheduler started
 done
server started
ALTER ROLE
psql: error: /docker-entrypoint-initdb.d/init-scripts/99-roles.sql: No such file or directory
Stopping containers...
supabase_db_intelligent-inventory container is not ready: unhealthy

System information

  • OS: [e.g. macOS, Windows] macOS 15.4.1 on M1
  • Browser (if applies) [e.g. chrome, safari] n/a
  • Version of supabase-js: [e.g. 6.0.2] irrelevant
  • Version of Node.js: [e.g. 10.10.0] 22.16.0
  • CLI version: 2.23.4

Additional context

Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 24
  • Comments: 40 (12 by maintainers)

Most upvoted comments

We are working on a fix. The current workaround is to remove the temp version file created by cli after supabase link.

rm supabase/.temp/postgres-version

FWIW, 15.8.1.093 version works, so that’s another option to edit the version file.

To close this one out, we recommend upgrading your hosted project to the latest version for both PG15 and PG17.

https://supabase.com/dashboard/project/_/settings/infrastructure

Image

Next, you want to link the project locally to update the supabase/.temp/postgres-version file before restarting the local stack.

supabase link
supabase stop --no-backup
supabase start

I ran into the same thing. supabase link (and a few other CLI commands) always rewrites supabase/.temp/postgres-version with whatever build your hosted project is on. So if the cloud instance is still sitting on 15.8.1.094, the file keeps snapping back to that.

Two options:

  1. Upgrade the remote Postgres image – Dashboard → Settings → Infrastructure → Update Postgres. Bump the project to 15.8.1.095 (or straight to the latest 17.4.1.041 which worked for me). After that, supabase link will lock in the newer version and the value will stay put.
  2. Keep overriding locally – you can hand-edit or delete postgres-version, but the next supabase link will overwrite it again, so it’s a temporary hack.

@piavgh your question is unrelated to the issue here. But to answer it yes you can use both local and remote database. The recommended workflow is that you do all your changes in local using migrations and then push to the remote when you are ready to go to production. https://supabase.com/docs/guides/deployment/managing-environments

This bug is related to a bad image that was released (bad as in it doesn’t boot in local), but that has now been fixed except that the CLI hasn’t gotten this update as of yet.

Note: I am not a Supabase staff, just a contributor to a few of their open source repos.

same here with public.ecr.aws/supabase/postgres 17.4.1.037

Had the same issue, upgrading the cloud db - by just pausing and restarting the project - resolved the issue

This has now been fixed in the latest versions available 15.8.1.095 and 17.4.1.038.

The hosted platform has been updated with 17.4.1.038, if you are still on the older version you can upgrade from Settings > Infrastructure.

The CLI hasn’t been updated as yet to use 15.8.1.095 as default, but you can manually test it by creating supabase/.temp/postgres-version and just adding the version number in that file then run supabase start.

@raulgol by editing the file supabase/.temp/postgres-version

@MajorWookie that’s correct about the latest version you are seeing on your project. v17 is being rolled out on a per region basis and will take a while before it becomes available to all projects. Most new projects however seems to be getting v17, but existing ones will take a while.

@d-h-jones yes you should be using 17.4.1.038 as your newly created Supabase hosted project is using 17 as the warning has said.

My suggestion for 15.8.1.095 is for those on 15 already, you cannot be mixing major versions. So those on 17 would follow my suggestion for 17.4.1.038.

Also as a developer just try things and see if they work especially when you get really intuitive warning messages, this is how I figure out most of this.

I have this issue exactly, but in my Dashboard I am unable to locate the option of upgrading

Image

I assume this will propagate, but if there is something else I have to do gladly let me know.

I am getting the same psql: error: /docker-entrypoint-initdb.d/init-scripts/99-roles.sql: No such file or directory error when I try the version of the image mentioned above by @vickkhera.