For Bolt.new apps

Add a PostgreSQL database to your Bolt.new app in 5 minutes.

Bolt sandboxes wipe data between sessions. A connected Swyftstack database is permanent.

How we fit together

Bolt builds the app. Swyftstack stores it.

Bolt.new sandboxes are wiped between sessions. Connect a Swyftstack PostgreSQL database and your users, content, and state survive a page refresh.

Bolt.new: your app sandbox

Bolt.new builds and runs your app in an in-browser sandbox. The sandbox is great for iterating on UI fast - but it wipes data between sessions. Bolt is the runtime, not the storage layer.

Swyftstack: your data + your files

Managed PostgreSQL 16 on a single DATABASE_URL, plus app object storage on the same dashboard. SSL by default, daily backups, scoped credentials, and a single invoice for both.

PostgreSQL 16 Object storage
Walkthrough

Persist your Bolt app's data in four steps

1Create a Swyftstack database

47 seconds. Copy the connection string.

2Add it to Bolt

In the file explorer, create or open .env in the root. Add DATABASE_URL=<paste>.

3Tell Bolt to use it

"Use the DATABASE_URL env to connect to a PostgreSQL database. Replace any in-memory or SQLite storage with this database. Create the tables."

4Verify it persists

Restart the Bolt environment. Reopen. Your data should still be there.

Working with the common Bolt stacks

Prisma, Drizzle, and the deploy step

Prisma

Update schema.prisma to provider postgresql, url env("DATABASE_URL"). Then npx prisma db push.

Drizzle

Drizzle reads process.env.DATABASE_URL. Ask Bolt to confirm the client is wired up.

Deploy outside Bolt

Copy the same DATABASE_URL into Vercel/Netlify/anywhere. The database doesn't care where the app is hosted.

Sandbox to deployed

What to get right with Bolt

01

The sandbox is ephemeral by design

Bolt runs your app in a WebContainer in the browser, which is why it boots instantly. Any SQLite file or in-memory array lives only until the environment resets. Anything you want to keep has to go to a database outside the sandbox.

02

Set DATABASE_URL where the deployed app runs too

When you deploy a Bolt app to Netlify, Vercel, or your own server, the sandbox environment variables do not follow. Add DATABASE_URL and any storage keys to the deploy target as well. A missing connection string in production is the most common works-in-Bolt, broken-when-deployed bug.

03

Query from server code, never the browser

A connection string is a credential. Tell Bolt to query Postgres only from server routes or actions and return results to the client, never from client components. If DATABASE_URL ever appears in a public bundle, rotate it from the dashboard in one click.

04

Move from db push to migrations before launch

While the schema changes every prompt, prisma db push or drizzle-kit push is fine. Once real users have data you cannot lose, switch to versioned migrations so each change is reviewable and reversible. Standard Postgres means any migration tool works.

Frequently asked

Do I need to commit my .env to Bolt's repo?

No - Bolt has a separate Secrets / Env Variables section. Use that, not committed files, so your connection string never lands in source control.

Will Bolt's free tier work with this?

Yes. The database is external and managed by Swyftstack; Bolt only needs to make an outbound connection to it, which the free tier allows.

My data still resets - why?

Make sure Bolt's generated code reads from DATABASE_URL and isn't falling back to SQLite or in-memory storage. Tell Bolt: "Don't fall back to local or in-memory storage; require DATABASE_URL and fail loudly if it's missing." A silent fallback is the usual cause.

Bolt scaffolded SQLite - how do I switch it to Postgres?

Tell Bolt: "Replace SQLite with PostgreSQL using DATABASE_URL." For Prisma, that means changing the provider to postgresql and running prisma db push; for Drizzle, swapping the driver to postgres-js. Bolt handles the code; you run the push in the terminal.

Can I keep using the same database after I download my Bolt project?

Yes. Export your Bolt project, set the same DATABASE_URL locally or in your deploy platform, and it connects to the exact same data. Nothing about the database is tied to Bolt.

Is this real PostgreSQL or a fork?

Real PostgreSQL 16, straight from postgresql.org. We don't fork or modify the engine. pg_dump, psql, and any standard client work normally.

Where is my data stored?

US or EU - you pick at signup. Encrypted in transit and at rest. Backups are encrypted with separate keys.

Can I move off Swyftstack later?

Yes. PostgreSQL is standard Postgres, and bucket objects can be exported. Take a pg_dump or export your files anytime - we'll even help.

What happens if I outgrow the Launch plan?

Click upgrade. Same database, same connection string, more capacity. No downtime, no migration.

Do I need to manage SSL myself?

No. SSL is on by default, certificates are managed and auto-renewed. Standard rejectUnauthorized: true works out of the box.

Make your Bolt app stop forgetting users.

Try free for 14 days, then $19/mo. No credit card required.