Serverless libSQL
SQLite-compatible, edge-friendly, with HTTP and WebSocket drivers. Free tier, the same SQL you already know, cloud or self-host with the Layerbase CLI.
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
Edge access
SQLite semantics over HTTP and WebSockets
The libSQL client wraps SQL queries in HTTPS calls, so Cloudflare Workers, Vercel Edge, and any runtime that cannot hold a TCP socket can talk to a libSQL endpoint. Point the same client library Turso users already have at the URL and auth token from the dashboard, and the SQL you write is still SQLite SQL. It hibernates when idle, wakes on the next connection, and branches copy-on-write like the rest of the branchable engines.
Full libSQL connection guideimport { createClient } from '@libsql/client'
const db = createClient({ url: 'https://your-host.cloud.layerbase.dev', authToken: process.env.LIBSQL_AUTH_TOKEN })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 the Layerbase CLI
const db = createClient({ url: 'https://your-host.cloud.layerbase.dev', authToken: process.env.LIBSQL_AUTH_TOKEN })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 15 minutes idle and wakes on connect
A free libSQL database hibernates after 15 minutes 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.
FAQ
Common libSQL questions
What is libSQL?
libSQL is the Turso-backed open-source fork of SQLite that adds HTTP and WebSocket access on top of the SQLite engine, so edge and serverless runtimes can query it without holding a TCP socket open. The SQL you write is still SQLite SQL. Layerbase runs it as a managed database on the Free plan, with a web SQL console, and the same client library Turso users already have connects to it.
How does libSQL differ from 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 libSQL on Layerbase Turso-compatible?
Yes. libSQL on Layerbase speaks the same protocol and ships with the same client library Turso users already have.
How does the libSQL 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.
What are the free libSQL tier limits on Layerbase?
libSQL is in the Free tier. Your database hibernates after 15 minutes of inactivity and wakes on the next connection; upgrade if you need always-on or larger storage.
Can I run libSQL locally?
Yes. The Layerbase CLI and Layerbase Desktop both run libSQL with the same install workflow.
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
Everything a libSQL database should ship with
The same primitives on every libSQL 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 libSQL 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 libSQL, compared
| Provider | Free tier | Billing |
|---|---|---|
| Turso | 5 GB, 500 million rows read and 10 million rows written per month | Developer plan $4.99/mo, then metered rows read, rows written and storage |
| Layerbase | libSQL on the Free tier | $0, $5, or $15/mo flat. No row meters. |
Turso
- Free tier
- 5 GB, 500 million rows read and 10 million rows written per month
- Billing
- Developer plan $4.99/mo, then metered rows read, rows written and storage
Layerbase
- Free tier
- libSQL 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: Turso.
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- September 13, 2026
libSQL vs Turso
libSQL is the open source SQLite fork. Turso is the company behind it, its managed platform, and now a separate Rust rewrite with the same name. Here is how the three fit together in September 2026.
Read - 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
Upstream project
libSQL is developed by the libSQL project. Layerbase packages and hosts official releases; the engine itself is built upstream.