Mikhmon configuration: connect your MikroTik router step by step
Updated on · MonMikroTik team
Mikhmon configuration comes down to one thing: letting Mikhmon talk to your MikroTik router through the RouterOS API. Once this connection is established, your hotspot profiles, users and tickets appear and you can manage everything. This guide details each step with Mikhmon Online, the cloud version of Mikhmon: nothing to install, and the router stays reachable even without a public IP.
Step 1: enable the API on the router
Mikhmon uses the router's API service (port 8728). In Winbox, open IP > Services and enable the api line, or type in New Terminal:
/ip service enable api
If the Available From field of the api line is filled in, it must allow the address Mikhmon connects from; leave it empty if in doubt.
Step 2: create a dedicated API user
Avoid using the admin account: create a user reserved for Mikhmon, with a strong password. It must belong to the full group (or a group with the write policy), otherwise Mikhmon will be able to read but not create tickets or edit profiles.
/user add name=mikhmon group=full password=YourStrongPassword
Step 3: make the router reachable
Mikhmon Online runs on our servers: it must be able to reach your router from the Internet. Two cases:
- The router has a static public IP: use it as the router address. Then restrict API access with the Available From field.
- The router is behind a 4G or fiber box (the most common case): install the MonMikroTik VPN and use the IP Tunnel shown on the VPN page. No port to open.
192.168.x.x does not work with Mikhmon Online: it can only be reached from your local network. See Access your MikroTik without a public IP.
Step 4: add the router to Mikhmon Online
In your account, open Mikhmon Online and add a router. Here is where to find each piece of information:
| Field | What to enter |
|---|---|
| Name | A name to recognize the site, for example “Cafe Central”. |
| Router address | The VPN IP Tunnel, or the router's public IP. |
| API user and password | Those created in step 2. |
| Hotspot server name | Name column of /ip hotspot print, for example hotspot1. |
| Hotspot DNS name | dns-name field of /ip hotspot profile print, for example wifi.bf. |
| Currency | The currency shown on tickets and reports (FCFA…). |
| Mikhmon version | V3 for RouterOS v6 and v7.0 to 7.9, V7 for RouterOS 7.10 and later. See Mikhmon V7 or V3? |
Choose the subscription length (1 credit per month, or 10 credits for 12 months) and save.
Step 5: test the connection
In the router list, click Tester la connexion (Test connection). Once the router responds, the button to open the Mikhmon dashboard becomes active: your profiles, active users and existing tickets are displayed immediately, with nothing to re-import.
Step 6: configure profiles and ticket format
- User profiles (Hotspot > User Profiles menu): for each plan, set the validity (for example
1d), the price and the expired mode (Remove & Record or Notice & Record to record sales). Mikhmon then installs the scripts that make tickets expire. - Ticket format: in the router details, choose the code type, characters, length and a prefix. It applies to all tickets generated for this router.
You are ready to create and print your Mikhmon tickets.
Common problems
| Problem | Solution |
|---|---|
| Connection refused or timeout | The API is disabled, restricted by Available From, or the address is unreachable: check step 1 and use the VPN IP Tunnel. |
| Credentials rejected | Check the API user and password (mind the uppercase letters). |
| “not enough permissions” | The API user is read-only: put it in the full group (System > Users). |
| No active users or wrong server | The hotspot server name does not match: check /ip hotspot print again. |
| Tickets do not expire | The Mikhmon version does not match RouterOS: see Mikhmon tickets that do not expire. |