How to install Mikrotik CHR on an SSD VPS
12:00, 18.01.2022
Mikrotik routers are widely used by server owners around the world because they are reliable, fast, and provide the user with all the relevant features for building a secure network infrastructure. An important advantage of this company is also its own operating system MikroTik Cloud Hosted Router, which can run as a virtual machine. This RouterOS has full support for 64-bit x86 architecture and all popular server virtualization technologies:
- VMWare;
- KVM (Kernel-based Virtual Machine);
- VirtualBox;
- Hyper-V;
- Xen.
Essentially, Mikrotik CHR is a modified and improved version of Mikrotik RouterOS, designed to be deployed in the cloud without reference to specific hardware and software. Simply speaking, if you already have a powerful VPS or dedicated server, you do not need to buy a ready-made router for it, you can use CHR. A virtual server gets a virtual router, and there are no problems with physical hardware. You just need to buy a suitable license and deploy the software on the server. Next, we will tell you how to properly install Mikrotik CHR on your SSD VPS.
MikroTik CHR System Requirements
The minimum system requirements for deploying this software are as follows:
- 64-bit CPU with virtualization support;
- 128 MB or more of RAM;
- 128 MB of storage space.
Installing MikroTik Cloud Hosted Router on a VPS
Let's look at the installation process for Ubuntu Server 20.04. The first thing to do is to connect to the VPS via SSH, then immediately open the console and create a temporary partition to store the disk image:
mount -t tmpfs tmpfs /tmp/
On the official site of the developer download the RAW image, it can be found in the Cloud Hosted Router. To do this, copy the download link and run the command on the server:
wget https://download.mikrotik.com/routeros/7.1.1/chr-7.1.1.img.zip
The link is better to take from the site and not from this article, as they can be updated, and the release of new versions has not been canceled.
Next, to unpack the downloaded archive we need unzip. Install it from the repository:
sudo apt-get install unzip
Then we unpack the files and determine the name of the drive on the VPS:
fdisk -l Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x000da8dc
All that remains is to write the selected image to the SSD:
dd if= chr-7.1.1.img of=/dev/sda bs=4M oflag=sync
In your case, the name of the image may be different if the downloaded operating system version is different. After burning, restart the server:
echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger
Now, once the server is booted and ready to go, it will not be possible to connect to it remotely, as the server will not have your IP. The further configuration will require connection via KVM/VNC. The default login is admin.
Final RouterOS setup
Once connected, all you have to do is configure the IP settings:
ip address add address=***.***.***.***/24 interface=ether1
And the gateway:
ip route add gateway=***.***.***.***
Further configuration is self-explanatory since everything is done through a convenient web interface. To get to it, just open your browser and type in the IP set earlier in the search box. And don't forget to change the default username and password to a more secure one. If you still have any questions, feel free to contact the HostZealot specialists - we will tell you how to properly install the operating system and help you choose the most suitable control panel for your VPS server. Take care!