sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades # enable
systemctl status unattended-upgrades
sudo unattended-upgrade --dry-run --debug # see what it would do
cat /var/log/unattended-upgrades/unattended-upgrades.log
Settings live in /etc/apt/apt.conf.d/50unattended-upgrades (which origins are allowed, Unattended-Upgrade::Automatic-Reboot, the reboot time) and 20auto-upgrades (how often). Kernel updates need a reboot: /var/run/reboot-required exists when one is pending. Automatic reboots are off by default; turn them on only if the service can tolerate a restart.