When I deployed Open WebUI on my K3s cluster, the default database backend was SQLite. It works fine — SQLite is an excellent database. But I chose to run PostgreSQL instead, and here is why.
The Easy Path vs The Production Path
SQLite stores everything in a single file. No separate service, no connection strings, no backup strategy to think about. For a personal tool, it is genuinely the pragmatic choice.
But my homelab runs on production patterns, not shortcuts. Running PostgreSQL meant I had to:
- Deploy CloudNativePG as a Kubernetes operator
- Configure persistent volumes with Longhorn
- Set up automated backups
- Handle connection pooling
- Think about high availability (even if I do not need it yet)
Each of those is a decision a production system has to make anyway.
The ReadWriteOnce Problem
There is also a practical reason. SQLite needs a single-writer lock on its database file, which means the volume must be ReadWriteOnce. This locks you into running exactly one replica of your application. With PostgreSQL, the database is a separate service — your application pods can scale horizontally without fighting over a file lock.
A homelab is not about building the simplest thing. It is about building it the way production would.
Was It Worth It?
Absolutely. With CloudNativePG, StatefulSets, PVC lifecycle and operator patterns are part of day-to-day operations here, not theory.