> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.lumiweb.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# MikroTik CHR

> A virtual MikroTik router on your VPS

Cloud Hosted Router (CHR) is MikroTik's RouterOS, built to run as a virtual machine. Same interface and capabilities as MikroTik's "hardware" routers: routing, VPN server, firewall, tunnels. Handy when you need a managed network node in a specific location, not just Linux.

<Note>
  Commands are current as of writing. Before installing, check the official documentation [help.mikrotik.com](https://help.mikrotik.com) (the Cloud Hosted Router, CHR section) — versions and image links change.
</Note>

<Warning>
  The installation below writes the CHR image straight onto the system disk and **completely replaces your current OS** along with all its data. Do this only on a clean or brand-new server. After writing, there's no more familiar SSH to Linux — you'll log into the router through the web console (VNC) from the bot. Move everything important off first.
</Warning>

## Installation

CHR is installed not as a package, but by "flashing" the disk: you download a raw image and write it over the disk with `dd`. By default the server runs Ubuntu 22.04 and you connect as `root`.

<Steps>
  <Step title="Confirm the disk name">
    Check what the system disk is called:

    ```bash theme={"system"}
    lsblk
    ```

    On a VPS this is usually `/dev/vda`. Write it down — there's no room for error here: `dd` writes exactly where you point it.
  </Step>

  <Step title="Download the CHR image">
    Open [mikrotik.com/download](https://mikrotik.com/download), find the **Cloud Hosted Router (CHR)** section, and copy the "Raw disk image" link for the version you need. The URL contains the version and looks roughly like this: `https://download.mikrotik.com/routeros/7.15.3/chr-7.15.3.img.zip`. Substitute the real link:

    ```bash theme={"system"}
    wget -O chr.img.zip "PASTE_REAL_URL_FROM_MIKROTIK.COM"
    ```

    <Note>
      Don't use the example above as is — the link contains a version, and an outdated URL will return a 404. Without the right image, `dd` would write garbage to the disk and the server wouldn't boot.
    </Note>
  </Step>

  <Step title="Unpack it">
    Unpack the archive — inside is the `.img` image:

    ```bash theme={"system"}
    unzip chr.img.zip
    mv chr-*.img chr.img
    ```

    If you happened to download a `.gz` instead of a `.zip`, unpack it with `gunzip chr.img.gz`.
  </Step>

  <Step title="Write the image to the disk">
    **Double-check the device name from step 1 — this command overwrites the disk irreversibly.**

    ```bash theme={"system"}
    dd if=chr.img of=/dev/vda bs=4M
    sync
    ```
  </Step>

  <Step title="Reboot the server">
    The best way is the "Reboot" button in the [@lumivps\_bot](https://t.me/lumivps_bot) bot. If the console still responds, you can do this:

    ```bash theme={"system"}
    echo b > /proc/sysrq-trigger
    ```

    After the reboot, the server starts up as a MikroTik router.
  </Step>

  <Step title="Log in and change the password">
    Open the server's web console (VNC) from the bot. The login is `admin`, the password is empty. Set your own right away:

    ```routeros theme={"system"}
    /user set admin password=YOUR_PASSWORD
    ```
  </Step>
</Steps>

## If networking doesn't come up

Sometimes CHR doesn't pick up the network settings automatically. In that case, enter them manually in the router console (take the IP, mask, gateway, and DNS from the server details in the bot):

```routeros theme={"system"}
/ip address add address=YOUR_IP/24 interface=ether1
/ip route add gateway=GATEWAY
/ip dns set servers=1.1.1.1,8.8.8.8
```

To check connectivity: `/ping 1.1.1.1`.

## License

CHR runs perpetually on the free tier. The limitation of the free license is a speed cap of 1 Mbps on outbound traffic per interface; that's enough for VPN and testing, but not for heavy traffic. To lift the cap you need a paid license — see the terms and tiers on the MikroTik site.

<Tip>
  Not sure about the disk name? `lsblk` shows all disks and partitions. The system one is usually the largest and is called `/dev/vda` (less often `/dev/sda`). Write the image to the disk itself (`/dev/vda`), not to a partition (`/dev/vda1`).
</Tip>

Lumi handles the server and network; software setup is on you. Network or port issues — write to [@lumisup\_robot](https://t.me/lumisup_robot).

## Where to next

<CardGroup cols={1}>
  <Card title="Firewall" icon="shield-halved" href="/en/vps/firewall">
    Open the ports you need on the VPS before installing CHR.
  </Card>
</CardGroup>
