Devlog·SEP 30, 2026·12 MIN READ
Serverless Content Sync: How I Made SQLite Survive Vercel Cold Starts
Vercel's /tmp is ephemeral — every cold start wipes your SQLite database. Here's how I bridged the gap using GitHub as a durable store with the Contents API, syncing content in and out on every request without adding infrastructure.
// sync: GitHub → SQLite on every cold start
await syncFromGitHub();
const content = getPublishedContent();
// ... serve the request
// sync: SQLite → GitHub after every write
await syncToGitHub();Vercel's /tmp is ephemeral — every cold start wipes your SQLite database. I bridged the gap using GitHub as a durable store with the Contents API.
The problem Serverless functions are stateless. SQLite needs a filesystem. On Vercel, /tmp gets wiped on every cold start.
The solution Use GitHub's Contents API as the durable store. Sync in on cold start, sync out after writes.
// sync: GitHub → SQLite on every cold start
await syncFromGitHub();
const content = getPublishedContent();
// ... serve the request
// sync: SQLite → GitHub after every write
await syncToGitHub();
The tradeoff Latency goes up slightly on cold starts. Durability goes up massively. No extra infrastructure.
VERCELSQLITEGITHUB API