JuanFi Cloud

JuanFi Cloud Setup Guide

Connect your MikroTik to JuanFi Cloud, add your vendos, record your sales and sell vouchers through GCash and Maya, all from one dashboard. Nothing on your router is replaced: JuanFi Cloud is the remote control, and your hotspot keeps working even when the dashboard is unreachable.

Overview

Setting up takes these parts, in this order. Only the first three are required; the rest are optional features.

#PartWhereRequired
1Get a Portal Key for your routerPortal KeysYes
2Connect the router (tunnel and router login)WinBox + Portal KeysYes
3Set the router's time zoneSystem & Tools › Time ZoneRecommended
4Add your vendosVendo › Vendo ListIf you have vendos
5Set WiFi ratesVendo › WiFi RatesIf you have vendos
6Turn on sales recordingHotspot › User ProfileFor the sales pages
7Customize and deploy the login pageHotspot › Portal TemplateOptional
8Sell vouchers with GCash / MayaVendo › E-WalletOptional
9Let the login page pick the vendo by itselfVendo › Auto-Select SetupOptional
0

Before you begin

  • A MikroTik router with internet access, running your hotspot (JuanFi or your own setup). Its configuration stays as it is.
  • WinBox (or the router's WebFig) and the router's admin login.
  • A WiFree / JuanFi Cloud account. Sign up at juanfi.cloud if you don't have one.
  • GCash or Maya to pay for the Portal Key.
  • For each vendo: its NodeMCU admin username and password.
Tip: make a backup of your router before you start (Files › Backup in WinBox). JuanFi Cloud asks before every change, but a backup is always good to have.
1

Get a Portal Key

A Portal Key is your router's subscription and ID in JuanFi Cloud. You need one Portal Key per router.

Step 1: Open Portal Keys

Sign in to JuanFi Cloud and open Portal Keys from the menu.

Step 2: Buy a Portal Key

Click Buy JuanFi Cloud, enter your mobile number and press Proceed Payment. Pay with GCash or Maya. A subscription costs ₱150 per 30 days.

Step 3: Wait for your details

Once the payment is confirmed, the new key appears in the Portal Keys table. Its SSTP Username, SSTP Password and MikroTik IP are shown when you open the key's settings. Keep them private.

Renewing: press the renew button on the key's row and choose how many days to add (₱5 per day). When a key expires it can't be selected on any page until it's renewed, but your router and hotspot keep working.
2

Connect your router

The router connects to JuanFi Cloud over a private SSTP tunnel, and JuanFi Cloud signs in to the router through that tunnel with a router user you create.

Step 1: Add the SSTP tunnel on the router

In WinBox open New Terminal and run the line below, using your own SSTP Username and Password from Step 1. The server address is vpn.juanfi.cloud.

/interface sstp-client add name=juanfi-cloud connect-to=vpn.juanfi.cloud user="YOUR-SSTP-USERNAME" password="YOUR-SSTP-PASSWORD" disabled=no

After a few seconds Interfaces should show juanfi-cloud with an R (running). Its address will be the MikroTik IP shown on your Portal Key.

Step 2: Turn on the API service

Open IP › Services and make sure api (port 8728) is enabled. JuanFi Cloud manages the router through it. If you later deploy a login page from Portal Template, enable ftp here too; the deploy page tells you which address to put in its Available From.

Step 3: Create a router user for JuanFi Cloud

Open System › Users and add a user just for JuanFi Cloud, with a strong password. The full group lets every JuanFi Cloud feature work (reading and changing settings, ping and speed test, and uploading login page files).

/user add name=juanficloud group=full password="CHOOSE-A-STRONG-PASSWORD"

Using a separate user means you can see JuanFi Cloud's changes in the router log, and you can switch it off at any time without touching your own login.

Step 4: Enter the router login in JuanFi Cloud

Back in Portal Keys, open the key's settings. Give it an Alias (for example the shop's name), enter the MikroTik Username and MikroTik Password you just created, and press Save changes.

Step 5: Test the connection

Press Test MikroTik Connection. It checks the username and password, that the router's API can be reached, and that the user may read router data. When it passes, every JuanFi Cloud page can work on this router: pick it from the Portal Key selector at the top of the page.

3

Set the time zone

Open System & Tools › Time Zone, choose your time zone (or Detect the time zone automatically), and turn on Keep the router's clock in sync. Voucher validity and sales times use the router's clock, so a wrong clock shows up as wrong expiry times and sales dates.

4

Add your vendos

Open Vendo › Vendo List and select your Portal Key.

A vendo that gets its address from the router (DHCP)

Add a vendo and pick its NodeMCU from the router's DHCP Lease list. Enter a name and the vendo's current Admin Username and Admin Password. JuanFi Cloud adds the IP Binding, firewall rule and Walled Garden entry the vendo needs.

A vendo with a static IP

Choose to add it by IP address and enter its IP and admin login instead.

Change the vendo's settings

The Configure NodeMCU action opens the vendo's own settings (network, coin slot, pins, admin access). The vendo usually restarts after saving; JuanFi Cloud waits for it and reads the settings back. The vendo must be online, so check it is powered and connected first.

No vendo? You can run a voucher-only hotspot: skip this part and turn on Voucher-only hotspot in Portal Template.
5

Set WiFi rates

Open Vendo › WiFi Rates, and press Edit Rates on a vendo under Registered Vendos. The rates are read from and saved on the vendo itself, so they apply to coins inserted at that vendo, and the vendo must be online.

6

Turn on sales recording

Sales come from the router: each sale is reported when the customer logs in, by the on-login script of the hotspot user profile. Profiles without it don't appear in the sales pages.

Open Hotspot › User Profile and press Login / Logout Scripts on the profile your vouchers use. Choose one:

Option A: the JuanFi Cloud script

Use the ready-made script and turn on Record sales to WiFree. You can also turn on Telegram login messages with your bot token and chat ID.

Option B: keep your own script

If you already have your own on-login script, keep it and turn on Record sales to WiFree. A small sales block is placed at the top of your script, and your script runs after it unchanged. The badge then shows Custom + Sales.

Your previous scripts are saved on the router before every change, so you can restore them from the same dialog. Only vouchers that use the JuanFi voucher format are recorded.

Once sales come in, see them in Dashboard, Sales › Sales Inventory and Sales › Daily Sales Report.

7

Customize and deploy the login page

Open Hotspot › Portal Template, select your Portal Key and the hotspot server profile.

  1. Set the Portal name, Logo / banner, colors (a preset, Light or Dark) and the Footer note. The Login page preview updates as you go.
  2. Under the vendo list, choose Use the vendos registered in Vendo List (recommended), or enter them by hand.
  3. Under Features, turn on what you need: Member login, Voucher-only hotspot, sounds and more.
  4. Press Deploy. The files are uploaded to the router, and the previous version is kept in Saved versions so you can roll back.
Deploying needs the router's ftp service on (see Connect your router, Step 2). If it's off, the deploy stops and tells you what to switch on.

Already using your own login page files? You can edit them directly in JuanFi Cloud instead of using the template.

8

Sell vouchers with GCash / Maya

Customers pick a rate on the login page, pay in their e-wallet, and get a voucher code that is created on your MikroTik. If the voucher can't be made, the payment is refunded.

Step 1: Set your payout account

Open Vendo › E-Wallet. Under Payout account, choose your Bank or e-wallet, enter the Account name and Account number, and set the Threshold (₱): the amount your earnings must reach before they're paid out (minimum ₱500).

Step 2: Add your rates

Under Rates, add the vouchers you want to sell (price, time, and optional validity and data limit), and choose the Hotspot User Profile the vouchers are created in. Use the profile with sales recording on, so e-wallet sales show in your sales pages too.

Step 3: Install the allow list

Under Allow list, press Install. This lets customers who haven't logged in yet reach the GCash, Maya and checkout pages. It also adds the pay window: when a customer starts a payment, their phone gets 90 seconds of internet so the GCash or Maya app can finish. It installs in batches; wait until the status says Installed.

Step 4: Turn it on and deploy

Switch E-wallet payments on and save. Then deploy your login page again from Portal Template so the GCash / Maya button appears. Rate changes later don't need a new deploy; turning e-wallet on or off does.

Using your own login page instead of the template? The Custom hotspot page settings on the same page tell JuanFi Cloud where your page's voucher box and login button are. See the payments in Sales › E-Wallet Transactions.
9

Let the login page pick the vendo (optional)

With several vendos, Vendo › Auto-Select Setup puts each vendo on its own VLAN and hotspot. The login page then knows which vendo the customer is near, without asking.

  1. Pick the Vendo, a VLAN ID, the interface the VLAN goes on, and the addresses. Choose which existing portal to Copy the portal from.
  2. Review the plan and apply it. JuanFi Cloud creates the VLAN, address, DHCP and hotspot for that vendo.
  3. Do the Two things left to do it lists: set the same VLAN on the vendo's access point yourself (JuanFi Cloud can't reach access points), and deploy the login page.
10

Share time between branches (optional)

If you have more than one JuanFi Cloud router, Portal Keys › Branch Roaming lets a customer who bought time at one branch use the rest of it at another. The customer types the same voucher code at the other branch; the time left, its expiry and any data limit move there.

  1. Press New group and name it, for example North. Then choose that group for each Portal Key that should share time. Keys in different groups, or in no group, never share time.
  2. For each key in a group, press Install under Access before login, so its login page can reach JuanFi Cloud. Not needed where the GCash / Maya allow list is installed.
  3. Deploy the login page again from Portal Template. With your own login page, copy the tag from the </> button instead.
The branch where the code was bought must be online when the customer first uses it at another branch. Sales stay with the branch that sold the code. Keys in a group can't use the MAC address as the voucher code, because a phone's MAC is different on each WiFi.

Everything else you can manage

  • Hotspot: Server, Server Profile, User Profile, Users, Members (customers with their own username and time balance), IP Bindings and Free Time.
  • Network: Interfaces, Bridges, VLAN, Addresses and IP Pool.
  • DHCP: DHCP Server, Networks and Leases.
  • Vendo › Voucher Generator: make vouchers for a vendo in batches, with optional thermal printing and adding them to sales.
  • System & Tools: MikroTik Logs, Speed Test and Ping.
  • Portal Keys › Transfer: hand a router and its Portal Key to another registered account by email. Payout and gateway settings are cleared for the new owner, and the transfer waits until all your earnings on the key are paid out.
  • More than one router? Each router has its own Portal Key; pick the one to work on at the top of each page. The sales pages can show all of them together.
?

Troubleshooting

Test MikroTik Connection fails

  • Check that the juanfi-cloud SSTP interface is running (R in Interfaces).
  • Check that api is enabled in IP › Services, and that its Available From doesn't exclude the tunnel.
  • Re-enter the MikroTik Username and Password; they're case-sensitive.
  • Make sure the Portal Key hasn't expired.

My Portal Key can't be selected

It has expired. Renew it in Portal Keys; it becomes selectable again right after the payment is confirmed.

The login page doesn't pop up when phones connect

If the page opens when you type the router's address but not by itself, phones probably get no DNS before login. The most common cause is a NAT rule that forces all DNS (port 53) to the router.

In IP › Firewall › NAT, open that rule, go to the Extra tab, and set Hotspot to from-client with the ! box ticked (not from-client). Other clients (PPPoE and so on) are still forced to the router's DNS. Auto-Select Setup also warns you when it sees this rule.

The login page opens, then closes by itself and says "Connected"

The phone's "am I online?" check is getting through the e-wallet allow list. Open Vendo › E-Wallet: if the allow list says Update needed, press Install once. This limits the allow list to secure (HTTPS) pages, so the phone's check is caught by the hotspot again while payment pages keep working.

GCash says "Sorry about that, please check your internet connection"

This usually happens when the payment opens in the GCash app on a phone with no mobile data. The app needs more servers than the web checkout, and some may not be reachable before login.

  • Check the allow list in Vendo › E-Wallet says Installed. If not, press Install until it does, then deploy your login page again so it uses the 90-second pay window. A custom login page needs the data-client-ip and data-client-mac lines from the widget code.
  • Ask the customer to turn on mobile data just for the payment, or to pay in the browser instead of the app.
  • If it keeps happening, contact support with the time it happened and the Portal Key, so the missing address can be added to the allow list for everyone.

Customers lose their time after reconnecting (random MAC)

Most phones connect with a private (random) MAC. If it changes, for example after the customer forgets the WiFi and joins again, the hotspot sees a new device.

  • The time is saved on the voucher code, so the customer can type the code again and keep their remaining time. If the old connection is still open, the login page waits and tries again by itself for up to 2 minutes.
  • Keep Random MAC protection on in Settings › Portal Template › Features, then deploy. Phones on a private MAC see how to switch to their real MAC, and a reminder to save their code.
  • Avoid Use the device's MAC address as the voucher code: with it, the time belongs to the MAC and is lost when the MAC changes.

A code from another branch isn't accepted

  • Both Portal Keys must be in the same group in Portal Keys › Branch Roaming, and the group needs at least two keys.
  • The branch where the code was bought must be online, and this branch must show Installed (or Ready) under Access before login.
  • Deploy the login page again after adding a key to a group. Member accounts (with their own password) can't move between branches.

Sales don't show in the sales pages

  • Check that the voucher's hotspot user profile has sales recording on (Hotspot › User Profile, badge JuanFi or Custom + Sales).
  • A sale is recorded when the customer logs in, not when the coin is inserted.
  • Check the router's clock in System & Tools › Time Zone.

A vendo can't be configured

JuanFi Cloud checks that the vendo is online first. Make sure it's powered on, has a DHCP lease (or answers on its static IP), and that its admin username and password haven't changed.