# LiteFS

> A FUSE-based file system for replicating SQLite databases across a cluster of machines, intercepting writes to detect transaction boundaries and record changes in LTX files.

LiteFS is an open-source, FUSE-based file system built by Fly.io (superfly) for replicating SQLite databases across a cluster of machines. It works as a passthrough file system that intercepts writes to SQLite databases in order to detect transaction boundaries and record changes on a per-transaction level in LTX files. The project is written in Go, licensed under Apache 2.0, and is actively maintained while currently in a beta state.

## What It Is

LiteFS sits in the distributed systems category, specifically targeting the problem of SQLite replication — a challenge that arises when applications using SQLite need to scale across multiple nodes. Rather than replacing SQLite with a client-server database, LiteFS lets applications keep using SQLite as-is while transparently handling replication at the file system level. It intercepts file system calls via FUSE (Filesystem in Userspace), identifies transaction boundaries, and propagates those changes to other nodes in the cluster using its own LTX (LiteFS Transaction) file format.

## How It Works Architecturally

LiteFS operates as a passthrough file system layer between the application and the underlying storage. Key architectural points include:

- **FUSE interception**: All reads and writes to SQLite database files go through LiteFS, which monitors for SQLite write-ahead log (WAL) transaction commits.
- **LTX files**: Changes are recorded at the transaction level in LTX files, a format developed alongside LiteFS in the companion `superfly/ltx` repository.
- **Cluster replication**: LTX files are distributed to replica nodes in the cluster, keeping all nodes in sync.
- **Passthrough design**: Applications do not need to be modified; they continue to use standard SQLite APIs.

A detailed design document (`ARCHITECTURE.md`) is available in the repository's `docs/` directory for deeper technical reference.

## Current Status: Beta (v0.5.14)

The GitHub repository badges the project as **beta** status. The latest release is **v0.5.14**, published on April 22, 2025. The repository was last pushed to in May 2026, indicating active maintenance. The project has accumulated over 4,700 stars and 120 forks on GitHub. Known limitations include incomplete database deletion support, which causes failures in portions of the SQLite TCL test suite — passing that test suite is listed as a stated goal for the project.

## Setup and Deployment Path

LiteFS is deployed as a file system layer on Linux nodes. The official Getting Started guide is hosted on Fly.io's documentation site at `fly.io/docs/litefs/`. Because it relies on FUSE, deployment requires the `/dev/fuse` device and `SYS_ADMIN` capability, which is reflected in the Docker test runner instructions in the README. It is particularly well-suited for deployment on Fly.io's platform, though it is not restricted to that environment.

## Contributing and Development

The project follows a structured contribution model. Small bug fixes and typo corrections can be submitted directly as pull requests to the main repository. Feature contributions follow a discussion-first process: open an issue, implement on a fork, then link the pull request in the issue for consideration. This approach reflects the project's roadmap-driven development, where features are added and tested in a deliberate order.

## Features
- FUSE-based passthrough file system for SQLite replication
- Per-transaction change recording using LTX files
- Cluster-wide SQLite database replication
- No application code changes required
- Transaction boundary detection via write interception
- Docker-based test isolation support
- Apache 2.0 open-source license

## Integrations
SQLite, FUSE (Filesystem in Userspace), Docker, Fly.io

## Platforms
LINUX, CLI

## Pricing
Open Source

## Version
v0.5.14

## Links
- Website: https://github.com/superfly/litefs
- Documentation: https://fly.io/docs/litefs/
- Repository: https://github.com/superfly/litefs
- EveryDev.ai: https://www.everydev.ai/tools/litefs
