How to set up automatic security updates for Ubuntu Linux?
You need to install the unattended-upgrades package. It will automatically install software updates, including security updates.
Update the server, and run this command:
sudo apt update && sudo apt upgrade
Turn on unattended security updates, and run this command:
sudo dpkg-reconfigure -plow unattended-upgrades
Reference: https://wiki.debian.org/UnattendedUpgrades