MikroTik tickets that stop working after a power cut: the fix

Updated on · MonMikroTik team

After a load-shedding or a power cut, your customers complain: their tickets no longer work, they are disconnected right after logging in, or a 24-hour ticket expires after a few minutes. In the vast majority of cases, the problem does not come from the tickets but from the router's clock. Here is why, and how to fix it for good in a few seconds with the MonMikroTik app.

Why a power cut breaks tickets

Most MikroTik routers (hAP, hEX, RB750, RB951…) have no battery to keep time. When the power goes off, the clock stops. On restart, the router starts again with a wrong date: often a date in 1970, or the date of the last shutdown.

Yet Mikhmon tickets rely on dates:

  • at first login, the Mikhmon script computes the ticket's expiration date from the router's time;
  • a scheduled script regularly compares this date with the current time to delete or block expired tickets.

With a wrong clock, everything shifts:

What the customer seesWhat is happening
The ticket is rejected or cut off immediatelyThe time jumps forward when the router gets the correct date back: tickets activated during the wrong date look long expired and are deleted or blocked.
A ticket expires too early or too lateThe time zone is wrong: the router's time is off by one or more hours.
An expiration date in 1970 in MikhmonThe ticket was activated while the router did not have the time yet.
Sales reports show the wrong dateSales were recorded with the router's wrong date.

The solution: sync the time with NTP and set the time zone

NTP (Network Time Protocol) lets the router get the exact time from the Internet. Once enabled, it sets the time by itself at every restart, as soon as the Internet connection is back. The time zone ensures that this time is your country's time.

In the MonMikroTik app, the Mettre à jour la date (Update date) feature does both in one go:

  • it enables the router's NTP client with African time servers (africa.pool.ntp.org);
  • it sets the time zone you choose, and disables automatic detection, which is often wrong;
  • the setting is saved on the router: it remains valid after every power cut, so you only need to do it once;
  • it works on RouterOS v6 and v7: the app detects the version and uses the right command.

Update the date from the app

  1. Open the MonMikroTik app and go to the Mikhmon tab.
  2. Tap your router, then Dashboard at the top right. The router must be online.
  3. Tap Mettre à jour la date (“Synchroniser l'horloge (NTP) et fixer le fuseau horaire” — sync the clock with NTP and set the time zone).
  4. Look at the router's current date and time shown at the top: if they are wrong, you have found the cause of the problem.
  5. In Fuseau horaire (Time zone), choose your country's. The router's current time zone is preselected: check it.
  6. Tap Mettre à jour la date. A message confirms the update.
  7. Reopen the screen after a few moments: the router's date and time should now be correct.

Which time zone should you choose?

CountryTime zone to chooseTime
Burkina FasoAfrica/OuagadougouUTC+0
Côte d'IvoireAfrica/AbidjanUTC+0
MaliAfrica/BamakoUTC+0
SenegalAfrica/DakarUTC+0
GuineaAfrica/ConakryUTC+0
TogoAfrica/LomeUTC+0
NigerAfrica/NiameyUTC+1
BeninAfrica/Porto-NovoUTC+1
CameroonAfrica/DoualaUTC+1

What about tickets already affected?

Syncing the time prevents the problem from coming back, but tickets activated while the time was wrong may have an incorrect expiration date.

  • In Mikhmon Online (Hotspot > Users), spot the tickets whose comment shows an absurd date (for example in 1970).
  • For an affected customer, the simplest is to give them a new ticket of the same plan, by generating it with Mikhmon Online.
  • Never-used tickets are not affected: their expiration will only be computed at first login, with the correct time.

Prevent the problem from coming back

  • Keep NTP enabled: that is the setting made by the app. The configuration generator also enables it for new routers.
  • Make sure the router has Internet and a DNS as soon as it starts: without Internet, NTP cannot get the time. Check the DNS with /ip dns print.
  • Install a UPS or a battery on the router and the box: fewer restarts, fewer risks.
  • After a long power cut, open the Mettre à jour la date screen to check at a glance that the time is correct.

The equivalent commands in Winbox

If you prefer the terminal (New Terminal), here is the equivalent. On RouterOS v7:

/system ntp client set enabled=yes servers=0.africa.pool.ntp.org,1.africa.pool.ntp.org
/system clock set time-zone-autodetect=no time-zone-name=Africa/Ouagadougou

On RouterOS v6, the NTP client uses a different parameter:

/system ntp client set enabled=yes server-dns-names=0.africa.pool.ntp.org,1.africa.pool.ntp.org
/system clock set time-zone-autodetect=no time-zone-name=Africa/Ouagadougou

To check the time and synchronization status:

/system clock print
/system ntp client print

Common problems

ProblemSolution
The Dashboard button is grayed outThe router is offline for the platform: wait for the Internet to come back, check the VPN.
The time is still wrong after the updateThe router cannot reach the NTP servers: check that it has Internet and a DNS, then try again a few minutes later.
The time is right but tickets still do not expireThe problem comes from the expiration scripts: see Tickets that do not expire.
The time is right but off by one hourThe chosen time zone is wrong: check the table above.
“Impossible de mettre à jour la date et le fuseau horaire” (Unable to update the date and time zone)Use the Winbox commands above, choosing those for your RouterOS version.

Manage your MikroTik hotspot from the cloud

Mikhmon Online, ticket sales via Orange Money and Moov Money, resellers and VPN. Free sign-up.