Quick answer
How to enable automatic security updates?
To enable automatic security updates on Debian or Ubuntu, install unattended-upgrades, turn it on with dpkg-reconfigure, check that 20auto-upgrades sets both daily values to 1, and test with unattended-upgrade -v --dry-run. On an IronKVM VPS running Debian 13 or Ubuntu 24.04, it takes 6 steps and runs every day.
In brief
- unattended-upgrades installs updates from the origins its config allows, once a day.
- /etc/apt/apt.conf.d/20auto-upgrades turns the daily list update and the upgrade run on.
- Put your changes in a local copy, such as 52unattended-upgrades-local, not in the shipped file.
- Automatic reboots are off by default; set Automatic-Reboot and a time if you want them.
- Logs are in /var/log/unattended-upgrades and /var/log/dpkg.log.
Which settings control automatic updates?
| Setting | File | Default | This guide |
|---|---|---|---|
| APT::Periodic::Update-Package-Lists | 20auto-upgrades | "1" once enabled | "1" |
| APT::Periodic::Unattended-Upgrade | 20auto-upgrades | "1" once enabled | "1" |
| Unattended-Upgrade::Automatic-Reboot | 52unattended-upgrades-local | "false" | "true" |
| Unattended-Upgrade::Automatic-Reboot-Time | 52unattended-upgrades-local | "now" | "04:00" |
What are the steps to enable automatic security updates?
Install the package
Install unattended-upgrades with apt. Many images already have it.
Turn it on
Run dpkg-reconfigure unattended-upgrades and answer yes to automatic stable updates.
Check 20auto-upgrades
Both APT::Periodic lines must be "1".
Add a local override
Copy 50unattended-upgrades to 52unattended-upgrades-local and edit only the copy.
Choose a reboot policy
Set Automatic-Reboot to true and a quiet time, or keep it off and reboot by hand.
Test and read the logs
Run unattended-upgrade -v --dry-run, then check /var/log/unattended-upgrades after the next night.
sudo apt install unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades
cat /etc/apt/apt.conf.d/20auto-upgrades
# expected:
# APT::Periodic::Update-Package-Lists "1";
# APT::Periodic::Unattended-Upgrade "1";sudo cp /etc/apt/apt.conf.d/50unattended-upgrades /etc/apt/apt.conf.d/52unattended-upgrades-local
# then set these two lines in the copy:
# Unattended-Upgrade::Automatic-Reboot "true";
# Unattended-Upgrade::Automatic-Reboot-Time "04:00";
sudo unattended-upgrade -v --dry-run
ls /var/log/unattended-upgrades/Which updates does unattended-upgrades install?
Only packages from the origins listed in its config. Ubuntu documentation shows the default Allowed-Origins: the release itself, its -security pocket and the ESM security pockets. Debian ships its own default file. Read it once before changing anything.
Keeping the default is the best choice for most servers. Security fixes arrive daily, and larger changes wait for you. The Debian wiki advises copying the file to a local name and editing the copy, so package upgrades never overwrite your settings.
Should a VPS reboot on its own after updates?
Yes for a single server without a maintenance window; choose a quiet hour. Kernel and core library fixes only apply after a reboot. Ubuntu documentation says Automatic-Reboot defaults to false. When set to true, the system reboots without confirmation after an update run that requests it. Automatic-Reboot-Time takes "now", an hh:mm time or a +m offset.
A reboot takes the server offline for a short time. Services must start on boot: check with systemctl is-enabled nginx and the like. If you prefer to reboot yourself, keep it off and reboot after a weekly look at the logs. A reboot from the dashboard is also possible; the reboot and reinstall guide explains it.
Where do automatic updates fit in VPS security?
They are the step that keeps working after you stop paying attention. Keys, a firewall and fail2ban close doors once; updates fix new flaws every week. The offshore VPS security guide lists all eight steps in order.
An update can also break something. Keep backups on another machine so a bad night costs minutes, not data. No plan includes backups: keep a copy of anything that matters outside the VPS.
Updates cost nothing on top of the plan. According to IronKVM's survey of 16 November 2026, plans comparable to Billet cost a median of $15.00 a month across 23 hosts; IronKVM Billet costs $4.46 on 12 months.
Automatic security updates: questions
Are automatic updates safe on a production VPS?
Security-only origins rarely break things. Pair them with backups and a log check.
How do I see what was updated?
Read the files in /var/log/unattended-upgrades and /var/log/dpkg.log.
Does this work on AlmaLinux or Rocky Linux?
Not this package. Those systems use dnf-automatic instead; this guide covers Debian and Ubuntu.
What is the best reboot time for automatic updates?
The hour with the least traffic for your visitors, in the server’s time zone.
Does IronKVM update my system for me?
No. The team handles reboot and reinstall requests; packages inside the VPS are yours to update.
Verdict
- Install, enable, check 20auto-upgrades, override locally, test: security fixes then arrive every day.
- Turn automatic reboots on for a single VPS, at a quiet hour, and keep backups for the rare bad update.
Sources (3)
- Automatic updates — Canonical (read 2026-11-16)
- UnattendedUpgrades — Debian (read 2026-11-16)
- IronKVM offshore VPS survey (CSV) — IronKVM (read 2026-11-16)
Order a Debian or Ubuntu VPS
Billet, 1 vCPU, 2 GB RAM, 40 GB NVMe, 2 TB traffic, $4.46 a month on 12 months.