MikroTik is an advanced router operating system that provides a variety of features for network management. The CHR (Cloud Hosted Router) version of MikroTik is designed to run in virtual environments, allowing you to take advantage of all the features of this operating system on a virtual server.
Automatic MikroTik Installation Script on Ubuntu Server
We have designed and created a script for you, our valued users, that automatically performs all the steps of installing and configuring MikroTik CHR!
In some situations, it is not possible to connect the MikroTik ISO to the server for direct installation. Using this script, you can easily install and run MikroTik on the Ubuntu operating system.
Prerequisites
- Virtual server with Ubuntu operating system (versions 20.04 and 22.04 are tested)
- Server connection to the internet
This script runs MikroTik in Ubuntu through emulation with the help of QEMU.
It is recommended that if you have any data on your server, back it up and download it before installation.
Script Execution
Before running the script, first update the operating system and its packages using the following command:
sudo apt update && sudo apt upgrade -y
To install Mikrotik on Ubuntu, simply run the following command in your terminal.
This command downloads and executes the installer script and automatically installs the necessary prerequisites for the operation:
curl -sSL https://dl.hidata.org/scripts/MikrotikUbuntu.sh -o MikrotikUbuntu.sh && chmod +x MikrotikUbuntu.sh && sudo ./MikrotikUbuntu.sh
Be sure to copy the entire command line above.
After the script is executed completely, Mikrotik will run. The username is admin and the password is blank.
Note
After the script has finished running and the final message is displayed, if Mikrotik does not load, turn off the server once via the VPS panel and turn it on again.
Do not run the script on a server that contains important data, due to the possibility of partition unavailability.
Conclusion
In this tutorial, we installed and configured Mikrotik (CHR version) on the Ubuntu operating system using an automated script. This script utilizes QEMU emulation to run Mikrotik on the Ubuntu server. This method is particularly useful when it is not possible to connect the Mikrotik ISO to the server for direct installation. Using this script makes the installation and configuration of Mikrotik easy and without the need for manual intervention, which saves time and reduces complexity.