© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
thore

supabase-cli link hostname resolving error

Hi,

I'm trying to setup a local dev supabase environment by following these steps https://github.com/supabase/supabase/discussions/6366#discussioncomment-3911475 but I can't the linking to work.

I tried this command

$ supabase link --project-ref khozjjlacisdfkzjvagh --debug
Error: failed to connect to host=db.khozjjlacisdfkzjvagh.supabase.co user=postgres database=postgres: hostname resolving error (lookup db.khozjjlacisdfkzjvagh.supabase.co on [fd00::de15:c8ff:fe2d:8910]:53: dial udp [fd00::de15:c8ff:fe2d:8910]:53: i/o timeout)
$ supabase link --project-ref khozjjlacisdfkzjvagh --debug
Error: failed to connect to host=db.khozjjlacisdfkzjvagh.supabase.co user=postgres database=postgres: hostname resolving error (lookup db.khozjjlacisdfkzjvagh.supabase.co on [fd00::de15:c8ff:fe2d:8910]:53: dial udp [fd00::de15:c8ff:fe2d:8910]:53: i/o timeout)


Debug output: See attachment.

and I am getting the mentioned error message. I then copied the connection string from the dashboard and tried
pqsql
pqsql
and it works:

$ psql -h db.khozjjlacisdfkzjvagh.supabase.co -p 5432 -d postgres -U postgres
Password for user postgres: 
psql (14.5 (Homebrew), server 14.1)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

postgres=>  \dt+
                                        List of relations
 Schema | Name | Type  |     Owner      | Persistence | Access method |    Size    | Description 
--------+------+-------+----------------+-------------+---------------+------------+-------------
 public | test | table | supabase_admin | permanent   | heap          | 8192 bytes | test
(1 row)

postgres=> 
$ psql -h db.khozjjlacisdfkzjvagh.supabase.co -p 5432 -d postgres -U postgres
Password for user postgres: 
psql (14.5 (Homebrew), server 14.1)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

postgres=>  \dt+
                                        List of relations
 Schema | Name | Type  |     Owner      | Persistence | Access method |    Size    | Description 
--------+------+-------+----------------+-------------+---------------+------------+-------------
 public | test | table | supabase_admin | permanent   | heap          | 8192 bytes | test
(1 row)

postgres=> 


I am using the newest version of the supabase-cli and macOS 12.6.1.

$ brew info supabase
==> supabase/tap/supabase: stable 1.11.7
$ brew info supabase
==> supabase/tap/supabase: stable 1.11.7


Does anybody know how to resolve this?

Best
Thore
debug.txt1.49KB
GitHub
How does local development work? · Discussion #6366 · supabase/supa...
Before writing what could seem to be a rant I must thank you for building this extremely useful tool. It is truly amazing. I have read https://supabase.com/docs/guides/local-development a few times...
How does local development work? · Discussion #6366 · supabase/supa...
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

Supabase CLI error
SupabaseSSupabase / help-and-questions
5mo ago
supabase cli auth issues: supabase link not working
SupabaseSSupabase / help-and-questions
4mo ago
CLI - supabase link - "failed to connect to postgres" error
SupabaseSSupabase / help-and-questions
2y ago
CLI link to project error
SupabaseSSupabase / help-and-questions
4y ago