© 2026 Hedgehog Software, LLC

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

How to correctly set React API URL env variable for Self hosted

Hello,

I'm self hosting Supabase with Docker, using React as Front-End and I got to observe that communicating with the project's API works fine when it's the online Supabase app, however, not working fine when it's the self hosted one.

What I'm trying to do on the client app is basic magic link authentication. However, with self hosted API URL in .env, when submitting form, it will only throw me error alert popup ("Error sending confirmation mail").

I've tried to observe and compare differences between my online API and the local API. The "supabase.co" root API URL (no endpoint) returns plain JSON saying "No API key found in request" (which I send when creating the supabaseClient in React so at least, I can figure out that the root URL with no endpoint is the right one. However, when I do the same thing with the local API, it only returns plain JSON saying "No Route matched with those value" and at first I thought the problem was that the root URL with no endpoint of both remote and local API are differents and so I found out that the local API's endpoint "/rest/v1" returns HTML content saying "Kong Error - No API key found in request". Of course, when I try to set the local React API URL .env variable with the "/rest/v1" part, submitting form doesn't work and only throws me error alert popup ("Content-Type not acceptable: text/plain").

So my question is : what am I doing wrong ? Is there something I missed ? I really don't understand to this point. I've readen a lot of Github issues topics more or less related to self hosted version and generally, it invites me to read the Self hosted documentation which, in my case for this issue, isn't very informative because no further documentation about self hosted env variable React side...

Thanks a lot if you've readen this far.

Edit : I feel like that if there should be informations about React .env variables in documentation it should be there but it isn't : https://supabase.com/docs/guides/with-react .
Capture_decran_2022-08-19_111102.png
Quickstart: React | Supabase
Learn how to use Supabase in your React App.
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

How access env variable in edge function (self hosted) ?
SupabaseSSupabase / help-and-questions
6mo ago
self hosted redirect url?
SupabaseSSupabase / help-and-questions
15mo ago
DATABASE_URL env variable not found
SupabaseSSupabase / help-and-questions
4mo ago
Set up self-hosted supabase for web-access?
SupabaseSSupabase / help-and-questions
4y ago