Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
VGSources
Blog

How to Enable Automatic Updates on Ubuntu Server

A practical Ubuntu Server guide to enabling unattended-upgrades, selecting update origins, controlling service restarts and reboots, and monitoring failures.
Length9 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Ubuntu Server normally installs security fixes through unattended-upgrades. To enable or confirm it, install the package if necessary, set both daily APT jobs to 1 in /etc/apt/apt.conf.d/20auto-upgrades (or run sudo dpkg-reconfigure unattended-upgrades), then review the policy in /etc/apt/apt.conf.d/50unattended-upgrades. Security updates are covered by the documented default; ordinary release updates and third-party repositories require deliberate policy changes.

Automatic reboots are off unless you enable them. On Ubuntu 24.04 LTS and later, needrestart automatically restarts affected services by default, but a full reboot may still be the safest way to ensure every process uses updated code.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What Ubuntu Server updates automatically

Ubuntu Server uses the unattended-upgrades package to install packages without an administrator starting each APT transaction. Ubuntu documents this package as installed by default for security updates. If it is missing, install it with:

sudo apt install unattended-upgrades

The default policy is intentionally conservative. It permits the current Ubuntu release’s security pocket and Ubuntu Extended Security Maintenance (ESM) security pockets when those are available. The documented default leaves the regular -updates, -proposed, and -backports origins commented out. In practice, a newly configured server receives security fixes automatically, not every package that happens to be published in the normal release channel.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Three separate decisions control the result:

  • Cadence: how often APT refreshes package lists and evaluates unattended upgrades.
  • Origins: which Ubuntu pockets or repositories are trusted for unattended installation.
  • Restart policy: whether services or the whole host may be restarted after a package changes.

Keeping those decisions separate lets you automate security maintenance while retaining control over compatibility-sensitive application updates.

Check that unattended-upgrades is installed

Most Ubuntu Server installations already contain the package. Verify its presence using your normal package-status method. If the package is absent, install it with the command above. Installing the package alone does not necessarily express your preferred schedule or repository policy, so continue through the configuration steps.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Enable the daily APT jobs

The cadence file is /etc/apt/apt.conf.d/20auto-upgrades. It should contain both settings:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

Ubuntu defines the numeric values as follows:

Value Meaning
0 Disable that action.
1 Run it daily.
2 Run it every two days.

Both lines matter. Updating package lists tells APT to learn about newly published packages; the unattended-upgrade line permits the unattended installation step. Setting only one line can leave the other half of the process disabled.

Use the interactive configuration command instead

Ubuntu also documents this terminal path:

sudo dpkg-reconfigure unattended-upgrades

The command configures the unattended-upgrade choice interactively. After it completes, inspect 20auto-upgrades if you need to confirm the exact cadence values or maintain the server through configuration management.

Understand when the jobs actually run

The daily work is triggered by two systemd timer units: apt-daily.timer and apt-daily-upgrade.timer. Their schedules include a randomized delay. Consequently, “daily” means each day in the timer’s schedule, not a fixed clock time identical on every host.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

If a machine is powered off when a timer would have elapsed, systemd may run the missed job after the machine starts. That catch-up behavior is useful for persistent servers, but it can be surprising on short-lived virtual machines that start only briefly. Administrators of those VMs can override each timer with:

systemctl edit <timer_unit>

In the override, set the timer’s persistence behavior to false:

[Timer]
Persistent=false

Apply that override to both timer units when you do not want an offline interval to trigger an immediate catch-up run. This changes scheduling behavior; it does not broaden the repositories or packages that unattended-upgrades is allowed to install.

Choose which updates are allowed

The update-policy file is /etc/apt/apt.conf.d/50unattended-upgrades. Its Allowed-Origins rules determine which origins unattended-upgrades can use. The documented default includes the current Ubuntu release and its security pocket, together with ESM security pockets when available.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Security-only operation

Security-only operation is the Ubuntu Server default described by Canonical. Canonical’s guidance says Ubuntu Server is configured to download and install new security updates—and only security updates—every day. This is the least surprising policy for production hosts because it limits unattended changes to fixes classified by Ubuntu as security updates.

How the documented timing works

Canonical’s security documentation records two age thresholds (Canonical, 2026): security updates are installed after 24 hours, while normal updates are installed after seven days. The daily timer still controls how often the host checks; the thresholds describe when each class becomes eligible under Canonical’s policy. They are not a guarantee that a package is installed at an exact minute, because timer randomization, repository availability, locks, and the host’s APT state can affect execution.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Update class Documented eligibility timing Default policy status
Security updates After 24 hours (Canonical, 2026) Included by the documented Ubuntu Server policy.
Normal release updates After 7 days (Canonical, 2026) Regular -updates origin is commented out in the documented default.

Adding normal Ubuntu release updates

To include ordinary release updates, add the current release’s -updates origin in a later configuration file under /etc/apt/apt.conf.d/. Evaluate application compatibility and maintenance risk before doing so: the change allows a broader stream of package revisions to install without an approval step. Keep the release codename and origin aligned with the host; do not copy an origin entry intended for a different Ubuntu release.

Proposed and backports pockets

The documented default also leaves -proposed and -backports entries commented out. Do not enable them merely because they appear in the file. They should be considered separate policy decisions, with testing and an explicit reason for accepting their maintenance and compatibility characteristics.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Third-party repositories and PPAs

Adding a repository or PPA to APT does not automatically make unattended-upgrades install from it. A third-party origin requires an explicit, matching Allowed-Origins entry. Approve only repositories that you own or have assessed for signing, support, update cadence, and compatibility with the Ubuntu release running on the server.

Preserve local policy with a drop-in

Do not edit the vendor-provided 50unattended-upgrades file directly when a local change is needed. Create a later-numbered configuration drop-in under /etc/apt/apt.conf.d/ so package upgrades can replace the vendor file without erasing your policy. Keep the local file under configuration management and document why each origin or package exception exists.

Control service restarts and host reboots

Installing a package and making its code available to new processes are different events. A running service can continue using an older library that was already loaded into memory. Decide separately whether unattended-upgrades may restart services and whether it may reboot the host.

Automatic reboot is disabled by default

Ubuntu’s documented default does not reboot automatically. To permit an automatic reboot when an update requests one, set:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Unattended-Upgrade::Automatic-Reboot "true";

Two related settings refine that behavior:

  • Automatic-Reboot-WithUsers controls whether a reboot may occur while users are logged in.
  • Automatic-Reboot-Time lets you choose a clock time, such as 02:00, instead of rebooting immediately when the update requires it.

Place these local settings in a later drop-in rather than modifying the vendor file. A scheduled reboot is still downtime, so coordinate it with your service’s maintenance window, load balancer behavior, and out-of-band access.

Service restarts on Ubuntu 24.04 LTS and later

Starting with Ubuntu 24.04 LTS, needrestart automatically restarts affected services by default. You can add a file under /etc/needrestart/conf.d/ to exclude a critical service or change the restart mode. Use that exception sparingly: blocking a restart prevents an application from receiving the new library until a later manual action.

When a full reboot is still the safest choice

A full reboot is not required for every package update, but it replaces all running processes and reloads the kernel and libraries. Canonical’s Ubuntu Explained guidance puts the trade-off plainly: “The foolproof way to ensure you are running updated versions is to reboot, but this impacts availability.” Treat that as an operational decision rather than assuming every unattended run should reboot.

Kernel updates and Livepatch

Livepatch is an adjacent option, not a replacement for unattended-upgrades. Canonical says Livepatch, included with Ubuntu Pro, can patch the running kernel until the next scheduled reboot. You still need a reboot plan for changes that Livepatch cannot apply and for normal userspace updates.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify that automatic updates are working

After enabling the feature, review:

  • /var/log/unattended-upgrades/unattended-upgrades.log for the unattended transaction record.
  • The related files in /var/log/unattended-upgrades/ for additional runs and error details.
  • The status of the host’s APT and relevant services using the package and service checks appropriate to your operating environment.
  • The timer configuration and last-run information for apt-daily.timer and apt-daily-upgrade.timer.

Look for completed runs, downloaded package metadata, installed packages, held packages, dependency errors, and messages that a reboot or service restart is required. A quiet log is not proof that nothing happened; it may mean no eligible package was available. Conversely, a failed APT transaction can stop later unattended runs until the package state is repaired.

Monitoring is a separate requirement

Canonical warns that unattended-upgrades operates independently on each node and has no built-in fleet monitoring. A configuration that works on one server can therefore fail silently on another. Production monitoring should detect failed APT runs, stale last-success timestamps, unresolved package errors, and hosts waiting for a reboot. Treat those signals as operational alerts, not as reasons to enable broader update origins automatically.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Decide on a policy for production

Use the following choices to make the policy explicit before rolling it across a fleet:

Decision Conservative choice Broader or more automated choice
Package coverage Ubuntu security origins only. Add the release -updates origin after compatibility review; approve other origins individually.
Cadence Daily evaluation with both values set to 1. Set an alternate interval such as 2 for every two days, or disable an action with 0 when a controlled process replaces it.
Reboot Leave automatic reboot disabled and act on the reboot-required signal during a maintenance window. Enable Automatic-Reboot, optionally restrict it to a time such as 02:00, and define logged-in-user behavior.
Service restart Use the Ubuntu 24.04 LTS-and-later needrestart default, with documented exceptions for critical services. Change restart mode or exclusions through /etc/needrestart/conf.d/ when application procedures require manual sequencing.
Repositories Use the official Ubuntu origins included by default. Add explicitly approved PPAs or third-party origins to Allowed-Origins only after review.
Operations Manage a single host with log review and local checks. For a fleet, add external monitoring and configuration management because each node runs independently.

Applications that require migration steps, coordinated restarts, or strict change approval may justify limiting or disabling unattended installation for the affected packages. Ubuntu’s documentation allows administrators to block specific packages or restrict the feature where runtime changes carry unacceptable risk. Keep the security exposure and the manual remediation procedure visible in that exception’s documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot common failures

The package is not installed

Install unattended-upgrades with sudo apt install unattended-upgrades, then configure the cadence and policy files. Recheck the log directory after the next scheduled run rather than assuming installation alone enabled every setting.

The timer ran, but no package was installed

Confirm that both lines in 20auto-upgrades are enabled and that the package origin is allowed. A daily evaluation can legitimately install nothing when no eligible security update is available, when a package is held, or when the update’s eligibility threshold has not been reached.

A server that was powered off updates immediately at startup

This is the documented persistent-timer catch-up behavior. For a short-lived VM where catch-up is undesirable, override both timer units with systemctl edit <timer_unit> and set Persistent=false under [Timer].

A normal Ubuntu update or PPA package was skipped

Check Allowed-Origins. The regular -updates pocket is not enabled in the documented default, and a repository added to APT is not automatically trusted by unattended-upgrades. Add a deliberate, matching origin in a later drop-in only after evaluating compatibility and maintenance risk.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A service still uses old code after the run

Review the unattended-upgrades and related logs for restart notices. On Ubuntu 24.04 LTS and later, inspect needrestart behavior and any exclusions under /etc/needrestart/conf.d/. If a kernel or process-wide update requires it, schedule the full reboot that your availability plan permits.

Unattended runs stopped after an error

Inspect the APT and unattended-upgrades logs for dependency conflicts, interrupted transactions, repository failures, or another process holding the package manager. Canonical notes that a broken APT state can stop unattended-upgrades from working. Repair the package state through your normal change procedure, then verify a successful unattended run and restore monitoring.

Enablement checklist

  1. Confirm the host’s Ubuntu release and maintenance policy.
  2. Verify that unattended-upgrades is installed; install it if absent.
  3. Set APT::Periodic::Update-Package-Lists and APT::Periodic::Unattended-Upgrade to "1" in 20auto-upgrades, or use sudo dpkg-reconfigure unattended-upgrades.
  4. Review Allowed-Origins in 50unattended-upgrades; keep security-only coverage unless you have approved broader origins.
  5. Put local origin, package, reboot, and restart changes in later drop-in files, not in the vendor file.
  6. Choose whether reboots remain manual, occur in a maintenance window, or are enabled automatically.
  7. Check the apt-daily timers, randomized scheduling, and any desired catch-up behavior.
  8. Review /var/log/unattended-upgrades/ after the first run.
  9. Configure alerts for failed runs, stale activity, broken APT state, and reboot-required conditions.
  10. Document exceptions for applications that cannot safely accept unattended runtime changes.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.