You can turn any of your Packetra Linux VPS/Dedicated Server into a full MikroTik RouterOS router by installing the Cloud Hosted Router (CHR) image. This is ideal for those who want a powerful, fully controllable router at a hosting IP for VPN tunnels, firewalling, routing and traffic management. CHR runs the same RouterOS software found on MikroTik hardware, is lightweight, and installs directly over your existing Linux system from within the server itself.
Before You Begin – Use the Console, Not SSH
Because this process overwrites the running operating system, your SSH connection will drop the instant the disk is rewritten. If the write has not finished by then, you are left with an unbootable server. For this reason we strongly recommend running the whole procedure from the noVNC / HTML5 console in your Packetra client area rather than over SSH. From the console you can watch the write finish and the reboot happen, with no session to drop mid-way.
You will find the console under your service in the client portal. Log into your Linux server there as cloudvpsXXX/root before continuing.
Select your Linux OS to Prepare the Tools
First, install the two tools we need, wget to download the image and unzip to extract it. Select the tab matching the OS your VPS is currently running.
- Ubuntu
- Debian
- AlmaLinux
# Update the system and install the download and extract toolsapt updateapt install -y wget unzip
# Update the system and install the download and extract toolsapt updateapt install -y wget unzip
# Update the system and install the download and extract toolsdnf install -y wget unzip
Download & Extract the CHR Image into RAM
We download the image into /dev/shm, which is a RAM-backed folder. This matters because we are about to overwrite the disk, the source image needs to live somewhere that isn’t the disk we are wiping. Keeping it in RAM means the write can read the image cleanly right up to the end.
cd /dev/shm
wget https://download.mikrotik.com/routeros/7.21.5/chr-7.21.5.img.zip -O chr.zip
unzip chr.zip
Verify the Image Before Writing
This one check saves the most common failure. Confirm the extracted file is a real disk image and note its exact name (the version number may differ from the example).
ls -la
file chr-7.21.5.img
The file command must report something like DOS/MBR boot sector or data. If it says Zip archive, the extract did not happen, go back and run unzip again. Do not proceed until this reports a boot sector.
Identify Your Target Disk
Next, find the disk your server boots from, this is the device we write CHR onto. It is usually vda or sda, but you must confirm rather than assume, as writing to the wrong device will fail.
lsblk
Example: a line reading sda 25G disk with a partition sda1 mounted at / tells you the boot disk is /dev/sda. Use the whole disk (sda), not the partition (sda1). Note the name for the next step.
Write the Image and Reboot into RouterOS
Now write the image to the disk. Replace chr-7.21.5.img with the exact filename from the verify step, and /dev/sda with the disk you confirmed with lsblk. The sync flushes the write, then echo b forces an immediate reboot into RouterOS.
dd if=/dev/shm/chr-7.21.5.img of=/dev/sda bs=4M conv=notrunc oflag=direct
sync
echo b > /proc/sysrq-trigger
The console will freeze briefly, then you will see the server reboot. SeaBIOS loads, and within a few seconds RouterOS starts. Watch the console, you are looking for the RouterOS banner and a login prompt.
First Login & Configure Networking
At the RouterOS prompt, log in with username admin and an empty password (just press Enter). You will be prompted to set a new password immediately, do this as your server is on a public IP.
CHR does not pick up your old Linux network settings, so set them manually. Use the IP address, subnet and gateway shown for your service in the client portal. The example below uses placeholders — substitute your own values.
ip address add address=YOUR_IP/PREFIX interface=ether1
ip route add gateway=YOUR_GATEWAY
ip dns set servers=1.1.1.1,9.9.9.9
Example: for an IP of 203.0.113.50 with a /27 subnet and gateway 203.0.113.33, the first line would read ip address add address=203.0.113.50/27 interface=ether1 and the route ip route add gateway=203.0.113.33.
These settings are saved immediately and persist across reboots — RouterOS has no separate “save” step. Verify connectivity:
ip address print
ping YOUR_GATEWAY count=3
ping 1.1.1.1 count=3
If both pings reply, your router is online. You can now manage it over SSH, or download WinBox from MikroTik for a full graphical interface.
Secure & Name Your Router
RouterOS enables several management services by default. Since your router faces the public internet, disable the ones you do not need and set a clear identity.
# See what is running, then disable the insecure/unused services
ip service print
ip service disable telnet,ftp,api,api-ssl
# Give the router a recognisable name
system identity set name=my-router
This leaves SSH and WinBox available. If you connect from a fixed IP, you can restrict WinBox to it with ip service set winbox address=YOUR_HOME_IP for an extra layer of security.
Final Words
You now have a full MikroTik RouterOS router running on your Packetra server, installed directly from Linux with no special tooling. This suits anyone who wants complete control over routing, firewalling and VPN termination at a hosting IP, using the same interface as MikroTik’s hardware routers. From here you can build WireGuard or IPsec tunnels, set up firewall rules, or shape traffic, all from within RouterOS.
