How to Get a Free Database for Your App
Your AI tool will ask for a database within the first hour of building. A database is where your app stores information — users, orders, posts, whatever you're building. Turso gives you one for free in 5 minutes.
This guide was written as of April 2026. If anything looks different, let us know.
Before you start
What you'll have at the end
A database URL and auth token in your .env file
Free tier
9GB storage, 500 databases. Way more than enough for any side project. If you outgrow it, next tier is $29/mo.
What is a database?
A database is where your app stores information. Users, orders, posts, settings — anything your app needs to remember goes in a database.
Without one, your app forgets everything the moment someone closes the page. Your AI tool knows this and will ask for a database connection early.
Create a Turso account
Go to turso.tech and click Sign Up. You can sign in with GitHub or create a new account with email. No credit card required.
Install the Turso CLI
The Turso CLI is a small program that lets you create and manage databases from your terminal. Open your terminal and run one of these commands:
Mac / Linux
curl -sSfL https://get.tur.so/install.sh | bash
Windows (PowerShell)
iwr https://get.tur.so/install.ps1 -useb | iex
Log in to Turso
Run this command in your terminal:
turso auth login
A browser window will open. Sign in with the same account you created. Once you see "Success" in the terminal, you're logged in.
Create a database
Run this command (replace my-app-db with whatever you want to call it):
turso db create my-app-db
Done. You now have a database.
Get your credentials
Run these two commands to get your database URL and auth token:
turso db show my-app-db --url
turso db tokens create my-app-db
Copy both values. You'll need them in the next step.
Add to your .env file
Open your project's .env file (or create one — see the .env guide) and add these two lines:
TURSO_DATABASE_URL=your-database-url-here
TURSO_AUTH_TOKEN=your-auth-token-here
Replace the placeholder values with the real ones you just copied.
Verify it works
You should now have two new lines in your .env file with real values. If you run turso db list in your terminal, you should see your database listed.
If you see it — you're done. Your database is ready.
Neon Postgres alternative
Some AI tools or templates expect Postgres instead of SQLite. If yours gives you errors mentioning Postgres, use Neon instead — same idea, different database type.
Create a Neon account at neon.tech (free tier: 0.5GB storage). Create a project, copy your connection string, and add it to your .env file as DATABASE_URL.
The "Tell Your AI Tool" prompt is the same — just swap the credentials.
Tell Your AI Tool
Copy this prompt and paste it into your AI coding tool. It tells your AI exactly what credentials you just set up.
I've set up a Turso database. Here are my credentials: - Database URL: [paste your URL] - Auth token: [paste your token] They're in my .env file as TURSO_DATABASE_URL and TURSO_AUTH_TOKEN. Use this database for [describe what you're building].
Paste the prompt into the chat panel (Cmd+L or Ctrl+L). Cursor can also read your .env file directly — if your credentials are there, it already knows.
YepAPI Tip
Now you have a database. Use YepAPI to pull keyword data, SERP results, or AI-generated content — then store it all in Turso. Your AI tool handles the code.
Was this guide helpful?
Free Database — FAQ
A database is where your app stores information — users, orders, posts, settings, anything it needs to remember. Without a database, your app forgets everything when someone closes the page.
Yes. Turso's starter plan gives you 500 databases and 9GB of storage for free, with no credit card required. That's way more than enough for any side project. If you outgrow it, the next tier is $29/month.
Turso is just a database — simple, fast, generous free tier (9GB). Supabase is an all-in-one platform with a database plus authentication plus file storage, but a smaller free database (500MB). If you only need a database, use Turso. If you want everything in one account, check out our Supabase guide.
They're two types of databases. Turso uses SQLite (lightweight, simple). Neon and Supabase use Postgres (more features, industry standard). For most vibe coded projects, either works fine. If your AI tool asks for one specifically, go with what it wants.
Start vibe coding with one API key.
One API key. 100+ endpoints. Yep, that's it.