Skip to content
libSQL

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.

Free tier, no credit card
SQL Console
libSQL

Tables

  • users
  • events
  • orders
  • sessions
SELECT id, name, created_at
FROM events
WHERE created_at > NOW() - INTERVAL '7 days'
ORDER BY id DESC LIMIT 5;
idnamecreated_at
1247signup2026-03-12 14:21
1246purchase2026-03-12 14:08
1245login2026-03-12 13:55
1244signup2026-03-12 13:44
1243purchase2026-03-12 13:30
5 rows ยท 12ms
  • 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

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 guide
@libsql/client
import { createClient } from '@libsql/client'
const db = createClient({ url: 'https://your-host.cloud.layerbase.dev', authToken: process.env.LIBSQL_AUTH_TOKEN })

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
Full libSQL connection guide
ts
libSQL
const db = createClient({ url: 'https://your-host.cloud.layerbase.dev', authToken: process.env.LIBSQL_AUTH_TOKEN })

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.

Create a free libSQL database

No card on Free. Solo is $5/mo and Pro is $15/mo when you outgrow it.

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 works

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.

Included

TLS by default

All connections encrypted. No setup required.

Included

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.

Included, Paid plans

Scale to zero

Hibernates when idle. Wakes on the next connection.

Included

Connection pooling

Pooled endpoint for serverless and edge workloads.

Included

Direct connections

Bypass the pooler for migrations and replication.

Included

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.

Included

Serverless driver

Drop-in HTTP driver for edge runtimes (Neon serverless, PlanetScale, Upstash REST, or the engine-native client).

Included

IP whitelisting

Restrict access to specific IPs or CIDR ranges.

Included

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.

Included, Scheduled: paid plans

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.

Free$0

Scale to zero when idle. No credit card.

Solo$5/mo

The database you pin never sleeps.

Pro$15/mo

Every engine, plus a bigger always-on pool.

Hosted libSQL, compared

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.

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.

Compare libSQL and SQLite

libSQL is developed by the libSQL project. Layerbase packages and hosts official releases; the engine itself is built upstream.

turso.tech