Smarter Router Setup Starts Here: Automating MikroTik Configuration with XenFi
Still configuring MikroTik routers manually? Discover how XenFi automates hotspot setup and why your router must be receiving internet before running any scripts.
Angel Namuli
March 19, 2026
Preparing Your MikroTik Router for Automated Setup
Before running any XenFi scripts, the router must be in a clean and ready state.
Automation which means:
The router is properly reset
The physical connections are correct
The router is already receiving internet
In most MikroTik setups, the internet cable from your ISP is connected to ether1, which acts as the WAN port. Your computer should then be connected to either ether2 or ether3 or ether4, or ether5, allowing you to access the router through WinBox.
Skipping these steps can cause scripts to fail or behave unexpectedly.
Let’s go through each step
Step 1: Reset the Router
To avoid conflicts from previous configurations, start by resetting the MikroTik router.
You can reset the router in two ways:
Using the reset button: Disconnect all cables (WAN, PC, and power), press and hold the reset button using a pin, then plug the power cable back in while still holding the button, and release it after the LED blinks three times.
Using WinBox: Go to System → Reset Configuration, select No Default Configuration, then click OK.
After the reset:
The router returns to its default state
You get a clean environment for setup
Step 2: Set Up the Physical Connections
Now connect your devices correctly:
ISP cable → ether1 (WAN port)
PC/Laptop → ether2 (LAN port)
This setup ensures:
The router can receive internet
You can access the router locally via WinBox
Step 3: Enable DHCP Client, Open WinBox and go to:
IP → DHCP Client
Add a new DHCP Client:
Interface:
ether1
Click Apply and OK
Step 4: Enable Remote Access
Before proceeding to automated setup, your router must first be connected to XenFi through remote access.
This allows XenFi to securely communicate with your router and apply configurations automatically.
Since your router is already connected to the internet, you can now run the XenFi remote access script.
Once the script is successfully installed:
Your router becomes accessible from the XenFi dashboard
You can begin automated configuration or manual setup
To do this, you will go to the XenFi dashboard and look for Settings > Router setup
Hover over the script (move the cursor around it so that you are able to copy it to your clip board)
After this, paste this script in the Winbox terminal
Moving to Setup with XenFi
Once your router is properly reset, connected, and receiving internet, you are ready to move to the next stage — configuration.
At this point, you have two options:
Configure everything manually using WinBox
Or use XenFi’s automated setup to simplify the process
While manual configuration works, it can be time-consuming and requires careful attention to multiple settings.
XenFi provides a more efficient approach through Automatic Deployment, allowing you to configure your router with minimal effort directly from the dashboard.
Let's go through each method step by step
Manual Configuration
Once you select manual configuration, it'll take you to
Manual Setup Instructions
Configure your topology through Winbox/WebFig
Now that the management services are installed, follow these steps to deploy your network:
Create a Bridge: Setup a bridge interface and attach your LAN/WLAN ports to it.
Assign IP Address: Assign your chosen Gateway IP address to the bridge interface.
Setup DHCP Server: Create a DHCP Pool and bind a DHCP Server to your bridge.
Setup Hotspot Server: Under IP > Hotspot, run the generic Setup wizard on your bridge, or manually attach a Hotspot Server utilizing the DHCP Pool you created. Use the XenFi profile if it was created, or configure it to point to the XenFi RADIUS address.
Finally, install the XenFi services script
Moving to Automated Setup with XenFi
Select
Automatic Deploymentand click Continue to ConfigurationThe system will automatically detect your router’s topology and display key details such as uptime and RouterOS version
Click
Add New Bridge, then open the bridge to configure its settingsAdd the required interfaces (e.g., ether2, ether3) to the bridge by dragging and connecting them. Repeat this for all ports you want included
Configure the bridge by setting:
Bridge name
Gateway IP
Subnet size
Service type (Hotspot Server or PPPoE Server)
Then click Save Changes
After saving, a configuration script will be generated for your router setup
Copy the script and paste it into the WinBox terminal to apply the configuration
The script will execute and confirm completion with a
Deployment Successfulmessage.
Find out how XenFi helps ISPs grow
Smart billing, automation and management for hotspot providers and ISPs.