Serverless SQLite
The world's most-deployed database, on a connection string. Free tier, the same SQL you already know, every standard SQLite tool works.
Tables
- users
- events
- orders
- sessions
| id | name | created_at |
|---|---|---|
| 1247 | signup | 2026-03-12 14:21 |
| 1246 | purchase | 2026-03-12 14:08 |
| 1245 | login | 2026-03-12 13:55 |
| 1244 | signup | 2026-03-12 13:44 |
| 1243 | purchase | 2026-03-12 13:30 |
Where to run it
Cloud, desktop, or self-host
One database, three places it can live. Pick the speed you want and move between them when you outgrow it.
Hosted SQLite
What hosted SQLite means here
SQLite is a file, not a server, so "hosted SQLite" needs a definition before it means anything. On Layerbase it is a real SQLite database on managed storage with a network endpoint in front of it, so code running anywhere can query it without shipping a file around.
You connect with a Postgres client and write SQLite SQL
The endpoint speaks the PostgreSQL wire protocol on port 5432 over TLS. That is what makes a file-based engine reachable from a serverless function or a second machine. Connect with psql, node-postgres, Drizzle, or Prisma, then write the SQLite SQL you already know.
Free is $0/mo with no card
SQLite runs on the Free plan: 2 databases, 5 GB of storage, up to 20 concurrent connections, no trial clock. Solo at $5/mo and Pro at $15/mo raise the limits without adding a meter.
Serverless in the scale-to-zero sense
A free SQLite database hibernates after 1 hour with no connections; paid plans wait 6 hours. It keeps its hostname, port, and volume while it sleeps, so the next connection wakes it in roughly 1 to 5 seconds. You are not paying for idle time either way, because the plans are flat.
SQLite or libSQL
If your runtime cannot hold a TCP connection, pick libSQL instead: it is the SQLite-compatible fork with HTTP and WebSocket drivers built for edge functions. Same account, same plans, so the choice is about the driver, not the bill.
Forget about it and it archives, it does not vanish
A free database left hibernated for 14 days is archived (7 days if you never connected to it): its address is released and it takes an explicit Restore, roughly 10 to 30 seconds, to bring it back. Data and backups are kept. After 90 continuous days archived the live resources are reclaimed and the most recent backup is kept and still restorable in one click. Paid plans are never auto-archived.
No card on Free. Solo is $5/mo and Pro is $15/mo when you outgrow it.
Branch SQLite in seconds
Fork a running SQLite into a full, isolated copy with its own connection string. Copy-on-write makes it near-instant, not a dump and restore. Point a preview deploy at it, test a migration, then throw it away. Layerbase branches 9 engines, not just Postgres.
See how branching worksWhat you get
Production features, free tier included
Every SQLite database ships with the same primitives: TLS, web console, hibernation, and a real dashboard. No tiered features hidden behind a sales call.
Web IDE
Query console in the dashboard, no extra client to install.
TLS by default
All connections encrypted. No setup required.
Always-on connections
Pin a database to your always-on pool to prevent hibernation.
Scale to zero
Hibernates when idle. Wakes on the next connection.
Connection pooling
Pooled endpoint for serverless and edge workloads.
Direct connections
Bypass the pooler for migrations and replication.
Native HTTPS endpoint
Engines whose own wire protocol speaks HTTPS. Every database, including this one, is also queryable over the platform's HTTPS query API and web console.
Serverless driver
Drop-in HTTP driver for edge runtimes (Upstash REST, PlanetScale, or the engine-native client).
IP whitelisting
Restrict access to specific IPs or CIDR ranges.
Automatic backups
Scheduled dumps and volume snapshots with one-click restore on paid plans. Free tier includes a manual backup slot.
Why Layerbase
Predictable pricing, no cloud setup
SQLite on Layerbase Cloud is priced the same way as every other engine: a flat monthly plan with nothing metered behind it.
A fixed monthly price
Plans are flat: Free at $0, then $5/mo Solo and $15/mo Pro. No per-hour compute meter, no per-database line items, and no bill that changes shape when your traffic does.
No bandwidth charges
Reads and writes are not metered. There are no ingress or egress fees, so moving data in and out of your database never adds to the bill.
No cloud account to wire up
You do not need an AWS, GCP, or Azure account. Sign up, create a database, and connect. Layerbase runs the infrastructure, so there is no cloud provider to configure or pay separately.
Side by side
Hosted SQLite, compared
| Provider | Free tier | Billing |
|---|---|---|
| Cloudflare D1 | Free allowance included | Metered per rows read and rows written |
| Layerbase | SQLite on the Free tier | $0, $5, or $15/mo flat. No row meters. |
Cloudflare D1
- Free tier
- Free allowance included
- Billing
- Metered per rows read and rows written
Layerbase
- Free tier
- SQLite on the Free tier
- Billing
- $0, $5, or $15/mo flat. No row meters.
Competitor facts as of July 2026, from public pricing pages.
Quick start
Connect with any SQLite client
Embedded-style data layers exposed over the network, prototypes, edge-friendly workloads, and apps that want SQLite ergonomics without managing a file.
- Spin up a network-addressable SQLite for a side project without provisioning anything
- Hand a SQLite endpoint to a serverless app instead of managing local files
- Prototype a schema in SQLite, deploy the same SQL elsewhere later
- Per-developer SQLite databases backed by the same shape as production
- Self-host on your own hardware with SpinDB when needed
psql "postgresql://layerbase:password@your-host.cloud.layerbase.dev:5432/sqlite1?sslmode=require"
Sibling engine
Looking for the SQLite-compatible serverless driver?
libSQL is the Turso-backed fork of SQLite with HTTP, WebSocket, and edge-friendly drivers. If you want SQLite semantics from an edge runtime, point your client at libSQL instead.
More on SQLite
All articles- August 9, 2026
The importer said every row matched. Three tables were missing.
We built importers from Cloudflare D1 and Turso into libSQL and found seven data-fidelity bugs. They turned out to be the same two bugs, and neither one is really about SQLite.
Read - August 2, 2026
Cloudflare D1 alternatives: what you are actually coupled to
D1 is SQLite, so your SQL is portable. The coupling is somewhere else: there is no wire protocol, the SQL export rounds any integer past 2^53, and you cannot get the file underneath. Here is an honest inventory, the alternatives, and when staying on D1 is the right call.
Read - July 30, 2026
Cloudflare D1 exports round every integer past 2^53
We measured what a D1 SQL export does to a 64-bit id: 9223372036854775807 comes back as 9223372036854776000, and the storage class flips from integer to real. Cloudflare documents the cause in one sentence. Here is the measurement, and the encoding that round-trips instead.
Read - July 29, 2026
Migrating from Cloudflare D1 to Layerbase
D1 is great if your app is a Worker. If it is not, you are reaching your database through a function you did not want to write. Here is how to move a D1 database to managed libSQL, and why we do not use D1's own export to do it: the SQL dump rounds any integer past 2^53.
Read - June 28, 2026
Migrating from Turso to Layerbase
Turso meters reads and writes per row, which gets unpredictable on real workloads. Here is how to move your libSQL database to flat-priced managed hosting on Layerbase: dump it, load it, and point the same libSQL client at a new URL.
Read
FAQ
Common SQLite questions
Is hosted SQLite still really SQLite?
Yes. The endpoint speaks standard SQLite SQL and behaves like a normal SQLite database, just reachable over the network. Standard tooling, standard schema, standard SQL.
How does it compare to libSQL?
SQLite is the upstream embedded engine; libSQL is Turso's fork with HTTP and WebSocket drivers, designed for edge runtimes that cannot speak SQLite's native protocol. If you need an HTTP-friendly client, pick libSQL.
Does it scale?
SQLite's strength is single-writer simplicity, not horizontal scale. For high write throughput, pick Postgres or MySQL. For typical app workloads SQLite scales further than people expect.
What about backups?
Free databases hibernate but persist their data; paid plans add scheduled snapshots. Manual snapshot and restore are available from the dashboard.
Can I use sqlite3 CLI and standard tooling?
Yes. The endpoint exposes a standard connection format compatible with sqlite3, better-sqlite3, sqlx, Drizzle, Prisma, and other SQLite-aware tooling.
Can I host SQLite in the cloud?
That is what this is. Layerbase Cloud puts a real SQLite database on managed storage and exposes it over the PostgreSQL wire protocol on port 5432 with TLS, so code running anywhere can query it without shipping a file around. You connect with a Postgres client such as psql, node-postgres, Drizzle, or Prisma, and the SQL you write is SQLite SQL.
Is hosted SQLite serverless?
In the scale-to-zero sense, yes. A free SQLite database hibernates after 1 hour with no connections and paid plans wait 6 hours. It keeps its hostname, port, and volume while it sleeps, so the next connection wakes it in roughly 1 to 5 seconds. Pricing is flat rather than per-request, so idle time costs nothing either way.
What does hosted SQLite cost?
SQLite is on the Free plan at $0/mo with no card: 2 databases, 5 GB of storage, up to 20 concurrent connections. Solo is $5/mo and Pro is $15/mo. There is no per-row-read meter and no bandwidth charge on any plan.