MikroTik’s built‑in hotspot turns any router into a public WiFi gateway with a captive portal. This tutorial covers everything from the setup wizard to custom login pages, voucher generation, and bandwidth control. For a fully automated billing system, pair it with MikroRadius (here’s why we built it).
Prerequisites
- MikroTik router with a WAN interface and a separate hotspot interface (e.g., ether2 or a bridge).
- WinBox or SSH access.
- A spare IP subnet for clients.
Step 1: Prepare the Hotspot Interface
/interface bridge add name=hotspot-bridge
/interface bridge port add interface=ether2 bridge=hotspot-bridge
/interface bridge port add interface=ether3 bridge=hotspot-bridge
Step 2: Run the Hotspot Setup Wizard
/ip hotspot setup
Answer the prompts: interface = hotspot-bridge, local address = 192.168.10.1/24, masquerade = yes, pool = 192.168.10.2-192.168.10.254, DNS = 1.1.1.1,8.8.8.8. After the wizard, you have a working hotspot.
Step 3: Customise the Login Page
Edit login.html under IP → Hotspot → Server → Files. A minimal form:
<form action="$(link-login)" method="post">
<input type="text" name="username" placeholder="Username">
<input type="password" name="password" placeholder="Password">
<input type="submit" value="Login">
</form>
Step 4: Manage Users and Vouchers
4.1 Manual Users
/ip hotspot user add name=alice password=welcome123
4.2 Time‑Limited Vouchers
/ip hotspot voucher create-profile name=1hour-profile idle-timeout=1h
/ip hotspot voucher add-profile name=1hour-profile count=10
Step 5: Bandwidth Limits per User
/ip hotspot user profile set default rate-limit="5M/2M"
Step 6: RADIUS Integration (for Billing & Central Management)
For paid WiFi, point the hotspot to a RADIUS server like MikroRadius. Go to IP → Hotspot → RADIUS and add your server. This enables automatic voucher selling, usage accounting, and online payments – much more powerful than local vouchers. Learn more in the MikroRadius story and our beginner’s MikroTik setup to prepare your router.
Step 7: Test
Connect to the hotspot SSID/port, open a browser, and log in. Check active users with /ip hotspot active print.
Troubleshooting
- Login page not appearing: Check DNS redirection is working; client must use the router’s DNS.
- Users bypass login: Verify no other NAT rule allows traffic around the hotspot.
- Bandwidth limits not working: Confirm the user profile has a
rate-limitvalue; dynamic queues are created per user.
Next Steps
Combine the hotspot with a WireGuard VPN for secure remote management, or check our PPTP guide to understand why you should avoid that protocol. For complete automation, try MikroRadius – it turns this manual hotspot into a fully billable WiFi service.