Skip to main content
IT BIBLESign in

Forum / Servers / Server Software

Unattended-upgrades on Debian servers: security only, or everything?

PriyaInTheCloset OP
#1

I'm trying to settle on an unattended-upgrades policy for my Debian VMs, and I keep going back and forth.

The default config only applies the security origin. That feels right for anything the family notices when it breaks (DNS, the reverse proxy, Vaultwarden). But it also means regular point-release fixes pile up until I do a manual run, and then I get a big batch at once. Which is the thing I was trying to avoid.

What I'm leaning toward:

  • Security-only automatic upgrades on everything
  • Automatic reboot off, with needrestart flagging what needs it
  • Anything from third-party repos (Docker, Grafana) held back from automation and patched by hand
  • A VM snapshot before the manual batch, not before the automatic ones

The relevant part of my drop-in looks like this:

Unattended-Upgrade::Automatic-Reboot "false";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Mail "root";

What I'm unsure about is the kernel. A security-only kernel update installs fine, but the old kernel keeps running until a reboot, so the box looks patched while it isn't. I haven't found a clean way to alert on "running kernel is older than installed kernel" other than scripting a comparison of uname -r against the newest installed image. Maybe that's fine, and I'm overthinking it.

I also haven't measured how often a security-only update has broken something for me. So far, never. But that's a small sample, and the one time it does will probably be the DNS VM.

How do you handle this on servers people depend on? Do you let unattended-upgrades touch anything beyond security, and how do you deal with pending reboots without just rebooting at 3 a.m. and hoping?

Sign in to reply.