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 |
Free tier
$0/mo, no credit card
Then flat
$5 or $15/mo, no meters
Encrypted
TLS on every plan
Layerbase Cloud
Managed, in seconds
Desktop and CLI
Run it locally or self-host
Wire protocol
SQLite on a connection string, no file to ship
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 passing a file around. Connect with psql, node-postgres, Drizzle, or Prisma; the SQL you write is still SQLite SQL. It hibernates when nothing is connected, wakes on the next connection, and branches copy-on-write when a preview deploy needs its own copy.
Full SQLite connection guidepsql "postgresql://layerbase:password@your-host.cloud.layerbase.dev:5432/sqlite1?sslmode=require"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 the Layerbase CLI when needed
psql "postgresql://layerbase:password@your-host.cloud.layerbase.dev:5432/sqlite1?sslmode=require"
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 15 minutes 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.
FAQ
Common SQLite questions
What is SQLite?
SQLite is the most widely deployed database in the world: a small embedded SQL engine that normally lives as a single file inside the application rather than as a server you connect to. It is the usual choice for embedded data layers, prototypes, and anything that wants SQL without an operational footprint. Layerbase Cloud puts a real SQLite database on managed storage and exposes it over the PostgreSQL wire protocol with TLS, so code running anywhere can query it without shipping a file around, and the SQL you write is still SQLite SQL.
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 hosted SQLite 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 hosted SQLite 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.
How do backups work for hosted SQLite?
Free databases hibernate but persist their data, and Free includes 1 manual backup slot you can take and restore from the dashboard. Paid plans add scheduled snapshots on top of that.
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 15 minutes 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.
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 16 engines, not just Postgres.
See how branching worksWhat you get
Everything a SQLite database should ship with
The same primitives on every SQLite database: TLS, web console, hibernation, and a real dashboard. The rows that need a paid plan say so on the row; nothing here is 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 plan's always-on pool so it never hibernates. Free has no pool, so a free database always sleeps when idle; Solo includes 768 MB of pool and Pro 1.5 GB.
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 (Neon serverless, PlanetScale, Upstash REST, 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 includes 1 manual backup slot you take and restore yourself.
What it costs
What SQLite costs on Layerbase
Plans are flat. There is no per-hour compute meter, no per-database line item, and no ingress or egress fee, so the bill does not change shape when your traffic does. You do not need an AWS, GCP, or Azure account either: Layerbase runs the infrastructure.
Scale to zero when idle. No credit card.
The database you pin never sleeps.
Every engine, plus a bigger always-on pool.
Side by side
Hosted SQLite, compared
| Provider | Free tier | Billing |
|---|---|---|
| Cloudflare D1 | 5 GB of storage, 5 million rows read and 100,000 rows written per day | Metered per row: $0.001 per million rows read, $1.00 per million rows written |
| Layerbase | SQLite on the Free tier | $0, $5, or $15/mo flat. No row meters. |
Cloudflare D1
- Free tier
- 5 GB of storage, 5 million rows read and 100,000 rows written per day
- Billing
- Metered per row: $0.001 per million rows read, $1.00 per million rows written
Layerbase
- Free tier
- SQLite on the Free tier
- Billing
- $0, $5, or $15/mo flat. No row meters.
Competitor facts verified September 7, 2026 against each vendor's own pricing and documentation pages: Cloudflare D1.
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 12, 2026
Your SQLite File Deserves a URL
A SQLite file stops working the moment something other than one process needs it. Here is how to put the same file behind an address, with a Postgres driver or the libSQL client, without rewriting a schema.
Read - 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
Upstream project
SQLite is developed by the SQLite project. Layerbase packages and hosts official releases; the engine itself is built upstream.