← Blog · 01 Sep 2026
Ubuntu Security Updates: Turn On Automatic Patching
Unpatched software is the most common way servers get hacked. Ubuntu can install security fixes by itself.
Set it up
sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
This installs only the security pocket by default, which is low risk.
Useful settings
Edit /etc/apt/apt.conf.d/50unattended-upgrades:
Unattended-Upgrade::Mail "you@example.com";to get a report.Unattended-Upgrade::Automatic-Reboot "true";andAutomatic-Reboot-Time "03:30";so kernel updates apply at night.Unattended-Upgrade::Remove-Unused-Dependencies "true";
Check it works
sudo unattended-upgrade --dry-run --debug
cat /var/log/unattended-upgrades/unattended-upgrades.log
Do not forget
- Live kernel patching (Ubuntu Pro) avoids reboots for supported setups.
- Control panels such as CWP or cPanel update their own software; keep their auto-update on too.
- Keep backups. Updates are safe, but backups are your real insurance.