# Serverless libSQL

> Run libSQL in the cloud in seconds. Free tier. SQLite-compatible, HTTP and WebSocket drivers for edge runtimes, web SQL console. Also on Desktop and CLI.

Canonical: https://layerbase.com/db/libsql
Last updated: 2026-08-25

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.

## Key facts

| Fact | Value |
| --- | --- |
| Engine | libSQL |
| Category | Relational |
| Upstream project | [libSQL](https://turso.tech/libsql) |
| Layerbase Cloud | Yes |
| Free tier | Yes |
| Pricing | Free plan ($0/mo, no credit card), then $5 or $15/mo flat, no meters |
| Default version | 0.24 |
| Versions for new databases | 0.24 |
| Layerbase Desktop | Yes |
| SpinDB (local CLI) | Yes |
| Best for | Edge and serverless apps that want SQLite semantics, multi-region replication patterns, and projects already on Turso that want a portable alternative. |

## Use cases

- 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

## Cloud features

| Feature | Available |
| --- | --- |
| Always-on option | Yes |
| TLS encryption | Yes |
| HTTP access | Yes |
| IP allowlisting | Yes |
| Web query console | Yes |
| Sleeps when idle, wakes on connect | Yes |
| Automatic backups | Yes |
| Pooled connections | Yes |
| Direct connections | Yes |
| Serverless HTTP driver | Yes |

## 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 like the rest of the branchable engines, copy-on-write once Branching is turned on in the database Settings tab.

## Alternative

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.

https://layerbase.com/db/sqlite

## 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.

## Links

- [libSQL on Layerbase](https://layerbase.com/db/libsql)
- [Create a libSQL database](https://layerbase.com/create/libsql)
- [Connecting to libSQL](https://layerbase.com/docs/cloud/connecting/libsql)
- [Pricing](https://layerbase.com/pricing) (markdown: https://layerbase.com/pricing.md)
