Skip to main content
Account

Litestream

Status
stable
Category
Runtime
Subcategory
Cloud Native Storage
License
Apache-2.0

Rawkode’s personal rating: Skip

Litestream is a streaming replication tool for SQLite, written in Go by Ben Johnson (the author of BoltDB). It runs as a sidecar process next to an application that uses SQLite and ships the database’s write-ahead log to object storage in near-real-time.

Litestream opens the SQLite database in WAL mode, takes a shared lock, and tails the WAL file. New frames are batched into small segments and uploaded to S3, GCS, Azure Blob, SFTP, or a local filesystem, along with periodic full snapshots. Because it only reads the WAL, the application keeps writing without blocking, and there is no Litestream-aware client — existing SQLite code is unchanged. Recovery is done with litestream restore, which reconstructs the database from the latest snapshot plus replayed WAL segments, producing a point-in-time copy.

Litestream turns SQLite into a viable primary store for single-node web apps that want cheap, continuous backups without running Postgres. It is often paired with Fly.io-style single-VM deployments and is the spiritual predecessor to LiteFS, Johnson’s follow-up project that adds distributed replicas on top of the same idea.

Cloud Native Storage

Email signup loads here. You can also manage email preferences in account settings.

Build Litestream? I'll show you where engineers get stuck with it → Back free content for the community →