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.
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 9 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.
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 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- 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 - June 21, 2026
Add Email and Password Auth to libSQL with Better Auth
Spin up a libSQL database preloaded with the Better Auth schema, then add email and password sign-in in a few lines. Local dev to production, same engine.
Read - June 14, 2026
Branching with any database
Neon branches Postgres. PlanetScale branches MySQL. Layerbase branches all of them, because branching happens at the filesystem, not inside the engine. Here is how it works.
Read - May 17, 2026
Turso alternatives: libSQL hosting without row-read limits
Turso is the dominant libSQL host, but its per-row-read pricing surprises many users on real workloads. Here are alternatives, including self-hosted libSQL.
Read - March 14, 2026
Embedded Databases: SQLite, LibSQL, and DuckDB
A practical guide to choosing between SQLite, LibSQL, and DuckDB when your project does not need a standalone database server.
Read
Questions
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.