Enabling Automatic Unattended Updates on Lightsail Ubuntu Instance (Running WordPress)

WordPress/AWS Lightsail Playlist: https://www.youtube.com/playlist?list=PLErU2HjQZ_ZMbDcpXu5EcR4yOkHFh_l7F

Open Unattended-upgrades Config for Editing
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
Uncomment These Lines and set to “true”
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true";
Uncomment this to Enable All Updates (Security Updates are Default)
	"${distro_id}:${distro_codename}-updates";
Open Config for Auto-upgrade Config for Editing
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
Add These Lines
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
Check Configuration Changes
sudo unattended-upgrades --dry-run --debug

Leave a comment

Your email address will not be published. Required fields are marked *