OculusDocs

Connecting a router

What your MikroTik needs, the onboarding script, and what it changes.

Before you start

You need:

  • A MikroTik router running RouterOS 7.10 or later. Check under System → Resources in WinBox, and upgrade for free under System → Packages → Check for updates. Oculus secures logins between your router and its servers with TLS (RadSec), which needs RouterOS 7.
  • A working hotspot on the router. If you don't have one yet, run IP → Hotspot → Hotspot Setup in WinBox (or /ip hotspot setup in the terminal) and follow the wizard. Oculus takes over an existing hotspot; it doesn't create one.
  • Internet on the router, with these outbound connections allowed:
ToPortUsed for
OculusTCP 443 (HTTPS)Fetching configuration and your login page
Oculus RADIUSTCP 2083 (RADIUS over TLS)Checking logins and recording usage
Time serversUDP 123Keeping the clock right, so vouchers expire on time

Nothing needs to connect in to your router. A public IP address, port forwarding and a VPN are not required.

Generate the script

  1. Go to Sites and click Add router next to the site — or Devices → Add router.
  2. Give the router a name you'll recognise, such as lodge-hex-01.
  3. Pick the router's RouterOS version.
  4. Enter the hotspot server to connect. Find its name under IP → Hotspot → Servers; the setup wizard calls it hotspot1. Only this hotspot is switched to Oculus — any other hotspot on the router keeps working as before.
  5. Choose how Oculus manages the router (see below), then Generate script.

The script contains your router's passwords and is shown once. Copy it before you close the window. If you lose it, generate a new one — the old one stops working.

Put the script on the router

You get two ways to deliver it. Both do exactly the same thing.

Paste into the terminal. Open WinBox → New Terminal and paste the whole script. The script is a single block, so RouterOS waits for all of it before it starts.

Fetch with /import. Run the one-line command instead. The router downloads the script itself, runs it, and deletes the file afterwards. This is easier over a slow connection or from a phone. The command works once, within 15 minutes.

Either way, the router checks itself first. If the RouterOS version is too old or the hotspot name is wrong, it stops with a message and changes nothing.

When it finishes you'll see:

version check passed: 7.19.5 (stable)
hotspot server found: hotspot1
radsec certificate installed
radius (radsec) + walled garden configured
ntp configured
management: polling every 60s (outbound only)

Oculus onboarding complete.

The router shows as Online on the Devices page within a minute.

What the script changes

AreaChange
CertificatesInstalls this router's own security certificate, so its logins reach Oculus encrypted
RADIUSAdds Oculus as the login server for your hotspot, over TLS
Your hotspot serverSwitches its profile to check logins with Oculus
Walled gardenLets customers reach your login page and your payment gateway's checkout before they're online
ClockTurns on NTP time sync
SchedulerAdds a task that checks in with Oculus
Login pagesAdds a oculus-hotspot folder with small pages that forward customers to your Oculus login page, and points your hotspot at it

It does not touch your bridges, IP pools, DHCP, firewall rules, or any other hotspot. Your router's own hotspot folder — its original login page and anything you customised — is left exactly as it was. Everything Oculus adds is labelled oculus, and running the script again replaces the earlier version rather than adding a second copy.

How Oculus manages the router

Polling (the default)

The router checks in with Oculus on a schedule — every 60 seconds by default — to pick up changes and report its status. Because the router always makes the connection, it works behind any network, including mobile data and Starlink.

The only cost is a short delay: a change you make, or a voucher you revoke, reaches the router at its next check-in. You can set the interval from 30 seconds to 15 minutes; longer is gentler on a metered or satellite link.

Real-time management

Oculus can instead keep a secure WireGuard connection to the router. Changes apply immediately, and revoking a voucher disconnects the customer at once. It's most useful for sites with a fixed public IP. This option appears only when it's enabled for your account.

After connecting

The Devices page shows each router's status:

StatusMeaning
PendingScript generated, router not heard from yet
OnlineChecking in normally
OfflineHasn't checked in for 15 minutes — see Troubleshooting
UnsupportedRouterOS is older than 7.10 — upgrade the router

Changes made on the router. If someone edits an Oculus setting directly in WinBox, the Devices page flags it. Oculus never reverses it on its own. Choose Acknowledge to keep the change, or Re-adopt to put Oculus's settings back.

Removing Oculus from a router

Use the router clean-up script: Devices → Router clean-up. It's also offered when you remove a router, and on Account once your organisation is scheduled for deletion.

Run the one line it shows in the router's terminal (WinBox → New Terminal). The router downloads the script, runs it and deletes the file. For a router without internet, paste the whole script instead.

The script:

  • stops the router checking in with Oculus, first, so nothing is put back halfway through;
  • switches your hotspot back to its own login page and local users;
  • removes Oculus's RADIUS servers, security certificates, walled-garden entries, user profiles, login-page files and time servers;
  • ends logins that came through Oculus;
  • removes the WireGuard tunnel and API user, on routers that had real-time management.

It doesn't touch your bridges, IP pools, DHCP, firewall rules or local hotspot users, and it's safe to run more than once. The same script works on every router. If you used RADIUS from another provider before Oculus, switch it back on under IP → Hotspot → Server Profiles afterwards.

On this page