How to enable automatic security updates
Updated 11/29/2026
Most breaches exploit old vulnerabilities that already have a patch. Automatic security updates keep you protected with no effort.
1. Install
apt-get update -y
apt-get install -y unattended-upgrades
2. Enable
dpkg-reconfigure --priority=low unattended-upgrades
Choose "Yes" when asked about automatically installing security updates.
3. Check the configuration
In /etc/apt/apt.conf.d/50unattended-upgrades you can also enable automatic reboots (useful for kernel patches):
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "04:00";
4. Test manually
unattended-upgrade --dry-run --debug
Note
For critical production servers, test updates first on a staging server. With hourly billing you can spin up a temporary test server and delete it right after.
Put this guide into practice on your own VPS
EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.
See pricingRelated tutorials
Single sign-on for your applications with authentik
One account for all your team's apps: first sign-in, users, an OpenID Connect application and two-factor authentication.
Updated 11/29/2026SecurityPasswordless sign-in with Pocket ID
Passkeys for your applications over OpenID Connect: first sign-in, colleagues and connecting an application.
Updated 11/29/2026SecurityHow to protect your server from brute-force attacks with fail2ban
fail2ban automatically bans IPs that repeatedly try wrong passwords. Here is how to install and configure it.
Updated 11/29/2026