Skip to content

run firmware-upgrade

ndcli run firmware-upgrade upgrades the OPNsense firmware on managed firewall devices. It supports two upgrade modes and a split-apply strategy that lets you deliver package updates without any reboot, deferring only the base system and kernel to a scheduled maintenance window.

Terminal window
ndcli run firmware-upgrade --device <name> --mode minor|major [flags] <target-flags> [--at <time>] [--schedule <name>]
FlagRequiredDefaultDescription
--modeYesUpgrade mode: minor or major (see Upgrade modes)
--reboot / --no-rebootNo--rebootWhether to include a reboot. --no-reboot applies only reboot-free packages; base/kernel are left pending until a subsequent upgrade run without --no-reboot. See Split-apply. Rejected for major — major upgrades always reboot.
--dry-runNofalseCreate a preview task without installing anything. Inspect the result with ndcli task describe <code>.

Inherited from ndcli run. At least one is required.

FlagRepeatableDescription
--device <name>YesTarget a specific device by name
--ou <name>YesTarget every enabled device in the OU
--orgNoTarget every enabled device in the organization
FlagDescription
--at <time>Defer a one-time upgrade to a future instant. Accepts relative offsets (2h, 1d) or timestamps. See run scheduling.
--schedule <name>Attach the upgrade to a named recurring schedule.

minor — point release within the same series

Section titled “minor — point release within the same series”

Upgrades within the currently installed series. For example, a device running 26.1.2 with --mode minor upgrades to the latest available 26.1.x release. It cannot move to 26.7 or 27.x.

Minor upgrades support --no-reboot (see Split-apply).

Upgrades across a major OPNsense series boundary. For example, 25.1 → 25.7, or 25.7 → 26.1.

Major upgrades always require a reboot and always apply the full package set in a single pass. The --no-reboot flag is rejected for major mode.

When you pass --no-reboot to a minor upgrade, the platform applies only the packages that do not require a reboot — application-layer packages and plugins. Base and kernel packages are not installed; they remain at the current version until a subsequent upgrade run that includes a reboot.

The product_version reported by the device does not advance until base and kernel are applied. To complete the upgrade, run the same command without --no-reboot (or schedule ndcli run firmware-upgrade --mode minor for a maintenance window). That run installs the remaining base/kernel packages and reboots the device.

After a --no-reboot run the device enters a mixed state: application packages are at the new version, base/kernel are not yet upgraded. This state is visible on the device detail page in the web console (see Mixed state) and in ndcli device describe.

Split-apply lets you run minor firmware maintenance on a daily or continuous basis — keeping application packages current with zero downtime — while isolating base/kernel reboots to a separate, explicitly scheduled window.

When a device has base/kernel packages pending, its firmware status shows as Update pending reboot. The device operates normally. To complete the upgrade and clear the mixed state, run a minor upgrade with reboot (the default):

Terminal window
ndcli run firmware-upgrade --mode minor --device fw-prod-01 --at "2026-07-01 03:00"

--dry-run creates a task that runs a preview on the device without installing anything. The command returns a task code immediately; the result is available via ndcli task describe <code> once the task completes.

Terminal window
ndcli run firmware-upgrade --device fw-prod-01 --mode minor --dry-run
ndcli task describe <code>

The Firmware upgrade result block in the task output:

Firmware upgrade result:
Preview: yes (dry-run — nothing was installed)
Mode: minor
Version: 26.1.2 → 26.1.9
Packages: 66 to apply
Terminal window
# Minor upgrade — latest point release in the series, with reboot (default)
ndcli run firmware-upgrade --mode minor --device fw-prod-01
# Minor upgrade — no-reboot (only reboot-free packages applied; base/kernel left pending)
ndcli run firmware-upgrade --mode minor --no-reboot --device fw-prod-01
# Minor upgrade — deferred to a maintenance window
ndcli run firmware-upgrade --mode minor --device fw-prod-01 --at "2026-07-01 03:00"
# Major upgrade — series jump, always reboots
ndcli run firmware-upgrade --mode major --device fw-prod-01 --at "2026-07-01 04:00"
# Dry run across an OU — preview before committing
ndcli run firmware-upgrade --mode minor --dry-run --ou edge-routers
# Recurring daily no-reboot minor upgrade (run against the whole org)
ndcli run firmware-upgrade --mode minor --no-reboot --org --schedule daily-patch
# Recurring monthly minor upgrade with reboot (for base/kernel)
ndcli run firmware-upgrade --mode minor --org --schedule monthly-reboot-window
# Recurring semi-annual major upgrade
ndcli run firmware-upgrade --mode major --org --schedule semi-annual-major

A common pattern is three overlapping schedules:

ScheduleModeRebootCadenceEffect
daily-patchminor--no-rebootDailyKeeps application packages current with zero downtime
monthly-reboot-windowminor(default)MonthlyApplies pending base/kernel, clears mixed state
semi-annual-majormajor(always)Semi-annualJumps the OPNsense series

This layered approach means most devices are never more than a day behind on application packages, while base and kernel updates are batched into a monthly window — and major series upgrades happen on a predictable six-month cycle.

Each device targeted produces one task. Inspect it with:

Terminal window
ndcli task list --type FIRMWARE_UPGRADE
ndcli task describe <code>

The Firmware upgrade result block in ndcli task describe shows the outcome. Examples for each scenario:

Minor with reboot (default):

Firmware upgrade result:
Mode: minor
Version: 26.1.2 → 26.1.9
Packages: 116 applied
Rebooted: yes
Applied: yes

Minor with --no-reboot (split-apply):

Firmware upgrade result:
Mode: minor
Version: 26.1.2 → 26.1.9
Packages: 116 applied
Pending: base/kernel deferred — reboot required to complete upgrade
Rebooted: no
Applied: yes

The product_version on the device does not advance until a subsequent run applies base/kernel with a reboot.

Dry run:

Firmware upgrade result:
Preview: yes (dry-run — nothing was installed)
Mode: minor
Version: 26.1.2 → 26.1.9
Packages: 66 to apply