© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
10 replies
vae

Supabase self hosted won't connect to local postgres

I've been attempting to put supabase on my server self hosted, everything works fine (including when the db and supabase aren't decoupled), but when I decouple them and use the locally hosted postgresql, it won't connect.

I can connect through dbeaver fine, I tried with installing postgresql myself, and then deleted postgresql and the supabase folder.
I reinstalled supabase from scratch, as well as installing https://github.com/supabase/postgres instead for the postgresql.

However still no luck...

10/Oct/2022:16:03:13 +0000: {"details":"connection to server at \"0.0.0.0\", port 5432 failed: Connection refused\n\tIs the server running on that host and accepting TCP/IP connections?\n","code":"","message":"Database connection error. Retrying the connection."}
10/Oct/2022:16:03:13 +0000: {"details":"connection to server at \"0.0.0.0\", port 5432 failed: Connection refused\n\tIs the server running on that host and accepting TCP/IP connections?\n","code":"","message":"Database connection error. Retrying the connection."}


time="2022-10-10T16:03:15Z" level=fatal msg="running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to `host=0.0.0.0 user=postgres database=postgres`: dial error (dial tcp 0.0.0.0:5432: connect: connection refused)"
time="2022-10-10T16:03:15Z" level=fatal msg="running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to `host=0.0.0.0 user=postgres database=postgres`: dial error (dial tcp 0.0.0.0:5432: connect: connection refused)"


I've tried different host names and ports. Eg.
localhost
localhost
,
0.0.0.0
0.0.0.0
,
127.0.0.1
127.0.0.1
, and
54322
54322
, but to no avail.
On the previous install of postgres I created a new superuser with password etc. to see if it was a problem with that, but it wasn't, as well as creating a new database (editing env etc.)

Anyone have any ideas?
GitHub
GitHub - supabase/postgres: Unmodified Postgres with some useful pl...
Unmodified Postgres with some useful plugins. Contribute to supabase/postgres development by creating an account on GitHub.
GitHub - supabase/postgres: Unmodified Postgres with some useful pl...
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

self-hosted postgres 17?
SupabaseSSupabase / help-and-questions
3mo ago
self hosted upgrade -> supabase_admin vs postgres role.
SupabaseSSupabase / help-and-questions
4mo ago
Self-Hosted Supabase (Coolify)
SupabaseSSupabase / help-and-questions
2mo ago
Updating supabase self-hosted
SupabaseSSupabase / help-and-questions
13mo ago