Free database and storage for vibe coding (2026)
How to add free Postgres, Redis, and file storage to a vibe-coded project — Neon as the start-here, then Supabase, Turso, D1, R2, and when the free tier ends.
~14 min read
Part 1 of Free vibe coding stack covered free cloud AI API keys. Part 2 was courses. Part 3 was hosting. A live URL without state is a brochure. Part 4 is database and storage — Postgres, Redis, and files you can attach without paying day one.
This chapter is persistence: the connection string and the free-tier cliffs. If you pick Supabase because it also bundles login, still stop at the database today — do not invent auth in this change.
DATABASE_URL). Need Auth + Storage + Realtime in one product → Supabase (still Postgres; Free projects pause after a week idle). Files next to Neon → Cloudflare R2 (no egress). Already on Vercel from Part 3 → Vercel Blob.
Database map
| Provider | Best for | Free quota | Card? | Cliff |
|---|---|---|---|---|
| Neon | Serverless Postgres | 100 projects; 0.5 GB + 100 CU-h / project / mo | No | Scale-to-zero after 5 min (cannot disable on Free) |
| Supabase | Postgres + extras | 2 active projects; 500 MB DB; 1 GB files | No | Pauses after 1 week inactivity |
| Turso | SQLite / edge replicas | 5 GB; 500M row reads; 10M writes / mo | No | Rows-read meter; Developer ~$5/mo |
| Cloudflare D1 | SQLite next to Pages | 5 GB account; 500 MB / DB; 5M reads/day | No | Hits Workers Free daily row caps |
| MongoDB Atlas M0 | If the agent scaffolded Mongo | 512 MB; 1 Free cluster / project | No | 100 ops/sec; 10 GB in/out per 7 days |
| Upstash Redis | Cache / rate-limit / queue | 256 MB; 500K commands / mo | No | Not a primary app database |
Checked 18 Aug 2026 from official docs. Quotas move — screenshot Usage the week you launch.
Storage / CDN map
| Provider | Best for | Free quota | Card? | Cliff |
|---|---|---|---|---|
| Cloudflare R2 | Object storage next to Neon | 10 GB-month; 1M Class A; 10M Class B | No | Egress $0 from R2 |
| Vercel Blob | Files on a Vercel app | Included in Hobby envelope | No | Hobby cannot buy extra; Blob pauses at cap |
| Backblaze B2 | S3-compatible backup | First 10 GB storage always free | No* | Egress free up to 3× stored (or via CDN partners) |
| UploadThing | Drop-in Next uploads | 2 GB storage | No | 100 GB plan is $10/mo |
| ImageKit | Image CDN / transforms | 20 GB bandwidth / mo; 3 GB DAM | No | Delivery stops at the bandwidth cap |
| bunny.net | Cheap paid CDN | 14-day trial | For paid | $1/mo minimum; ~$0.01/GB EU/NA — not forever-free |
Cloudflare KV (not in the table): 1 GB stored, 100k reads/day on Workers Free — key/value next to D1/R2, not a SQL database. *B2 billing starts after the 10 GB include.
Wire it from Cursor
Same loop on every provider: create the project, copy the connection string or token, put it in .env, add the same names on Vercel / Cloudflare / Netlify (Part 3). Never commit .env. Paste this if you want the agent to stay on one database:
Wire this app to Neon Postgres using DATABASE_URL from .env. Walk me through: (1) creating the Neon project if needed, (2) putting DATABASE_URL in .env and .gitignore, (3) the same env var on the host dashboard, (4) a minimal schema/migration. Do not add a second database. Do not invent Clerk/Auth in this change. If we need file uploads, use Cloudflare R2 or Vercel Blob — not a second Postgres.
Neon Postgres (start-here)
Neon is serverless Postgres: compute scales to zero after 5 minutes idle on Free (you cannot turn that off). Idle prototypes accrue zero CU-hours. This site uses Neon. Official plans: Free is permanent, no card — 100 projects, 10 branches / project, 100 CU-hours / project / month, autoscale up to 2 CU, 0.5 GB storage / project, 5 GB public network transfer / month.
Honest: storage and CU-hours still cap. Hit CU-hours or egress and compute suspends until the next billing period (or you upgrade). Hit 0.5 GB and writes that grow storage fail. Launch is pay-as-you-go (no monthly minimum) if you outgrow Free.
- Sign up at neon.com → New project → copy the pooled
DATABASE_URL. - Local:
DATABASE_URL=postgres://…in.env. Host: same name in the dashboard. - Optional: Neon MCP in Cursor if you want the agent to inspect schema without pasting dumps into chat.
Supabase
Supabase is Postgres plus Auth, Storage, Realtime, and Edge Functions. Free: 2 active projects, 500 MB database, 1 GB file storage, 5 GB egress, 50k MAU. Official: Free projects pause after 1 week of inactivity. Restore from the dashboard; data is not deleted. Pro starts at $25/mo and does not pause.
Pick Supabase when you actually want the bundle. Do not run Neon and Supabase for the same app. Today, copy DATABASE_URL or the anon/service keys into .env and stop — do not invent login in this change.
- New project at supabase.com/dashboard.
- Project Settings → Database → URI, or API keys for the JS client.
- Expect a pause email if the side project goes quiet for a week.
Turso
Turso is libSQL (SQLite fork) with edge replicas. Free: 5 GB, 100 databases, 500 million rows read and 10 million rows written per month. Paid starts at Developer (~$5/mo). The bill that surprises people is rows read — an unindexed SELECT * can chew the meter. Use it for local-first / SQLite-shaped apps, not as a second Postgres next to Neon.
- Create a DB in the Turso console → copy
TURSO_DATABASE_URLandTURSO_AUTH_TOKEN. - Wire via
@libsql/clientor Drizzle. Index the columns you filter on.
Cloudflare D1
D1 is SQLite on Workers. If Part 3 put you on Cloudflare Pages, D1 is the in-family database. Workers Free: 5 GB storage total, 500 MB per database, 10 databases, 5 million rows read / day, 100,000 rows written / day. No D1 egress charge. Daily caps reset midnight UTC; queries fail when you blow them until the next day (or Workers Paid).
- Dash → Workers & Pages → D1 → Create database.
- Bind it in
wrangler.toml(or Pages project settings). There is no classicDATABASE_URL— it is a Worker binding.
MongoDB Atlas
Atlas Free (M0): 512 MB, shared CPU/RAM, one Free cluster per project, ~100 ops/sec, 10 GB in and 10 GB out per rolling 7 days. Use it if Cursor already generated Mongoose. Do not add it “for flexibility” beside Neon.
- Create a Free cluster → Database Access + Network Access (your IP or 0.0.0.0/0 for a demo, tighten later).
MONGODB_URIin.env.
Upstash Redis
Upstash Free: 256 MB, 500,000 commands / month, 10 GB bandwidth, one database. That is cache, rate limits, and queues — not your users table. Older “10k commands/day” blurbs are stale; use the monthly command cap.
- Create a Redis DB → copy
UPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKEN(or the Redis URL). - Keep TTL on cache keys so you do not fill 256 MB with junk.
Cloudflare R2
R2 is S3-compatible object storage with no egress from R2 itself. Free: 10 GB-month, 1 million Class A (writes/lists), 10 million Class B (reads). Default files pick if Neon is the database. Pair it with a public bucket + custom domain, or a Worker that signs URLs.
- Dash → R2 → Create bucket. Create an API token with Object Read & Write.
- Env:
R2_ACCOUNT_ID,R2_ACCESS_KEY_ID,R2_SECRET_ACCESS_KEY,R2_BUCKET. Point the S3 client athttps://<accountid>.r2.cloudflarestorage.com.
Vercel Blob
Vercel Blob is the low-friction file store if Part 3 left you on Vercel. Hobby includes Blob inside the shared usage envelope; Hobby cannot buy extra — when you hit the cap, Blob pauses until the window resets. Pro pays overages (and still has the commercial-use rule from Part 3). This site uses private Blob for a paid download zip.
- Vercel dashboard → Storage → Blob → create store → copy
BLOB_READ_WRITE_TOKEN. - Use
@vercel/blobput()/head(). Dashboard browsing counts as advanced operations.
Backblaze B2
B2: first 10 GB of storage is always free. Egress is free up to 3× average monthly storage, or unlimited through CDN partners (Cloudflare, bunny.net, Fastly, and others). Good S3-compatible backup/archive next to R2, not the default public-image CDN.
- Create a bucket → Application Key with access to that bucket.
- Use the S3-compatible endpoint in the same way as R2, with B2’s region URL.
UploadThing
UploadThing is “better S3 for Next”: auth on your server, upload on theirs. Free: 2 GB storage shared across apps, unlimited uploads/downloads. 100 GB App is $10/mo.
- Create an app →
UPLOADTHING_TOKENin.env. - Define a file router; keep the 2 GB include in mind for user-generated dumps.
ImageKit
ImageKit Forever Free: 20 GB bandwidth / month and 3 GB DAM storage. Delivery stops when you hit the bandwidth cap (it resets next calendar month). Lite is $9/mo with overages. Use it for transforms (resize, format) — not as a second object store if R2 already holds originals.
bunny.net
bunny.net is the cheap paid CDN: 14-day trial, then pay-as-you-go with a $1 / month minimum and about $0.01/GB in Europe & North America. It is not a free database and not a forever-free CDN. Reach for it when Cloudflare’s free static/R2 path is not the CDN you want, and you accept a small bill.
Also: Cloudflare KV
Workers KV on Free: 1 GB stored, 100,000 reads / day, 1,000 writes / day. Session flags, config, A/B — not relational data. Bind it like D1. No KV egress charge.
Free vs paid (the honest cliffs)
Free tiers are for hobby, demos, and learning. The first paid step is usually always-on compute or leaving the storage cap, not a fancy feature.
- Neon — Launch when you need to disable scale-to-zero, more than 0.5 GB, or more CU-hours. Pay-as-you-go; no fake $25 floor.
- Supabase — Pro at $25/mo removes the 7-day pause and raises disk/storage. That is the “this URL must stay up” tax.
- D1 / R2 / KV — Workers Paid when daily row or request caps bite. R2 paid storage is cheap; egress stays $0 from R2.
- Vercel Blob — Pro if Hobby usage pauses you, and if Part 3 already forced Pro for Stripe/commercial.
- Redis — stay Free for cache; do not “upgrade Redis” to avoid designing a real database.
Practical tips
- One primary database — Neon or Supabase or D1. Redis on the side is fine. Two SQL engines is how demos rot.
- Env vars in the host dashboard — same names as local. Rotate if a URL hits GitHub.
- Pooled Neon URL — serverless hosts want the pooled connection string, not a single long-lived client per isolate without a pooler.
- Quotas move — screenshot Usage the week you launch.
- Supabase pause — a quiet week is enough. Neon idle is cheap; Supabase idle can go to sleep.
Browse tools we actually use on vibecoderslife.com/tools (Neon, Vercel, GitHub, Cursor — affiliate links marked where active).
FAQ
How do I add a free database to a vibe-coded project?
Create a Neon project, put the pooled DATABASE_URL in .env and on your host, and paste the Cursor prompt above. Do not add a second SQL database “just in case.”
Neon vs Supabase?
Neon if you only need Postgres (branching, scale-to-zero, this site’s stack). Supabase if you want Auth + file Storage + Realtime in one dashboard and you accept the 7-day pause on Free. Both are Postgres underneath.
Is Redis a free database for my app?
No. Upstash Redis is cache / rate-limit / queue. Store users and orders in Postgres (or SQLite/D1), not in 256 MB of Redis.
What about R2 vs Vercel Blob?
R2 if you want S3-compatible storage and zero egress. Blob if the app already lives on Vercel and you want a token + SDK with no extra vendor. Hobby Blob cannot buy extra usage.
Do I need a credit card?
Usually not for Neon, Supabase Free, Turso Free, D1/R2/KV on Workers Free, Atlas M0, Upstash Free, UploadThing Free, or ImageKit Forever Free. bunny.net wants a card after the trial. Paid upgrades (Neon Launch, Supabase Pro, Workers Paid) need billing.
Sources: Neon plans / pricing; Supabase pricing / free project pausing; Turso pricing; D1 pricing / limits; MongoDB Atlas pricing / Free cluster limits; Upstash Redis pricing; R2 pricing; Vercel Blob pricing; Backblaze B2; UploadThing; ImageKit plans; bunny.net pricing; KV pricing. Numbers as of 18 Aug 2026 — verify in-product.
Disclosure: Neon signup is a referral link (same as on our Tools page). Supabase, Turso, Cloudflare, MongoDB, Upstash, Vercel, Backblaze, UploadThing, ImageKit, and bunny.net are plain product URLs. No paid placement by those providers for this article.
Questions? Get in touch — or subscribe.