Automatic security updates keep your server patched without manual intervention.
Ubuntu / Debian
apt install unattended-upgrades -y
dpkg-reconfigure -plow unattended-upgradesThe default configuration only installs security updates, which is the safest option.
Verify It's Working
systemctl status unattended-upgradesAlmaLinux / Rocky Linux
dnf install dnf-automatic -y
systemctl enable --now dnf-automatic-install.timerConfiguration
On Ubuntu, edit /etc/apt/apt.conf.d/50unattended-upgrades to customize which packages are auto-updated and configure email notifications.