password authentication failed for user \"supabase_auth_admin\" (SQLSTATE 28P01)) #47949
|
Docker failed with error: My dockers: I started Docker using the official configuration file. Thanx |
Replies: 1 comment 2 replies
|
This is the classic self-hosted gotcha: Two ways out: A. Fresh install / no data to keep (fastest): docker compose down -v
rm -rf volumes/db/data
docker compose up -dThe init scripts re-run and every internal role gets the current B. Keep existing data — realign the role passwords manually: docker exec -it supabase-db psql -U supabase_admin -d postgresALTER USER supabase_auth_admin WITH PASSWORD 'your-current-POSTGRES_PASSWORD';
ALTER USER supabase_storage_admin WITH PASSWORD 'your-current-POSTGRES_PASSWORD';
ALTER USER authenticator WITH PASSWORD 'your-current-POSTGRES_PASSWORD';
ALTER USER supabase_functions_admin WITH PASSWORD 'your-current-POSTGRES_PASSWORD';
ALTER USER pgbouncer WITH PASSWORD 'your-current-POSTGRES_PASSWORD';(Then restart the stack. One more thing worth checking: if your password contains characters that are special in a connection URI ( Docs: https://supabase.com/docs/guides/self-hosting/docker (see the notes about setting secrets before the first start). |
This is the classic self-hosted gotcha:
POSTGRES_PASSWORDis only applied to the internal database roles when the database volume is first initialized. If you changed the password in.envafter the firstdocker compose up(or reused an oldvolumes/db/datadirectory from a previous attempt), the running database still has the old passwords for roles likesupabase_auth_admin— while gotrue reads the new value from.envand fails with exactly this28P01.Two ways out:
A. Fresh install / no data to keep (fastest):
The init scripts re-run and every internal role gets the current
POSTGRES_PASSWORD.B. Keep existing data — realig…