Serverless libSQL
SQLite-compatible, edge-friendly, with HTTP and WebSocket drivers. Free tier, the same SQL you already know, cloud or self-host with SpinDB.
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.
Free libSQL hosting
What you actually get on the free libSQL tier
libSQL is SQLite with a network in front of it: the SQL you already know, reachable over HTTP and WebSocket from edge runtimes. This is what the Free plan includes and where the line is.
Free is $0/mo with no card
The Free plan covers 2 databases, 5 GB of storage, and up to 20 concurrent connections. libSQL is one of the engines you can create on it. There is no trial clock on the plan and no expiry date.
HTTP and WebSocket drivers, so edge runtimes work
libSQL is served over HTTPS, which means the official client works from Cloudflare Workers, Vercel Edge, Deno, and anywhere else a raw TCP socket is not available. The same database is also reachable from an ordinary Node or Bun process.
It sleeps after an hour idle and wakes on connect
A free libSQL database hibernates after 1 hour with no requests; paid plans wait 6 hours. A hibernated database keeps its hostname and data volume, and the next HTTP or WebSocket request wakes it in roughly 1 to 5 seconds rather than failing.
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 libSQL in seconds
Fork a running libSQL 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
Production features, free tier included
Every libSQL 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
libSQL 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 libSQL, compared
| Provider | Free tier | Billing |
|---|---|---|
| Turso | Free tier included | Metered rows read and written plus storage; paid entry $4.99/mo |
| Layerbase | libSQL on the Free tier | $0, $5, or $15/mo flat. No row meters. |
Turso
- Free tier
- Free tier included
- Billing
- Metered rows read and written plus storage; paid entry $4.99/mo
Layerbase
- Free tier
- libSQL 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 libSQL client
Edge and serverless apps that want SQLite semantics, multi-region replication patterns, and projects already on Turso that want a portable alternative.
- Spin up a libSQL for an edge or Cloudflare Workers app via the HTTP driver
- Run SQLite-compatible schema with an HTTP-friendly client where the file-based mode does not fit
- Per-tenant libSQL databases that hibernate between bursts
- Local-first development on Layerbase Desktop, deploy the same schema to cloud
- Self-host on your own hardware with SpinDB
const db = createClient({ url: 'https://your-host.cloud.layerbase.dev', authToken: process.env.LIBSQL_AUTH_TOKEN })Already have data? Migrate it from Cloudflare D1, Turso Any connection string works too.
Sibling engine
Want the upstream SQLite specifically?
If you do not need the HTTP or WebSocket driver and want the bare upstream engine, point your client at SQLite on Layerbase instead. Both run on the same platform.
More on libSQL
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
FAQ
Common libSQL questions
libSQL vs upstream SQLite on Layerbase?
libSQL is the Turso-backed fork that adds HTTP and WebSocket drivers and remote-friendly features. Pick libSQL when you want edge-runtime access; pick SQLite for the bare upstream engine.
Is it Turso-compatible?
Yes. libSQL on Layerbase speaks the same protocol and ships with the same client library Turso users already have.
How does the HTTP driver work?
The libSQL client wraps SQL queries in HTTPS calls so edge and serverless runtimes (Cloudflare Workers, Vercel Edge) can talk to a libSQL endpoint without a TCP socket.
Free tier limits?
libSQL is in the Free tier. Your database hibernates after an hour of inactivity and wakes on the next connection; upgrade if you need always-on or larger storage.
Can I run libSQL locally?
Yes. SpinDB and Layerbase Desktop both run libSQL with the same install workflow.