Docs / Server Management / How to Set Up Automatic Security Updates

How to Set Up Automatic Security Updates

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 216 views · 1 min read

Automatic security updates keep your server patched without manual intervention.

Ubuntu / Debian

apt install unattended-upgrades -y
dpkg-reconfigure -plow unattended-upgrades

The default configuration only installs security updates, which is the safest option.

Verify It's Working

systemctl status unattended-upgrades

AlmaLinux / Rocky Linux

dnf install dnf-automatic -y
systemctl enable --now dnf-automatic-install.timer

Configuration

On Ubuntu, edit /etc/apt/apt.conf.d/50unattended-upgrades to customize which packages are auto-updated and configure email notifications.

Was this article helpful?