Fedora Automatic Updates / unattended updates (for server)

Hi there,

I’m trying to do the equivalent of Ubuntu’s automatic security updates on Fedora Server (also known as unattended updates).

I think our Fedora automatic updates docs and the dnf-automatic docs are missing an important point currently: how to configure sudo nano /etc/dnf/automatic.conf. My install only contains upgrade_type = default which isn’t a valid.

These 3 steps are already in the Fedora automatic updates docs:

  1. sudo dnf install dnf-automatic
  2. systemctl enable --now dnf-automatic.timer
  3. configure sudo nano /etc/dnf/automatic.conf - doesn’t say how though.

I think we should add a “default config” (below) as step 4, which a user can then customize:

[commands]
apply_updates = yes  # Apply updates automatically
reboot = when-needed  # Reboot only if necessary
reboot_command = "/usr/bin/systemctl reboot"  # Command to reboot the system

[emitters]
system_name = Fedora
emit_via = stdio  # You can use 'email', 'motd', etc.

[download]
download_updates = yes  # Download updates automatically

[upgrade]
upgrade_type = default  # Use 'default' for all updates, or 'security' for security-only updates

What do you think?

The linked documentation is for DNF4.
You are expected to use DNF5 starting with Fedora 41:
Unable to install dnf-automatic - #2 by vgaetera

Thanks @vgaetera ! In your comment file the config file is also pretty much unset though - my point above was more that we should add a non-empty config file either on dnf-automatic install or in the documentation, like Ubuntu does. What do you think?

This follows the modern paradigm of provisioning:

  • /usr - default configs
  • /etc - incremental customization

You can find specific paths in the relevant manual:

The Fedora documentation is often outdated and incomplete.
Personally, I don’t recommend to rely on it too much.