Hello again, everyone! My name is Corels from Emmanuel Corels Creatives, and today I’m thrilled to show you how to turn your Linux VPS into a fully functional MikroTik Cloud Hosted Router (CHR) using just a single line of command. That’s right—no lengthy, complicated instructions here. This easy-to-follow tutorial will have you up and running in no time, and I’ll also share why MikroTik CHR is a game-changer for both networking enthusiasts and professionals.
What is MikroTik CHR?
MikroTik Cloud Hosted Router, or CHR, is a powerful software-based router operating system developed by MikroTik. In essence, it allows you to convert a Linux-based virtual private server (VPS) into a fully-featured MikroTik router. Whether you’re setting up a small home network or managing complex enterprise infrastructures, CHR delivers enterprise-grade features like dynamic routing, VPN, firewall, bandwidth management, and much more—all in a cost-effective, virtualized package.
Why MikroTik CHR is So Special
Let’s break down some of the key benefits that make CHR the go-to choice for many network administrators:
- Flexibility: Customize your router to meet your specific needs, from small home setups to large-scale enterprise solutions.
- Cost-Effective: Leverage affordable Linux VPS providers—often for as low as $5 per month—to deploy a high-performance router without investing in expensive dedicated hardware.
- Feature-Rich: Enjoy a wide array of advanced features, including dynamic routing, robust firewall capabilities, VPN support, and more—features that you’d usually find only in high-end hardware.
- Ease of Management: Whether you prefer MikroTik’s intuitive web-based interface or the powerful Winbox application, managing your CHR is a breeze.
- Scalability: Start small with a basic VPS, and as your network grows, easily upgrade your resources or spin up additional CHR instances.
- Security: With regular updates and a dedicated community focused on keeping the platform secure, you can trust CHR to protect your network from potential threats.
The Setup Process: A Quick Overview
Before we jump into the single-line command that will install MikroTik CHR, let’s set the stage with some context. For the best experience, you’ll need a Linux VPS with KVM virtualization support (this won’t work with OpenVZ due to kernel limitations). For today’s demonstration, we’re using Ubuntu Server 18.04 64-bit. I currently use a VPS from TREJJ.net because they offer KVM virtualization—perfect for our setup—but feel free to choose any provider that supports KVM.
Connecting to Your VPS with PuTTY
For Windows users, PuTTY is the tool of choice for connecting to your VPS via SSH. If you haven’t already, download PuTTY from putty.org. Once installed, open PuTTY and enter your VPS’s IP address in the “Host Name” field. Click “Open” to initiate the connection.
When connecting for the first time, you may see a prompt warning that the server’s host key isn’t cached. This is normal—just click “Accept” to proceed. Next, enter the username (typically root
for administrative access) and press Enter. You’ll then be prompted for your password (note that the characters won’t display for security reasons). After hitting Enter, if all goes well, you’ll be greeted by a welcome screen. Congratulations—you’re now connected to your VPS!
The One-Line Command: Installing MikroTik CHR
Now, for the exciting part. In your PuTTY terminal, execute the following command:
curl -fsSL https://repo.trejj.net/mikrotik/chr/install.sh | sudo bash
Let’s break down what this command does:
curl
: This tool transfers data from a server. It fetches the installer script from the specified URL.-fsSL
: These options make curl fail silently on errors (-f
), operate in silent mode (-s
), show errors if they occur (-S
), and follow redirects (-L
).https://repo.trejj.net/mikrotik/chr/install.sh
: This is the URL where the MikroTik CHR installation script is hosted.| sudo bash
: The pipe (|
) takes the output from curl and passes it directly tobash
(executed with administrative privileges viasudo
), which runs the script.
Important: If your VPS doesn’t have curl installed, you might see an error. Simply run sudo apt update
followed by sudo apt install curl -y
to install curl, and then reissue the command by using the up-arrow in PuTTY.
Finishing Up: Restarting Your VPS
After the command runs successfully, the installation process will complete, and your VPS will now have MikroTik CHR installed. However, it’s essential to restart your VPS properly. Rather than rebooting through the terminal, do this via your VPS hosting control panel. Why? Because the control panel ensures the correct sequence of actions during the reboot, minimizing potential complications.
Once you’ve restarted your VPS, exit PuTTY and head over to your hosting control panel, locate the restart option, and click it. After the VPS reboots, you’ll connect again—this time using VNC if necessary—to verify the installation.
The Aftermath: Logging Into MikroTik CHR
When the VPS restarts, you should see the MikroTik RouterOS login screen. You can access your CHR using two methods:
-
Web-Based Interface (WebFig):
Open your favorite web browser, type in your VPS’s IP address, and you’ll be greeted by the intuitive web-based interface of MikroTik RouterOS. -
WinBox:
Download WinBox from the MikroTik website. Launch it, enter your VPS’s IP in the “Connect To” field, and hit “Connect.” Initially, the username isadmin
and the password is blank. Upon logging in, you’ll be prompted to change the default password—do not skip this critical security step!
After changing the password, log in again using your new credentials. Congratulations, you’re now managing a fully functional MikroTik CHR!
Licensing Your CHR
Although CHR is available for free, there are additional license levels (P1, P10, P-unlimited, etc.) that unlock higher throughput and advanced features. Typically, CHR comes with a trial license valid for three months. To upgrade or renew your license:
- Visit mikrotik.com and create an account by clicking on “Accounts” and then “Register.”
- Complete the registration and check your email for confirmation.
- Open WinBox, navigate to System → License, and click “Renew License.”
- Enter your MikroTik account username and password, select the license type that meets your needs, and click “Start.”
If you encounter the error "could not resolve hostname," it’s likely due to missing DNS settings. Simply go to IP → DNS in WinBox, add DNS servers such as 8.8.8.8 and 8.8.4.4, enable “Allow Remote Requests,” and then try the license activation again.
Wrapping Up
And there you have it—a complete, streamlined process to set up MikroTik CHR on a Linux VPS with just one line of command. We’ve covered what CHR is, its incredible benefits, how to prepare your VPS with KVM virtualization (using Ubuntu Server 18.04 in our example), and even a quick dive into connecting via PuTTY and handling potential pitfalls.
In upcoming tutorials, we’ll explore specific CHR functionalities, with an emphasis on its robust security features and advanced networking capabilities. So stay tuned, hit that ‘Subscribe’ button, and ring the notification bell to ensure you never miss an update.
Thank you for joining me today. Let’s dive into the exciting world of MikroTik CHR and unlock a new level of networking power!
Authored by
Corels – Admin, Emmanuel Corels Creatives