Lorixen.
EN

Automatic security updates on your Linux server: check them

Short answer: If your business runs its website or app on a Linux virtual server you manage yourself, security updates won't install themselves unless automatic updates are switched on and working. On Ubuntu, the unattended-upgrades package installs security updates without anyone logging in, and Ubuntu's documentation says it's installed by default with automatic security updates enabled after installation. Check it's actually running, read its logs, decide how reboots are handled, and make sure someone notices when a reboot is pending or an update fails. Managed hosting may already do this for you; ask.

Why this matters for a small business

Many small business sites run on a single virtual server set up by a developer years ago. The website gets attention; the operating system underneath often doesn't. Security fixes for the server's software, such as the web server, OpenSSL or the kernel, are released regularly, and an unpatched server is an easy target.

Automatic security updates close most of that gap with little effort.

What unattended-upgrades does

Ubuntu Server's documentation on automatic updates explains that security updates are applied automatically without user interaction through the unattended-upgrades package. It notes the tool can also:

  • reboot the system if an update requires it,
  • apply other types of updates, not just security ones,
  • block specific packages from ever being upgraded automatically.

The documentation describes the main configuration files:

  • /etc/apt/apt.conf.d/50unattended-upgrades: options such as whether to schedule a reboot and which packages are blocked.
  • /etc/apt/apt.conf.d/20auto-upgrades: whether unattended upgrades are enabled and how often they run.
  • /var/log/unattended-upgrades: detailed logs of each run.

It also warns that simply adding another package repository will not make unattended-upgrades consider it for updates; repositories must be explicitly allowed.

Step 1: Check it's on and working

Ask your developer or log in and check:

  1. The unattended-upgrades package is installed.
  2. 20auto-upgrades enables it.
  3. Recent logs in /var/log/unattended-upgrades show successful runs.
  4. A dry run completes without errors. Debian's manual page for unattended-upgrade describes a --dry-run option that simulates installing updates without doing it, and a --debug option that writes extra detail to the log.

If the logs stopped months ago, find out why. Common causes include a full disk, a broken package or a locked package manager.

Step 2: Decide how to handle reboots

Some updates, especially kernel updates, only take effect after a reboot. Ubuntu's documentation describes the options:

  • Unattended-Upgrade::Automatic-Reboot, which reboots without confirmation at the end of a run if a reboot was requested; the default is false.
  • Unattended-Upgrade::Automatic-Reboot-Time, which schedules that reboot at a specific time instead of immediately.

Choices for a small business:

Approach Pros Cons
Automatic reboot at a quiet time, such as 3:30 am Patches take effect without anyone remembering Short downtime; services must start cleanly after reboot
No automatic reboot, with an alert when one is needed Full control Someone must act, and often doesn't
Managed or live patching services Fewer reboots May cost money or need setup

If you choose automatic reboots, test that your site, database and background workers all come back by themselves after a reboot.

Step 3: Know about service restarts

The Ubuntu documentation notes that many updates don't need a full reboot but do need services restarted to load updated libraries. Make sure your web server, application and database restart cleanly, and that restarts are monitored.

Step 4: Block what must not change automatically

If a particular package must stay on a specific version, for example because your app depends on it, use Unattended-Upgrade::Package-Blacklist. The documentation shows patterns for blocking kernel packages or specific libraries. Use this sparingly, and review blocked packages regularly; a blocked package is an unpatched package.

Step 5: Get notified

  • Configure email or other notifications for update failures and pending reboots.
  • Monitor the website externally so you're alerted if an update or reboot breaks it.
  • Review logs monthly, even if no alert arrives.

Step 6: Plan major upgrades separately

Automatic updates keep a release patched; they don't move you to a new major version. Note your operating system release's support end date and plan the upgrade or rebuild well before it.

Other Linux distributions

The details above are for Ubuntu. Debian uses the same tool; its manual page describes it as downloading and installing security upgrades automatically and unattended, taking care to install only packages from configured sources. Other distributions have their own tools for automatic updates. Whatever your server runs, the same questions apply: is it enabled, is it succeeding, how are reboots handled, and who gets told when something goes wrong? If your developer can't answer those in a sentence each, it's worth an hour to find out.

Write it into your handover notes

Server maintenance tends to be forgotten when developers change. Add a short section to your technical documentation: which operating system and release the server runs, when its support ends, whether automatic security updates are on, the reboot schedule, where the logs are and who receives alerts. That page lets the next person check everything in minutes rather than rediscovering it during an incident.

An illustrative example

A hypothetical Perth tour booking company ran its site on a virtual server built five years earlier. Its new developer found automatic updates had stopped two years before, because the disk filled up and never recovered. After freeing space, the developer confirmed security updates were running again, enabled automatic reboots at 3:30 am local time on Sundays, tested that all services restarted, and set up an uptime monitor and a weekly email summary of update runs.

FAQ

Will automatic updates break my site?

Security updates within a release are designed to be safe, and breakages are rare. Monitoring catches the exceptions.

Do I need this on managed hosting?

Usually the host handles operating system updates. Ask them to confirm.

Does this update WordPress or my app?

No. It updates operating system packages. Your website software needs separate updates.

What about Docker containers?

Containers need their images rebuilt with updated base images; the host's updates don't cover them.

If you're not sure whether your server is getting security updates, ask us for a quick server check.

Sources

WhatsAppBook a call