© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago
chrismasters

Calling local DB API endpoints from within a Docker container

I'm using the local Docker version of Supabase for development and having issues trying to access the endpoints from within another Docker container.

From the command line outside of Docker I can make a request as expected, for example

curl -X POST 'http://localhost:54321/rest/v1/rpc/my_function' \
-d '{ "input_var": "value" }' \
-H "Content-Type: application/json" \
-H "apikey: SUPABASE_KEY" \
-H "Authorization: Bearer SUPABASE_KEY"
curl -X POST 'http://localhost:54321/rest/v1/rpc/my_function' \
-d '{ "input_var": "value" }' \
-H "Content-Type: application/json" \
-H "apikey: SUPABASE_KEY" \
-H "Authorization: Bearer SUPABASE_KEY"


And it returns the expected result
[{"id":2,"stream_id":1,"track_id":1817069...}]
[{"id":2,"stream_id":1,"track_id":1817069...}]


But if I try to make the same request from within my Docker container I get an error
Error code: 523
Error message: Origin is unreachable
Error code: 523
Error message: Origin is unreachable


I've also tried using
http://supabase_kong_my_project:8000/rest/v1/rpc/my_function
http://supabase_kong_my_project:8000/rest/v1/rpc/my_function
instead of
http://localhost:54321/rest/v1/rpc/my_function
http://localhost:54321/rest/v1/rpc/my_function
as the request URL but it gives me the same error.

Any help with this would be much appreciated, thanks!
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Docker Container error when db diff from linked
SupabaseSSupabase / help-and-questions
8mo ago
Auth providers in local Docker container
SupabaseSSupabase / help-and-questions
7mo ago
Delete local docker container of supabase
SupabaseSSupabase / help-and-questions
4y ago
Web3 auth with local Supabase Docker container
SupabaseSSupabase / help-and-questions
8mo ago