-
Notifications
You must be signed in to change notification settings - Fork 321
Description
Describe the bug
After upgrading supabase-cli to v2.65.2 (which uses postgres image supabase/postgres:17.6.1.058), supabase start fails because the PostgreSQL container cannot start. The database container enters a restart loop.
To Reproduce
- Have an existing local supabase project with data (previously working with older CLI version)
- Upgrade supabase-cli to v2.65.2
- Run
supabase start - Database container fails to start and keeps restarting
Expected behavior
Supabase should start normally, preserving existing data.
System information
- OS: macOS (Darwin 25.1.0)
- supabase-cli version: v2.65.2
- postgres image:
supabase/postgres:17.6.1.058 - Docker: Docker Desktop
Container logs
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-12-03 09:01:10.096 GMT [10] LOG: could not open configuration directory "/etc/postgresql-custom/conf.d": No such file or directory
2025-12-03 09:01:10.096 GMT [10] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
Root cause
The new postgres image supabase/postgres:17.6.1.058 has this in /etc/postgresql/postgresql.conf:
include_dir = '/etc/postgresql-custom/conf.d'
However, the existing supabase_config_* volume from previous versions does not contain the conf.d subdirectory. When the volume is mounted to
/etc/postgresql-custom/, it overwrites the image's directory structure, and the conf.d directory is missing.
Workaround
Manually create the missing directory in the config volume:
docker run --rm -v supabase_config_default:/mnt/config alpine mkdir -p /mnt/config/conf.d
Then restart supabase:
supabase stop && supabase startSuggested fix
The CLI or the postgres image should ensure the conf.d directory exists during startup, either by:
- Creating it in an entrypoint script if it doesn't exist
- Including it in the volume initialization
- Using include_dir_if_exists instead of include_dir in postgresql.con