You’ll download the latest CHR image, inject an autorun script with your current IP settings, write the image to the VPS disk, and reboot straight into RouterOS.
Winbox is then used to complete the initial configuration.
1. Prepare the VPS
- Reinstall the VPS with a clean Ubuntu 22.04 environment using the EDBB VPS Portal.
- Boot the VPS and connect via SSH.
The script automatically pulls your existing IPv4 and gateway from Ubuntu before overwriting the disk. Make sure the VPS has internet connectivity during the process.
2. Create the Installation Script
- Create a new script file (example name:
install_chr.sh):
- Paste the following script provided by EDBB:
- Save the file (
Ctrl + O,Enter) and exit (Ctrl + X).
3. Run the Installer
- The script verifies root privileges, installs dependencies, fetches the newest CHR image, injects the autorun script, writes the image to the VPS disk, and reboots the server.
- Expect the SSH session to terminate once the image begins writing and the reboot occurs.
The dd step erases the existing Ubuntu installation. Ensure all required data is backed up before running the script.
4. Connect with Winbox
After the VPS restarts, it will boot into MikroTik RouterOS. Finish the initial setup using Winbox:- Download Winbox from mikrotik.com/download.
- Launch Winbox and create a new session:
- Connect To: public IPv4 address of the VPS.
- Login:
admin - Password: leave blank on first login.
- Click Connect.
- When prompted, set a strong password for the
adminaccount. - Verify that
ether1carries the IP address from the autorun script, adjust DNS settings if required, and continue with your RouterOS configuration.