Skip to main content

CRE-2025-0130

Supabase Self-Hosted: Postgres Container Fails to Start Due to Port ConflictHigh
Impact: 9/10
Mitigation: 3/10

CRE-2025-0130View on GitHub

Description

Detects when Supabase self-hosted Postgres container fails to start because another service is already using port 5432.\nThis is a common issue during initial setup or when multiple Postgres instances are running on the same host.\nThe failure prevents the entire Supabase stack from starting properly.\n

Mitigation

IMMEDIATE:\n - Stop conflicting Postgres instance: `sudo systemctl stop postgresql` or `docker stop ‹postgres-container›`\n - Change Supabase Postgres port in .env: `POSTGRES_PORT=5433`\n - Use Docker port mapping: `-p 5433:5432` instead of `-p 5432:5432`\nPREVENTION:\n - Check for running services before starting Supabase: `sudo netstat -tlnp | grep :5432`\n - Use non-standard ports for self-hosted deployments\n - Implement proper cleanup procedures in deployment scripts\n

References