Guest network and hotspot server on MikroTik
Before you set up Hotspotly, prepare the guest interface, DHCP and the hotspot server on your MikroTik router.
Hotspotly manages the profile, the login files and the RADIUS settings of the hotspot server on
your router. It does not create the hotspot server itself. The interface your guests connect
to must already have an /ip hotspot server. This guide shows two ways to create it: MikroTik's
Hotspot Setup wizard or ready-made terminal commands.
What you get
- The guest interface has an IP address, an address pool and a DHCP server.
- That interface runs a hotspot server with a profile of its own.
- You know the interface name to enter in the panel's Interface field.
Before you start
- A MikroTik running RouterOS 6.49 or 7.x. The commands are the same on both.
- Admin access to the router through Winbox, WebFig or Terminal (SSH).
- An interface for guests: a free Ethernet port (e.g.
ether2), a bridge the guest WiFi is attached to (e.g.bridge-guest) or a VLAN interface. - An address block that is not used anywhere else. The examples use
10.5.50.0/24.
If you use a bridge
Run the hotspot server on the bridge interface itself, not on one of its ports. Do not add the internet-facing (WAN) port to the guest bridge.
You can set up the hotspot server before or after the VPN connection. Both the server and the VPN tunnel must be ready before Apply to router runs.
Option A: the Hotspot Setup wizard
In Winbox or WebFig, open IP → Hotspot and click Hotspot Setup. In the terminal, the
same wizard starts with /ip hotspot setup.
- hotspot interface: choose the guest interface (e.g.
ether2orbridge-guest). - local address of network: the router's address on the guest network, e.g.
10.5.50.1/24. Note it down; it goes into the panel's Gateway field. - masquerade network: answer
yesif your router has no masquerade rule for internet access. If the default WAN masquerade rule is in place,nois fine too. - address pool of network: the range handed out to guests, e.g.
10.5.50.10-10.5.50.250. - select certificate:
none. Hotspotly logs guests in with HTTP-CHAP; no certificate is needed. - ip address of smtp server: leave
0.0.0.0. - dns servers: the DNS servers the router uses (e.g.
1.1.1.1,9.9.9.9). - dns name: leave it empty. Hotspotly setup fills it in with its own value.
- name of local hotspot user: the wizard asks for a local user. Hotspotly authenticates guests through RADIUS, so you do not need it. Delete it afterwards (below).
The wizard creates the server, the address pool, the DHCP server and a server-specific
profile such as hsprof1. For details see MikroTik's official documentation:
HotSpot - Captive portal.
Delete the local user the wizard created. RouterOS checks its own local users first and asks RADIUS only when there is no match. Anyone who knows this account can get online without Hotspotly's verification and without a guest record:
Option B: terminal commands
You can use these commands instead of the wizard. In the example the guest interface is
ether2, the internet-facing interface is ether1 and the guest network is 10.5.50.0/24.
Use your own interface names and address block.
-
Give the guest interface an address and create the address pool:
-
Start a DHCP server on the guest interface. Hotspotly setup later turns on RADIUS accounting on this DHCP server, so it must be on the same interface.
-
Let guests use the router's DNS and give the guest network internet access. Skip the second line if your router already has a masquerade rule for the WAN.
-
Create a profile just for this server, then the hotspot server:
Do not set these fields by hand
Hotspotly setup writes the profile's html-directory, login-by, use-radius,
radius-accounting and dns-name fields. If you change them by hand, the next
Check compliance reports the difference and Apply to router writes the
values back.
More than one hotspot server
One router can run several guest networks (e.g. lobby and pool). Every hotspot server needs its own profile. A profile holds a single login page folder, so Hotspotly does not write to a shared profile and stops setup with Hotspot profile is used by more than one server.
In this example, create the address, the pool and the DHCP server for ether5 as in the steps
above.
The hotspot record in the panel
When the router is ready, create the hotspot record in the panel: Hotspots → Add Hotspot. The full flow is in Set up your first hotspot.
- Interface: the name of the interface the hotspot server runs on, exactly
as on the router (e.g.
ether2,bridge-guest). Hotspotly finds the server by this name. - Gateway: the server's
hotspot-address(10.5.50.1in the example). The login page uses it to check the router address a guest comes from. - Network: the guest network (
10.5.50.0/24in the example).
If you leave Interface empty, Hotspotly uses the router's hotspot server only when there is exactly one. The interface cannot be changed in the panel after the hotspot is created; if you entered the wrong name, move the server on the router to that interface or contact support.
Check your work
In the router terminal:
/ip hotspot print: the server is on the guest interface and has no disabled (X) flag./ip hotspot profile print: the server's profile (e.g.hsprof-guest) is not used by any other server./ip dhcp-server print: an enabled DHCP server runs on the same interface.
Then connect a phone or laptop to the guest network. It should get an address such as
10.5.50.x, and opening an HTTP address such as http://neverssl.com should show RouterOS's
default login page. That is expected: the Hotspotly login page appears after
Apply to router.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The Router portal setup card shows "No hotspot server on the router for the hotspot interface" | The panel's Interface differs from the server's interface on the router, or there is no server. If the interface is empty, the router has more than one server. | Compare the interface name with /ip hotspot print; create the server on the right interface, then Apply to router. |
| "Hotspot profile is used by more than one server" | Two hotspot servers use the same profile (e.g. both use default). |
Create and assign a separate profile per server: /ip hotspot set [find name=hotspot2] profile=<new-profile>. |
| "Hotspot server profile not found" | The server's profile was deleted or renamed. | List profiles with /ip hotspot profile print and assign an existing, separate profile to the server. |
| Guest devices get no IP address | No DHCP server, or it is disabled or set on a bridge port. | /ip dhcp-server print; run the DHCP server on the hotspot interface (on the bridge itself if you use one). |
| Guests get online without seeing a login page | The device is on another network, the server is disabled, or the device has a bypassed IP binding. |
Check the address the device got; /ip hotspot print, /ip hotspot ip-binding print. |
| Guests see RouterOS's default login page | Hotspotly setup has not been applied yet or did not finish. | The Router portal setup card on the device detail page; see Apply to router and compliance check. |
| Error (400) when the login page opens | The profile's dns-name was changed by hand, or the panel's Gateway differs from the router address. |
Do not edit dns-name; let Apply to router write it back. Check that Gateway equals hotspot-address. |
For file download and certificate problems see Troubleshooting and FAQ.
Security and privacy notes
-
Keep the guest network apart from your internal network. Do not add the guest interface to the bridge of your office or hotel management network.
-
Close DNS to the outside.
allow-remote-requests=yesturns the router into a DNS server. MikroTik's factory configuration (defconf) already drops requests from the WAN. If you do not use it (e.g. CHR or a configuration built from scratch), block DNS from the WAN: -
Do not keep a local hotspot user, and do not give guest devices a
bypassedIP binding. Devices that connect this way are not verified by Hotspotly and leave no guest record, so your access logs are incomplete.
Next steps
- If the router is not connected yet: RouterOS 7 (WireGuard) or RouterOS 6.49 (L2TP/IPsec).
- Hotspot record in the panel: Set up your first hotspot.
- Load the login page onto the router: Apply to router and compliance check.