[Bug]: Supabase PostgreSQL Backup Failure: Peer authentication failed for user
Error Message and Logs
Running a backup for a single database fails. Running it for all databases says success, but actually fails (notice its only 20B):
Steps to Reproduce
- click into postgres project -> environtment (production) -> resource (postgres)
- click on Backups tab
- click on a scheduled backup
- Click "backup now"
- Failed backup will follow after a couple seconds.
Example Repository URL
No response
Coolify Version
v4.0.0-beta.397
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 24.04
Additional Information
Trying a pg_dump command in the container terminal results in same error.
Manually, if I use the -h flag, it will give me a dump and not error. Example of it failing, and working just by adding -h localhost (from postgres container terminal)
In my testing, adding -h localhost to this line: https://github.com/coollabsio/coolify/blob/f28eefe603fab5becabd8821746304fa622b5802/app/Jobs/DatabaseBackupJob.php#L396 and this: https://github.com/coollabsio/coolify/blob/f28eefe603fab5becabd8821746304fa622b5802/app/Jobs/DatabaseBackupJob.php#L398
Seems to solve my backup issues.