© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
41 replies
Mr. Orange

CORS error when trying to access supabase from a docker container

Hello,

I would like to dockerize a Svelte app that uses Supabase Auth. I am running Supabase CLI locally and the API url is available at
http://localhost:54321
http://localhost:54321


To access this url from within the Docker container I use the
http://host.docker.internal:54321
http://host.docker.internal:54321
url (https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host)

This approach however produces a CORS error when trying to use Auth - see attached screenshot.

I could not find a
cors
cors
parameter in the
config.toml
config.toml
settings file of Supabase CLI. How can I add/update CORS to include the
host.docker.internal
host.docker.internal
origin?

In general, what is the recommended practice for using Supabase locally together with a dockerized web app?

Many thanks for the help!
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
CORS error when accessing local Supabase instance from the browser
SupabaseSSupabase / help-and-questions
4w ago
Delete local docker container of supabase
SupabaseSSupabase / help-and-questions
4y ago
Error when trying to login to my supabase account
SupabaseSSupabase / help-and-questions
13mo ago