Stack note

SQLite on my server

What it is

SQLite is a full relational database that lives in a single file, with no server process to install, monitor, or patch. In Node 22 it's built into the runtime (node:sqlite) — this site's entire backend database required zero dependencies.

Why it's on my box

For a site at this scale, SQLite isn't the compromise — it's the correct answer. Newsletter signups and contact messages: all writes fit comfortably in one file that backs up with a single .backup command and restores by copying. No connection strings, no credentials to rotate, no database server to harden. The "own your stack" essay in database form.

How it behaves in practice

  • The good: backups are trivial and consistent (.backup handles concurrent writes); the database is faster than any network database for single-box reads; and the data is a file you can grep, copy, and understand.
  • The honest part: concurrent writers from multiple machines is not its world. The moment your app scales beyond one box writing, you graduate to Postgres — deliberately, with numbers, not by fashion.
  • The rule I follow: WAL mode on, foreign keys on, and a nightly snapshot — three settings, then forget it exists.

Who should use it

Anyone whose database serves one application on one server — which is most personal sites, most small-business tools, and honestly most products.


Affiliate status: none — nothing on this page is sponsored.