How to Enable Automatic Security Updates in Ubuntu
Many compromised servers aren't taken down by unknown vulnerabilities, but by patches that had been available for weeks and that no one installed. Ubuntu and Debian include unattended-upgrades, which installs security updates for you every day. When configured properly, it saves you that work without giving you any surprises.