Skip to content

Blog

Why a Free app's database appears only after the app is online.

People ask for a database, get told it comes later, and wonder whether something broke. Nothing broke: on the Free plan the order depends on the kind of app, because Tofu only creates the database once the app exists — and for one kind of app, going online is what makes it exist.

Updated

The short version

Tofu runs a Free app's database itself and pays for it, so the database is attached to the app rather than created on its own. That is why it cannot come first: there has to be an app to attach it to. For an app whose code runs on a server, the first deploy creates both at once. For an app that only runs in the browser, the app goes online first and the database is added right after, with one more deploy.

Two kinds of app, two orders

  • An app whose code runs behind its pages. The first time it goes online it can carry its database with it: one deploy, and the app comes up with its data store already attached.
  • An app that only runs in the browser — an app built with Vite and kept as static files. It goes online first; the database is created after, and the app is put online once more with the connection it now has.

One more rule decides whether a Free app can have a database at all: on the shared static host, a site made only of finished HTML pages does not get one, while an app built with Vite can.

What to ask for

Tell your coding agent which kind of app it is, or ask it to find out — it can read the files faster than you can. Then ask in the same sentence as the deploy: “put it online, and create its database when it goes live”. The agent asks before creating anything that costs money; on Free the database is included, but the confirmation still runs, so approve it and the order above follows by itself.

The free-hosting guide walks the same steps with the switches the plan reads today, and the database docs explain what the app's code needs to find the connection.

If it does not appear

Three things account for almost every case where a Free app seems to be waiting for a database:

  • The app has not gone online yet. The database is created after the first successful deploy, so a build that failed, or one still running, is the usual reason. Ask your coding agent for the deploy's result before asking for anything else.
  • The app is a site of finished pages. A folder Tofu serves as finished HTML cannot have a database on the Free plan. An app built with Vite can, and so can an app whose code runs on a server.
  • The confirmation was never approved. Tofu asks before creating anything that costs money. On Free the database is included, but the question is still asked, and an unanswered question creates nothing.

The app's Database page names which of the three it is: no database and no request, a request waiting on you, or a plan that does not include one.

After it is online

The database stays while the app is in your account, whether or not anyone opens the app — Free databases are not archived for going unused. Sign-in, when the app has it, lives in the same database, which is why adding sign-in later is another small change rather than a second service.

What each plan includes, including whether a custom domain comes with it, is on the pricing page.