benbjohnson/litestream-skills/litestream
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
SQLite disaster recovery and streaming replication to cloud storage (S3, GCS, Azure, SFTP, NATS). Use this skill for configuring Litestream, deploying to cloud platforms, troubleshooting WAL replication issues, implementing point-in-time recovery, and setting up VFS read replicas.
Install
npx vskill@latest install benbjohnson/litestream-skills/litestreamSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Litestream
Litestream is a disaster recovery tool for SQLite that runs as a background process, continuously replicating database changes to cloud storage. It monitors the SQLite Write-Ahead Log (WAL), converts changes to immutable LTX files, and uploads them to your chosen storage backend.
Key Concepts
- WAL Monitoring: Watches SQLite Write-Ahead Log for changes at configurable intervals (default 1s)
- LTX Files: Immutable files containing database page changes, never modified after creation
- Level-Based Compaction: Multi-level system (L0-L9) that merges LTX files to reduce storage overhead
- Point-in-Time Recovery: Restore to any transaction using TXID or timestamp
- VFS Support: Read replicas directly from cloud storage without local database copy
- MCP Server: AI tool integration for automated database management
Quick Start
Installation
Basic Replication
Restore Database
Check Status
Critical Rules
These rules are essential for correct Litestream operation:
- Lock Page at 1GB: SQLite reserves the page at offset 0x40000000 (1GB). This page must always be skipped during replication and compaction. The page number varies by page size:
- 4KB pages: page 262145
- 8KB pages: page 131073
- 16KB pages: page 65537
- LTX Files are Immutable: Once created, LTX files are never modified. New changes create new files.
- Single Replica per Database: Each database can only replicate to one destination. Use multiple Litestream instances for multiple destinations.
- WAL Mode Required: SQLite must be in WAL mode (
PRAGMA journal_mode=WAL;)
- Use `litestream ltx`: The
litestream walcommand is deprecated.
Storage Backends
| Backend | URL Scheme | Example | |
|---|---|---|---|
| AWS S3 | s3:// | s3://bucket/path | |
| S3-Compatible (R2, Tigris, MinIO) | s3:// | s3://bucket/path?endpoint=host:port | |
| Google Cloud Storage | gs:// | gs://bucket/path | |
| Azure Blob Storage | abs:// | abs://container@account/path | |
| SFTP | sftp:// | sftp://user@host:22/path | |
| NATS JetStream | nats:// | nats://host:4222/bucket | |
| WebDAV | webdav:// | webdav://host/path | |
| Alibaba OSS | oss:// | oss://bucket/path | |
| Local File | (path) | /var/backups/db |
Configuration File Example
When to Use This Skill
Use Litestream skill when:
- Configuring SQLite database replication to cloud storage
- Setting up disaster recovery for SQLite applications
- Troubleshooting replication issues (WAL growth, sync failures)
- Implementing point-in-time recovery procedures
- Deploying Litestream with Docker, Fly.io, Kubernetes, or systemd
- Understanding WAL-based replication concepts
Skill Contents
concepts/- Architecture, replication mechanics, LTX format, SQLite WAL, VFS support, compactionconfiguration/- Storage backend configurations (S3, GCS, Azure, SFTP, NATS, OSS, WebDAV, File)commands/- CLI command reference (replicate, restore, status, ltx, databases)operations/- Monitoring, troubleshooting, recovery, and heartbeat monitoringdeployment/- Docker, Fly.io, Kubernetes, and systemd deployment guidesintegrations/- MCP server integration for AI toolsscripts/- Validation and diagnostic helper scripts
Common Issues
WAL Growing Too Large
- Check sync interval (default 1s may be too slow for write-heavy workloads)
- Verify storage backend connectivity
- Check for checkpoint blocking (long-running transactions)
Replication Lag
- Monitor with
litestream status - Check network connectivity to storage backend
- Review sync interval configuration
Restore Failures
- Verify backup exists:
litestream ltx /path/to/db - Check storage backend credentials
- Ensure target directory is writable
Links
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/litestream/SKILL.md
Popularity
- Repository stars
- 5
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/benbjohnson/litestream-skills/litestream)