MikroTik integration

Connect to your MikroTik devices

Integrate your MikroTik devices with your MyWiFi account and enable guest access capabilities.


  • Active MikroTik subscription.
  • Active MyWiFi subscription.
  • A location with an associated campaign.

MikroTik setup

The configuration can be applied on MikroTik RouterBOARD devices with default settings -- as an out-of-the-box unit, or after a factory reset has been performed.

If the MikroTik device has a custom setup, this guide assumes that the MikroTik device is already configured to fit these parameters:

  • There is a DHCP client (or IP address, gateway, and DNS IP addresses) on WAN interface.
  • There is a NAT (masquerade) on WAN interface.
  • There is an IP address and DHCP server on the interface that will be used as the hotspot.
  • There is no hotspot configuration on the device already.

Retrieve the MAC address of your device

The MAC address of the MikroTik device can be obtained in two ways:

Method 1:

  1. Obtain the MAC address from the device label on the box or on the MikroTik device itself. A MAC address is a sequence of 12 numbers and the letters A-F often separated by colons (ex: A1:B2:C3:D4:E5:F6).

Method 2:

Access the MikroTik device using WinBox:

  1. Use WinBox to access the MikroTik device.
  2. Open the Interfaces menu.
  3. Select the Interface tab.
  4. Double click ether1 interface.
  5. Select the General tab and copy the MAC Address.

MyWiFi Setup

  1. Log in to your MyWiFi dashboard.
  2. Select Devices from the main menu.
  3. Click Add New Device.
  4. Select the Location, enter a Device Name, and choose MikroTik

  5. Provide the device's MAC address.
  6. Click Proceed.
  7. Copy and save the NasID. 
  8. Click Confirm Setup.


Configuration file

Click here to download the Mikrotik configuration file package. 

Download the package and unzip it into a folder. In that folder you will find another folder called mikrotik-files; you'll need to open config.txt with a text editor and edit it:

  • Replace the YOUR_INTERFACE_NAME placeholder with the name of the interface that the hotspot will be running on (in the default configuration of MikroTik devices, this interface is named bridge).
  • Replace the YOUR_NAS_ID placeholder with the NasID of the MikroTik device you just retrieved from MyWiFi.
  • Save the file after completing the changes.

Please Note: If you have a Custom Social Portal URL enabled within MyWiFi, it will be necessary to add your Custom Social Portal Domain to the Allowed Hosts/Domains Whitelist.

Custom social portal URL

If you have a custom social portal URL, you will need to add it to your config.txt & login.html files.

Edit the config.txt file and add your custom social portal URL below the following 2 lines:

/ip hotspot walled-garden
add dst-host=*mywifi.io

You may add your domain in the following format:

add dst-host=

For example, if your custom social portal URL was social.yourdomain.com, you would add:

add dst-host=social.yourdomain.com

It should look like:

/ip hotspot walled-garden
add dst-host=*mywifi.io
add dst-host=social.yourdomain.com

Next, open login.html and find this line:

action="https://securewifilogin.com" method="POST">

You'll need to change it from using the domain https://securewifilogin.com to using https://yourdomain.com. It should look like this, with your custom social portal URL:

action="https://yourdomain.com" method="POST">

Next, you need to upload these files to your MikroTik device.

Connect to your MikroTik device with WinBox

  1. Drag and drop the config.txt file to the middle of the WinBox window.
    If the upload to WinBox is successful, WinBox will display the File List window and it will include config.txt.
  2. Open a New Terminal window from the left menu and type import config.txt, then press enter. 
    If the operation was successful, after around 5 seconds you should see a message saying Script file loaded and executed successfully.
  3. Go to File List window (if it’s not open, click Files on the left menu) and drag and drop the three .html files from the configuration package (alogin.html, login.html, and rlogin.html) to the hotspot directory in the File List.

    If the operation was successful, you should see the 3 files in the File List window.

Unable to access campaign

If you are not able to access your campaign after connecting to WiFi, or if you are entered in a loop when attempting to access any specific URL, please make sure that your custom social portal URL has been added to both config.txt and login.html.


Need Help?

If you have any questions, please contact our support team by clicking the support icon located in the bottom right-hand corner of this page.

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.