Updating MikroTik RouterOS

- You update using ssh / Winbox ⇢ New terminal using:

- Or from Winbox, press System ⇢ Packages ⇢ Check For Updates ⇢ Download&Install

- To manually update, you simply download the new software and with the mouse/pad drag the file to the Winbox file window. Then you reboot, and RouterOS automatically discovers the software and installs it before starting up. For home devices, put the software in the flash folder, otherwise it will be deleted at reboot. Be sure that you use the software version that matches your MikroTik devices chipset. The chipset is shown in parentheses in the top of the Winbox window, after the routers identity (name) - using the wrong chipset software might brick your router.

- You can use Netinstall.

- If you have many MikroTik devices you need to manage and update, you can use The Dude to update them in batches.

- Or you can add the different RouterOS images you want to use on a master MikroTik router, and set the other routers to use that router as the upgrade central.

See Winbox: System ⇢ Auto upgrade or use /system upgrade print

- You can script the updating, from your own proxy server, here is an example - also check the Wiki about scheduler.

Scheduled updating

If you want your router to update during the night, you can edit the date and use this script:

This script will run each night and check if newrouteros.npk exists, and if it do, then reboot to upgrade:

Read more on the wiki about Upgrading RouterOS.

Upgrade paths


When upgrading, you always run a risk of getting unforeseen problems. A very convenient way to prepare for this, is to add extra partitions on the router. You may then upgrade the test partition, and if it do not work as expected, you can reboot into the untouched production partition.

If a partition completely fails for some reason (failed upgrade, problematic configuration introduced, software problem), the next partition will automatically boot instead.

Install extra partitions

  1. Check you have enough free space for the extra partition (/system resource print)
  2. Upgrade the firmware to latest (/system routerboard ... print ... upgrade ... /system reboot)
  3. Repartition to 2 partitions (PROD, TEST) or 3 partitions (PROD, QA, TEST) ... the router reboots when you change the number of partitions (/partitions repartition partitions=2). RouterOS automatically splits the partitions to even sizes, and you current partitions OS+config is untouched, as long as there is enough free space to split the NAND/Flash into the selected number of partitions.
  4. Copy part0 to part1 (/partitions copy-to partition=part1) ... copies both OS and config
  5. Activate part1 (/partitions activate 1)
  6. Set new part1 to boot on part0 on fail (/partitions set part1 fallback-to=part0)

You may also copy only the active configuration, without changing the OS version with: /partitions save-config-to partition=partX
And you may also restore config from another partition to the active partition.

If you need to test on remote devices, it may prove helpful to add a script that runs at start time and if not disabled manually, will activate the safe partition and reboot.

If repartitioning fails and automatic boot from a safe partition fails, you may:

  1. Connect with Netinstall
  2. Connect with a serial console cable and then in the RouterBOOT menu, press "y" then 0/1 to activate the desired partition and boot on it.

More about partitions: https://wiki.mikrotik.com/wiki/Manual:Partitions