Automatic Docker Maintenance & Health Log
A nightly, safe cleanup of stopped containers and old image layers, plus a standing health snapshot — installed automatically, no setup required.
Every deploy leaves something behind: a stopped container from the previous version, an old image layer, stale build cache. Left unchecked over weeks of normal use, that's exactly the kind of slow disk-fill that turns into a 2am "server is out of space" problem — the kind of DevOps busywork DeployOS exists to remove.
What it does
A single daily job, installed on the server itself (not in the desktop app, so it runs whether or not DeployOS is open):
docker container prune— removes stopped containers.docker image prune— removes dangling (untagged) image layers left behind by builds.docker builder prune— clears build cache older than 3 days.- Appends one line to a health log: how many containers are up, how many are unhealthy, how many are stuck restarting.
It runs once a day, at 3am server time.
What it deliberately never touches
- The tagged
deployos-<app>:<commit>images kept for instant rollback — pruning only ever targets dangling (untagged) images, never anything with a name, so your last few rollback targets are always safe. - Volumes or any app data.
- Running containers.
When it turns on
Automatically — there's no separate toggle or step. It's installed the moment a server is either:
- Bootstrapped (a brand-new server), or
- Adopted — via Scan and "Adopt everything", which means a server that was already running apps before it ever touched DeployOS gets the same nightly cleanup as one that started with DeployOS from day one.
It's safe to trigger either of those again later (re-running Bootstrap, or re-scanning and adopting) — the install step checks for its own marker first, so it's never added twice.
Where to see it
Open Scan on a server (Servers → the server's ··· menu → Scan, or the Discover page). Under Automatic Docker maintenance you'll see the last 20 daily snapshots once the job has run at least once — right after adopting or bootstrapping, this will say "not running yet" until the next 3am.
What this isn't (yet)
This is monitoring-and-cleaning, not monitoring-with-alerts — there's currently no Slack/email/webhook delivery wired up in DeployOS, so an unhealthy container won't page you. For an active check right now, use Running the Doctor on the app, or watch Monitoring & Metrics while the app is open. If you want the health log to actually notify you when something's wrong, that's a natural next step — worth asking for if it matters to you.
Next: Server Snapshots & Wipe for manual, on-demand server maintenance, or Running the Doctor for diagnosing a specific app.