# Litestream: Revamped

DevFeed: [Litestream: Revamped](<https://devfeed.tech/articles/litestream-revamped-1703.md>)

Original publisher: [Read original article](<https://fly.io/blog/litestream-revamped/>)

Published: 2025-05-20T00:00:00Z

Content type: article

Language: en

Sources: [The Fly Blog](<https://devfeed.tech/sources/the-fly-blog.md>)

Topics: [SQLite](<https://devfeed.tech/topics/sqlite.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Amazon S3](<https://devfeed.tech/topics/amazon-s3.md>), [Deployment](<https://devfeed.tech/topics/deployment.md>), [Server](<https://devfeed.tech/topics/server.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>)

Tags: [cdn](<https://devfeed.tech/tags/cdn.md>), [close-to-users](<https://devfeed.tech/tags/close-to-users.md>), [deploy-app-servers](<https://devfeed.tech/tags/deploy-app-servers.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [docker](<https://devfeed.tech/tags/docker.md>), [elixir](<https://devfeed.tech/tags/elixir.md>), [fly](<https://devfeed.tech/tags/fly.md>), [fly-io](<https://devfeed.tech/tags/fly-io.md>), [heroku-alternative](<https://devfeed.tech/tags/heroku-alternative.md>), [heroku-competitor](<https://devfeed.tech/tags/heroku-competitor.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [i](<https://devfeed.tech/tags/i.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [networking](<https://devfeed.tech/tags/networking.md>), [object-storage](<https://devfeed.tech/tags/object-storage.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [postgresql-clusters](<https://devfeed.tech/tags/postgresql-clusters.md>), [s3](<https://devfeed.tech/tags/s3.md>), [servers](<https://devfeed.tech/tags/servers.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>)

## AI overview

This article describes a major redesign of Litestream, an open-source tool for making SQLite applications recoverable through continuous replication to S3-compatible object storage. It explains Litestream's original architecture and introduces improvements informed by LiteFS, including faster point-in-time restores.

## Source excerpt

Litestream is an open-source tool that makes it possible to run many kinds of full-stack applications on top of SQLite by making them reliably recoverable from object storage. This is a post about the biggest change we've made to it since I launched it. Nearly a decade ago, I got a bug up my ass. I wanted to build full-stack applications quickly. But the conventional n-tier database design required me to do sysadmin work for each app I shipped. Even the simplest applications depended on heavy-weight database servers like Postgres or MySQL. I wanted to launch apps on SQLite, because SQLite is easy. But SQLite is embedded, not a server, which at the time implied that the data for my application lived (and died) with just one server. So in 2020, I wrote Litestream to fix that. Litestream is a tool that runs alongside a SQLite application. Without changing that running application, it takes over the WAL checkpointing process to continuously stream database updates to an S3-compatible object store. If something happens to the server the app is running on, the whole database can efficiently be restored to a different server. You might lose servers, but you won't lose your data. Litestream worked well. So we got ambitious. A few years later, we built LiteFS. LiteFS takes the ideas in Litestream and refines them, so that we can do read replicas and primary failovers with SQLite. LiteFS gives SQLite the modern deployment story of an n-tier database like Postgres, while keeping the database embedded. We like both LiteFS and Litestream. But Litestream is the more popular project. It's easier to deploy and easier to reason about. There are some good ideas in LiteFS. We'd like Litestream users to benefit from them. So we've taken our LiteFS learnings and applied them to some new features in Litestream. Point-in-time restores, but fast Here's how Litestream was originally designed: you run litestream against a SQLite database, and it opens up a long-lived read transaction. This t