Your database

The Postgres database built into your Floot project: how you reach it, when it sleeps, choosing its size and sleep time, how connections work, and how export, import, backups and restores work.

A Floot project comes with its own managed Postgres database. Your assistant sets it up the first time the app needs to store something, and there is nothing to install, and nothing to size unless you want to. This page covers how you reach it, why it sleeps, how to choose its size and sleep time, how connections work, and how to get data out, back in, or back to an earlier moment.

What you get

  • A Postgres database for the project, hosted by Neon on AWS in the US East region (us-east-1). New databases are created on Postgres 18.
  • Ordinary Postgres. Tables, indexes, constraints, views, functions and triggers behave the way they do anywhere, and your assistant creates and changes them with SQL.
  • Compute that follows the load. It scales up by itself when your app is busy and down to zero when nothing is querying it (see below). On a paid plan you can choose the size range and the sleep time.
  • One database for the preview and the published app. Anything you add, change or delete while testing in the preview is real data in the live app. For a separate copy to test against, see Duplicate a project.

How you reach it

Your app
Your app's backend endpoints query the database directly. A visitor's browser never talks to it.
The Data tab
On floot.com, open the Services tab and click Data. Pick a table to browse it, search its rows, add or edit rows and save, or delete the rows you select. The cog icon in the table header opens Database Settings, where compute, backup, export and import are; a database with no tables yet shows a Database Settings button instead.
The database's name
The Data tab lists each database by name. A database Floot creates is named after the project at that moment ("Floot Database for …") and keeps that name when you rename the project. To change it, point at the database in the Data tab and click the pencil icon beside the delete button (on a touch screen both are always shown), type the new name and click Rename. The owner and collaborators with edit access can do this. Only the label changes: the data, the connection settings and the environment variables your app reads stay as they are.
Your assistant
query_database reads, execute_sql writes and changes the schema, and pull_database_schema regenerates the typed helpers your code uses — see What your AI can do.
Other tools
To work with the data somewhere else, download an export (below) and load it there.

It sleeps when nothing is using it

A Floot database scales to zero. After about one minute without a query (about five minutes for projects created before 29 September 2026) it goes to sleep: database compute stops being billed, and your data stays exactly as it was. The next query wakes it. On a paid plan you can make it stay awake longer, or never sleep (below).

Waking usually adds a fraction of a second to that first request, and occasionally a few seconds. Your app doesn't have to handle it: the database client Floot gives your backend waits for the database and retries the connection by itself, so a wake-up shows as one slower request, not as an error.

Anything that queries the database keeps it awake: your app's traffic, a page that polls an endpoint every few seconds, scheduled jobs that read the database, browsing the Data tab, and queries your assistant runs. A job that runs every few minutes can keep the database awake around the clock, and awake time is what database compute is billed for. For a frequent job, Services → Schedules shows an estimate of what that costs — see Scheduled jobs and background tasks. If the hosting dashboard shows steady database charges on an app nobody is using, ask your assistant to find what keeps querying it.

Choose its size and sleep time

Database Settings → Compute sets how small and how large the database's server may scale, and how long it stays awake when nothing uses it. Most apps never need to change them.

Smallest size and largest size
From 0.25 to 8 CU, each shown with its RAM (1 CU is about 4 GB). The database scales between the two by itself with the load. A new database runs from 0.25 to 4 CU. Raise the largest size for an app that is slow under heavy load; raise the smallest size to keep the database fast from the first query after a quiet spell, at the cost of paying for that size whenever it is awake.
Sleep when idle
After 1 minute, 5 minutes, 15 minutes, 1 hour, 6 hours or 1 day without a query, or Never (always awake). A longer time means fewer slower first requests, and more hours billed.
  1. Open Services → Data, open a table and click the cog icon to open Database Settings.
  2. Under Compute, pick the sizes and the sleep time. Below them, the section shows what a day awake costs at the smallest and at the largest size.
  3. Click Save.
  • What it costs. Database compute is billed for the hours the database is awake, by its size at the time; asleep, it costs nothing. Never (always awake) bills every hour of the day, even with no traffic, at least the smallest size's daily cost.
  • Changing the size range restarts the database. Open connections drop for a moment; Floot's database client reconnects by itself. Changing only the sleep time doesn't restart it.
  • A shared database changes for every project on it. If you duplicated a project and chose to share its database, the section lists the other projects, and a change applies to them too.
  • Your assistant can do the same. It reads and changes these settings through the file static/__dev/database.json (minComputeUnits, maxComputeUnits, sleepAfterIdleSeconds, which also takes any whole number of seconds from 60 up to a week, or "never"). A change there applies at once, without publishing, under the same rules as the screen. It is told to ask you before raising them, because you pay for it.

Who can change it

  • Anyone who can see the project's data can see the settings. Changing them needs edit access, and the project's owner on a paid plan; on the free plan the section offers an upgrade.
  • A branch's database uses the branch defaults; change the compute on the main project.
  • Some older databases, created before each project had its own database server, show the reason instead of the settings and can't be changed.
  • A database shared with a project of another account can be seen here but not changed.
  • While the daily hosting limit has paused your published apps, a database set to stay awake longer than 5 minutes, or never to sleep, sleeps after a minute without queries instead, and changes are refused until the pause ends. Your own setting comes back when the apps do. See Daily hosting limit.

Connections

Your backend connects straight to the database; there is no connection pooler in between. Floot's database client opens connections when a request needs them, closes them when the request ends, and retries by itself when the database was asleep or a connection dropped. Your assistant sets this up when it adds the database, and there is nothing for you to configure.

Because the backend is serverless, every request that is running holds its own connections, so a burst of traffic is also a burst of connections. Keep transactions short, and don't hold one open while waiting on something slow such as an AI call or another service.

Export and import

On any plan you can download the whole database as a gzipped pg_dump file (.sql.gz): Services → Data, open a table, then the cog icon → Export → Download Database (tick Structure only for the schema without any rows). On a paid plan, Import in the same dialog loads a SQL dump and replaces the whole database. The steps, file formats and limits are in Code, data, and exports.

Backups and restores

Floot keeps a continuous recovery history of your database that covers the last 7 days. On a paid plan you can put the database back to any moment in it from Database Settings (the cog icon in the Data tab), and undo that restore if it wasn't what you wanted.

Restoring the database

  1. Open Services → Data, open a table and click the cog icon to open Database Settings.
  2. Under Backups & restore, in Go back to an earlier time, pick the date and time. The page says how far back you can go.
  3. Click Restore, type restore, and click Restore in the confirmation.

Restore is on paid plans, judged on the project owner's plan, and the owner and collaborators with edit access can use it. While it runs, your app may lose its database connection for a few seconds.

What a restore does

  • It puts the whole database back to the moment you chose: every table, structure and data.
  • Everything written after that moment is gone, including rows your users added in between. One table, or a few rows, can't be restored separately.
  • Your code, your uploaded files and your stored keys are not touched. Neither are payments or emails your app already sent.
  • If you duplicated the project and chose to share its database, the copy uses the same database, so it goes back too.

Undoing a restore

  • Right before a restore, Floot keeps a copy of the database as it was. Database Settings then shows Restored to … with two buttons.
  • Undo restore (type undo) puts the database back to how it was right before the restore. Anything written since the restore is lost.
  • Keep this version (type delete) deletes that copy. After that, the restore can't be undone.
  • The copy is kept for 7 days and deleted by itself after that. Until then it is billed like the rest of your database.
  • Only the last restore can be undone: restoring again replaces the copy from the restore before.

When restore isn't shown

  • On the free plan, Database Settings offers an upgrade instead. A copy kept from a restore made on a paid plan can still be undone or kept after a downgrade.
  • Some older databases, created before restore was available, show 7-day backup enabled instead. On a paid plan, contact support with the project's link and the date and time you want to go back to, including your time zone. It has to be a moment inside the last 7 days, so write in soon after you notice a problem.

Before a risky change

Before a large migration, a bulk delete or an import, note the time and download an export. Checkpoints roll back your code and project settings, not your data.

What the recovery history does not include

  • Uploaded files. Files in Floot Storage are not backed up and have no version history. Keep your own copy of any file you can't afford to lose: Services → Storage downloads them one at a time.
  • Anything older than 7 days. For a copy to keep longer, download an export and store the file yourself.

The history counts as database storage: you are billed for your current data plus the last 7 days of changes, so a database that is rewritten often is billed for more than its size — see Hosting.

Using your own database instead

Floot also works with a Postgres database you host somewhere else. Ask your assistant to connect it: it hands you a secure link where you paste the connection string, so the credentials never pass through the chat. The Data tab and your assistant's SQL tools work with it the same way. Its hosting, backups and region are then your provider's, and Import in Database Settings works with the built-in database only.

To move existing data across, export the Floot database and load the file into yours — Self-hosting has the command.

When hosting is taken down

If your hosting balance stays unpaid and your apps are taken down, the database is disabled along with them: it can't be opened, queried or exported until the balance is paid. The data is kept, and the database comes back with the same data once the balance is positive again — see Reliability and limits.