Guide
7 min read

Homelab Database Sprawl: The Problem That Arrives After Docker App Sprawl

Every self-hosted app ships its own Postgres or MySQL, and soon you're running eight database containers you can't name. How to consolidate without coupling apps together.

Homelab Database Sprawl: The Problem That Arrives After Docker App Sprawl

You solved Docker app sprawl — everything's in Compose, everything starts on boot. Then you count the database containers and there are nine: a Postgres for Immich, another for a different app pinned to an older major version, two MariaDBs, a Mongo you forgot about, and a Redis per app. Each one has its own volume, its own backup story (or none), and its own memory footprint. That's database sprawl, and it's the second-order cost of one-Compose-file-per-app.

Why it happens — and why it's not automatically bad

Apps bundle a database so they "just work." That's a feature for getting started and a liability at scale: every engine is a thing to patch, back up, and keep from eating RAM. But the naive fix — "one big shared database for everything" — can be worse, because it couples unrelated apps: now an upgrade for one app's schema requires a database version another app can't run on.

The goal isn't one database. It's fewer, deliberate databases.

When to share an instance

Sharing one Postgres instance with separate databases/roles per app is the sweet spot when:

  • The apps tolerate the same major version (check each app's supported range first).
  • You want one place to tune memory, one backup job, one monitoring target.
  • The apps aren't so critical that you need independent blast radius.

Create a database and a least-privilege role per app on the shared instance. You get consolidation without the apps sharing tables or users.

When to keep them isolated

Keep a dedicated database container when:

  • The app pins a specific (often older) engine version that would block others.
  • It's your most critical data and you want it to fail and upgrade independently.
  • The engine differs (don't try to make one box be Postgres, MySQL, and Mongo — run the engine each app actually needs).

Tame the sprawl you keep

For whatever set you land on:

  • Pin and record versions. An app and its database major version are a unit; write it down so an upgrade doesn't surprise you (the same discipline that prevents Compose drift).
  • One backup strategy, every engine. Logical dumps on a schedule, shipped off-box, with a tested restore. Snapshots of the volume are a bonus, not the plan.
  • Cap memory per engine so a runaway query can't starve the host — same logic as sizing self-hosted AI and search apps.

Deploy databases as first-class apps, not afterthoughts

Treating the database as a managed app — with its own template, volume, and version — beats letting it ride along invisibly inside another app's Compose file.

ServerCompass selecting the PostgreSQL template from its app catalog Standing up a shared PostgreSQL as its own managed service in ServerCompass — explicit version, volume, and backup target instead of a database buried inside an app stack.

See every engine in one place

The reason sprawl hurts is that it's invisible until something breaks. A single view of which databases exist, their versions, disk, and backup status turns "I think nine?" into a list you can act on — pair it with one dashboard for app health.

Takeaway

Database sprawl is the predictable sequel to app sprawl. Don't collapse to one shared everything, and don't keep nine. Share a single well-tuned instance where versions align, isolate the few that genuinely need it, and give the whole set one backup story you've actually tested.

postgresql
mariadb
databases
docker
homelab

From across the StoicSoft network

Hand-curated reads on the same topic from sister sites in the StoicSoft family.

Keep reading

Guide
8 min

Container monitoring is moving from uptime dashboards to egress policy, backup-state widgets, and service-level proof

Fresh self-hosting posts point to a more specific monitoring need than simple green/red uptime. One homelab user running rootless Podman quadlet services wants per-container outbound blocking, domain allowlists, and traffic visibility but cannot see how to…

Guide
6 min

Splitting App Storage from Bulk Storage on a NAS-plus-Mini-PC Homelab

The NAS-plus-mini-PC combo only stays fast and reliable if you decide early what lives on the SSD and what lives on the spinning pool. A clear split before Docker piles up.

Guide
8 min

Stop Exposing the Docker Socket: Safer Management Boundaries for a Homelab

Publishing the Docker socket to your LAN is handing out root on the whole box. Here are safer boundaries: SSH contexts, a scoped socket proxy, and real network segmentation.

Guide

First-time NAS builds need appdata, backup, and OS-placement guardrails before services pile up

Before your first NAS box even arrives, a handful of structural decisions will determine whether your homelab stays manageable or becomes a recovery project. Get OS placement, appdata protection, and backup tiers sorted upfront and the rest is incremental.

Guide

Hybrid gaming PCs turned home servers need a safe host and VM boundary before Docker apps go 24/7

Running a gaming PC and a 24/7 home server on the same hardware is possible, but only if you decide up front which layer owns the host, the GPU, power management, and Docker. Getting that boundary wrong means your game sessions interrupt your services — or your services prevent clean shutdowns.

Guide

Homelab consolidation decisions now mix electricity costs, Immich storage, and future migration risk

Running multiple rack servers or stacking new services on aging hardware is forcing self-hosters to weigh power bills, storage safety, and the hidden cost of migrating everything later. Here is how to think through the decision before you buy or consolidate.