DIAGNOSIS

"supabaseUrl is required" — what that message is actually telling you

Your app went looking for the address of its database, found nothing, and stopped before it drew a single pixel.

7 min read
ON THIS PAGE
SHORT ANSWER

What does "supabaseUrl is required" mean?

It means your app looked for the web address of its database, found nothing there, and stopped. It never tried to connect. Your data and tables are fine. The address and the key that proves your app is allowed in are handed over when the app is built — and at that moment, they were missing.

Your app keeps its data somewhere else, in a database run by a company called Supabase. To talk to it, your app needs two things: the web address of the database, and a key that proves it's allowed in. Both are baked into the finished app like raisins into bread.

That distinction matters because it tells you where to look. Nothing is broken inside your database. The problem is in the handoff — the moment your app was supposed to be told the address and wasn't.

This is also why it usually arrives looking far worse than it is. Most people never see the message. They see a white screen. The app tries to set up its database connection before it draws anything, hits the missing address, and gives up before a single pixel appears.

Inside Lovable's preview, the connection is handled for you. The preview knows where your database lives because Lovable set that up when you connected the two. You never typed the address, so you never thought about it.

The published version is a different build. It only knows what it was told at the moment it was made. If the address and key weren't present then, they're not in the finished app — and no amount of them being correct in Supabase afterwards will help.

Several troubleshooting guides written for Lovable builders put missing values like these at the top of the list for apps that work in preview and break on the live link.2 Treat the figure below as one source's rough estimate, not a law of nature.

more than half2
of preview-works-but-live-breaks cases attributed to missing values, per AppStuck's 2026 Lovable guide
since April 20221
How long the Supabase community discussion of this exact message has been running

What actually causes it?

Four situations account for nearly all of it. Read them in order; the first one that sounds like your week is probably yours.

  • You moved your app off Lovable's hosting. Vercel, Netlify, Cloudflare, your own server. Lovable's documentation is explicit that you set these values yourself on the new host before the first build.3 A classic Lovable app needs the database address and the public key, under the names VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY — older projects may use VITE_SUPABASE_ANON_KEY, so use whichever name your project already uses. Newer TanStack Start projects need a second pair, one for the browser and one for the server side. Set them, then build again.
  • You published before the values were in place. Your live link is a snapshot. It updates when you click Publish, not when you change a setting. If you fixed the values and the live site still fails, you probably just need to publish again.
  • A prompt edited the file it shouldn't have. Lovable generates a connection file at src/integrations/supabase/client.ts, with a comment at the top saying it's generated automatically and shouldn't be edited directly. Ask for something broad — "clean up the project," "remove hardcoded values" — and the AI may swap working values for a lookup that finds nothing. Read the first ten lines of that file.
  • The key or address in Supabase changed. Rotated a key, moved to a different Supabase project, or deleted and rebuilt it. Old values, new project, nothing matches.

How do I fix it?

It's about ten minutes of work. Copy two values out of Supabase, put them where your host can see them, rebuild, publish.

  1. Read the first red line
    Open the live site, right-click, Inspect, click Console. The first red line is the one that counts — later errors are usually just consequences of the first.
  2. Copy the two values
    In your Supabase dashboard, open Project Settings and find the project URL and the public key. Copy both.
  3. Put them where your app's settings live
    In Lovable that's the Cloud tab, under Secrets. On Vercel or Netlify it's the project's settings page.
  4. Rebuild and publish
    Setting them without rebuilding does nothing, because the values are only read when the app is built. Then reload the live link.
  5. If it still fails, check the obvious
    Is your Supabase project paused? Did your Lovable credits run out? Different problem, same white screen.
PASTE THIS INTO LOVABLE
My published app fails with "supabaseUrl is required" but the preview works. Check how the Supabase client is created in src/integrations/supabase/client.ts, confirm it reads the project URL and publishable key correctly, and tell me exactly which values I need to set and where. Do not change any other functionality.

How do I find out before a customer does?

Most people don't find this error. Someone tells them — a user, a customer, a friend who tried the link — and by then it's been broken for hours, possibly since last night's publish.

This failure has a cruel shape. It happens at publish, it takes the whole page down, and the person who published is the least likely to notice, because their preview still works. Something needs to load your live link from outside, on a schedule, and tell you when it stops working.

ToolWho it suitsWhat setup asks of youHow it tells you
UptimeRobotPeople happy with a few technical questionsAsks which responses count as failuresEmail, among other channels
Better StackTeams with a technical co-founderMore places to check from, fuller history, incident workflowsMultiple channels, documentation written for engineers
Uptime KumaPeople willing to run their own serverYou install and maintain it yourselfWhatever you configure
FomioSomeone who shipped a Lovable app and doesn't want to learn any of thisPaste a link. Nothing to configure.Email, saying Working, Having trouble or Down, with plain-English detail
Four ways to watch a live link, and who each one was built for

Where the others are honestly ahead: they check from more locations around the world, they keep longer histories, and some offer alerts through channels Fomio doesn't have. Fomio emails you, and that's it today — no texts, no Discord, no WhatsApp. If a 3am phone call is a requirement, that's not us.

The free plan watches one app from outside, checks it every five minutes, emails you when it breaks, and keeps a week of history. No card needed. Builder adds two more apps, checks every minute, and writes a prompt you can paste straight into the tool you built the app with. Pro adds more apps, a year of history, and a status page your users can look at. Current prices are at fomio.ai/pricing.

What should I do next?

Fix the live site first. Get the two values set where your host can see them, rebuild, publish, reload. That's the actual answer to your question.

Then, before you close the tab, put something outside your app watching the link — so next time a publish takes the page down, you hear it from a machine and not from a customer.

Questions people also ask

WHERE THIS COMES FROM

  1. Server Error Error: supabaseUrl is required. · Discussion #6459 — Supabase on GitHub, 16 April 2022
  2. Lovable Troubleshooting Guide: Fix the 10 Most Common Errors (2026) — AppStuck Blog
  3. Deploying and hosting outside Lovable — Lovable Documentation
  4. Fixing "supabaseUrl is required" when next build fails (tested repro, Next 16 + supabase-js 2.109) — DEV Community
  5. How to Fix "supabaseUrl is required" in a Supabase Vite Project — DEV Community
  6. Lovable app works in preview but breaks after deploy? Seven fixes — DEV Community
  7. Lovable Supabase Errors: 2026 Fix Guide — AppStuck Blog
KEEP READING
Read this as markdown