HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
benbjohnson
litestream
Go2021–2026
benbjohnson / litestream

litestream

Streaming replication for SQLite.

51Distinct people
64Mentions
1Explicit recommenders
14.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Streaming replication for SQLite.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

sqlite+litestream [1] is fantastic, i highly recommend it. I use it with pocketbase and it is a delightful and very productive setup. This guide [2] is for an older version of…

dtkav used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 3:59:04 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year64 dated mentions

Observed mentions: 2021-01-22 08:24:25 UTC to 2026-10-12 19:33:21 UTC.

051015202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 19 mentions; 6 submissions, 13 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 16 mentions; 3 submissions, 13 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 16 mentions; 2 submissions, 14 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC19613
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC16313
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC404
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC413
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC16214
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC514

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Litestream Litestream is a standalone disaster recovery tool for SQLite. It runs as a background process and safely replicates changes incrementally to another file or S3. Litestream only communicates with SQLite through the SQLite API so it will not corrupt your database. If you need support or have ideas for improving Litestream, please visit GitHub Issues. Please visit the Litestream web site for installation instructions and documentation. If you find this project interesting, please consider starring the project on GitHub. Source database changes When Litestream begins replicating a database, it creates an internal _litestream_lock table in the source SQLite database. This is expected and safe to leave in place. Litestream uses the table to acquire SQLite's write lock while coordinating synchronization around WAL checkpoints. The writes occur in transactions that are rolled back, so Litestream does not leave rows in the table. The table is part of the source database, not a separate table in the replica destination. Because the source schema is backed up, restored databases also contain it. Its creation changes the source database schema and can change its page count or bytes, so a database under Litestream should not be expected to remain byte-identical to its pre-Litestream state. Do not drop _litestream_lock while Litestream is running. Synchronization around a checkpoint can fail until Litestream reinitializes the database. Restarting Litestream recreates the missing table automatically. Stopping replication litestream replicate attempts a graceful shutdown on SIGINT or SIGTERM. The top-level shutdown-timeout configuration setting limits the entire shutdown, including waiting for startup, an exec process, and closing databases and replicas. It defaults to 30s; set a longer duration when final replication needs more time. Invalid or nonpositive values produce a warning and use the default. A second SIGINT or SIGTERM interrupts shutdown immediately. A timeout or interruption exits with an error because the final replica sync may be incomplete. This process-level bound also applies when a replica connection stops responding during startup. Cancellation of the calling context also starts a bounded graceful shutdown, using a fresh context for final replication. The existing shutdown-sync-timeout setting still controls each database's final replica sync retries within this overall limit. The process-level bound does not apply to callers of the Go library. Contributing We welcome bug reports, fixes, and patches! Please see our Contributing Guide for details on how to contribute. Security Please do not open a public issue for security vulnerabilities. Report them privately through GitHub's private vulnerability reporting, which keeps the report visible only to you and the maintainers until a fix is released. See our Security Policy for what to include and what to expect. Acknowledgements I want to give special thanks to individuals who invest much of their time and energy into the project to help make it better: Thanks to Cory LaNou for giving early feedback and testing when Litestream was still pre-release. Thanks to Michael Lynch for digging into issues and contributing to the documentation. Thanks to Kurt Mackey for feedback and testing. Thanks to Sam Weston for figuring out how to run Litestream on Kubernetes and writing up the docs for it. Thanks to Rafael & Jungle Boogie for helping to get OpenBSD release builds working. Thanks to Simon Gottschlag, Marin,Victor Björklund, Jonathan Beri Yuri, Nathan Probst, Yann Coleu, and Nicholas Grilly for frequent feedback, testing, & support. Huge thanks to fly.io for their support and for contributing credits for testing and development!
Read the full README on GitHub

What Hacker News says

4 sources
All this talk of “SQLite is not open contribution” never seems to consider that a project being “open contribution” doesn't mean the maintainers will accept your contributions. They have a process for contributions to follow: you suggest a feature, they implement it. It's far from the only project to take such a stance. Just in the SQLite “ecosystem” see the contribution policies of Litestream and LiteFS. I don't see people brandishing the ”not open contribution” to Ben's projects. https://github.com/superfly/litefs?tab=readme-ov-file#contri... https://github.com/benbjohnson/litestream?tab=readme-ov-file...
In Limbo: A complete rewrite of SQLite in Rust
xrd·Feb 2, 2024Submission

Ask HN: "Time travel" into a SQLite database using the WAL files?

I've been messing around with litestream. It is so cool. And, I either found a bug in the -timestamp switch or don't understand it correctly. What I want to do is time travel into my sqlite database. I'm trying to do some forensics on why my web service returned the wrong data during a production event. Unfortunately, after the event, someone deleted records from the database and I'm unsure what the data looked like and am having trouble recreating the production issue. Litestream has this great switch: -timestamp. If you use it (AFAICT) you can time travel into your database and go back to the database state at that moment. However, it does not seem to work as I expect it to: https://github.com/benbjohnson/litestream/issues/564 I have the entirety of the sqlite database from the production event as well. Is there a way I could cycle thro
Read the rest
ugh the WAL files and restore the database to the point in time before the records I need were deleted? If litestream does not do what I want, I can just use the sqlite files instead. Will someone take sqlite and compile it into the browser using WASM so I can drag a sqlite database and WAL files into it and then using a timeline slider see all the states of the database over time? Just stop working on your task management tool and spend a couple hours on my great idea. :)
2 points · Open discussion
We're using SQLite in production with millions of databases with many millions of operations per day. It's been nothing but great, as has always been my experience using SQLite. But we did run into some scariness around trying to use Litestream that put me off it for the time being. Litestream is really cool (and I'm a big fan of its author!) but it is also very much a cool hack in the way it works. The scariness I ran into was related to this issue https://github.com/benbjohnson/litestream/issues/510 And after a bit more fiddling I came away nervous about the possibility of corruption, which is not something I want to worry about from my backup method. So for now we're just doing regular snapshotting with remote backups and that seems sufficient with RAID1 storage. I would like something lower latency at some point but don't have the tim
Read the rest
e at the moment to work on it.
In Ask HN: Are you using SQLite and Litestream in production?

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.