Self Host Compass

Getting started

Update Docker containers without breaking things

How do I keep my self-hosted Docker containers updated without breaking things?

The single rule that will save you the most pain when updating self-hosted containers is this: never auto-update anything that has its own database. Everything else about update strategy is detail; that one line prevents the great majority of “I updated and now it’s broken” mornings. The reason is that stateless apps — a reverse proxy, a dashboard, a simple tool — can be swapped for a newer version and, at worst, you roll back and you’re fine. But an app with a database often migrates that database when it starts a new version, sometimes in ways that can’t be cleanly undone, and if that new version has a bug or a breaking change, an automatic update has quietly walked you into it while you weren’t looking.

So the approach that actually works splits your containers into two piles. For the stateless ones, automating updates is genuinely fine and convenient — a tool like Watchtower can pull new images and restart them for you, and if one misbehaves you just pin it back. These are the containers where “keep them current without thinking about it” is the right posture, because there’s no data for an update to mangle. Let the robots handle them.

For anything stateful — a photo library, Nextcloud, a git server, anything holding data you care about — do it by hand, and do it deliberately. That doesn’t mean often; it means consciously. Before updating, take thirty seconds to read the release notes for breaking changes or required migration steps, make sure your backup of that app’s data is current, then pull the new image and bring it up while you’re actually watching. It’s a five-minute ritual, not a chore, and it’s the difference between an update being a routine event and being a disaster you discover hours later.

Two habits make the whole thing safer regardless of which pile a container is in. First, pin to sensible versions rather than always grabbing whatever “latest” happens to be — for stateful apps especially, following a major version deliberately beats being dragged onto a new one unannounced. Second, and you’ve heard it elsewhere on this site for a reason: keep real backups of anything with data, because a good backup turns even a bad update into a ten-minute restore instead of a lost evening. Update stateless things freely, update stateful things on purpose, and keep the safety net under both.