Connect ESP32 agent
The step after flashing: join the board's setup Wi-Fi, give it your Wi-Fi network and your agent token, and watch the tunnel come up — until this is done the agent stays offline in the dashboard.
Before You Start
- Your ESP32 is already flashed with the MikRouter agent firmware. If it isn't, do that first — see Flash an ESP32.
- You need a MikRouter account with at least one agent created under Agents.
- Open the agent's detail page and keep its
tokenandtunnel hostnearby — you'll paste them into the device. - The name and password of the site's 2.4 GHz Wi-Fi network — ESP32 boards cannot see or join 5 GHz networks.
A flashed ESP32, ESP32-S3, ESP32-C6 or ESP32-C3 knows nothing yet — not your Wi-Fi, not which agent it is. You tell it both through its own setup portal: the board broadcasts a Wi-Fi network, you join it from a phone or laptop, and fill in one form. It takes a couple of minutes and you only do it once per board.
Copy the agent token from the dashboard
New token — save it now
Copy this token now — it is shown only once and cannot be retrieved later. If you lose it, regenerate a new one (which disconnects the old agent).
Photographing the screen is unreliable
Power the board and join its setup Wi-Fi
MikrouterAgent-XXXXXX — the last six characters are this board's own MAC address, so yours will differ from the one shown here. Join it from your phone or laptop.Wi-Fi networks
MikrouterAgent-XXXXXX
Open network — no password
TP-Link_XXXX
Neighbour_2G
OfficeGuest
No such network?
Open the portal and log in
http://192.168.4.1/. The default portal password is mikrouter.No internet connection
192.168.4.1/login
MikRouter Agent
Enter the portal password to continue
Password
Your phone will say No internet connection the whole time you are on this network. That is expected — the board's setup network is not an internet connection, it only serves this page.
Check the status — a fresh board is not configured
No internet connection
192.168.4.1
MikRouter Agent
Reverse-tunnel agent — local setup portal
Status
Firmware
1.0.0
Mode
AP (setup)
Wi-Fi
not configured
Setup Wi-Fi
MikrouterAgent-XXXXXX (open) @ 192.168.4.1
IP address
192.168.4.1
Signal
-
Tunnel server
(not set)
Tunnel status
disconnected
Active streams
0 / 10
RAM available
191 KB
Device token
NOT set
Fill in Wi-Fi, tunnel host and token
| Field | Value | Note |
|---|---|---|
| host | test.mikrouter.com | Example only — see below |
| port | 443 | TLS port |
| tls | true | Always on |
| token | <your agent token> | From the agent detail page |
test.mikrouter.com is not a real address — it's a stand-in for this guide. Your agent's real tunnel host depends on the agent server you picked when you created the agent, so copy the exact value from the agent's detail page rather than typing the one shown here.
No internet connection
192.168.4.1
Configuration
Wi-Fi password
Tunnel server host
Tunnel server port
2.4 GHz only
_5G variant, pick the one without it — and if it never shows up in the scan, check the router isn't broadcasting that name on 5 GHz only.Confirm the tunnel is connected
MikrouterAgent-XXXXXX (the setup network stays up after the board connects) and reload http://192.168.4.1/. The status section should now read AP + STA (connected), show the IP address your router handed the board, and Tunnel status: CONNECTED.No internet connection
192.168.4.1
MikRouter Agent
Reverse-tunnel agent — local setup portal
Status
Firmware
1.0.0
Mode
AP + STA (connected)
Wi-Fi
connected: MyHomeWiFi
Setup Wi-Fi
MikrouterAgent-XXXXXX (open) @ 192.168.4.1
IP address
192.168.1.100
Signal
-67 dBm
Tunnel server
test.mikrouter.com:443 (wss)
Tunnel status
CONNECTED
Active streams
0 / 10
Device name
Front Desk Agent
RAM available
191 KB
Device token
set
If it doesn't connect — or says it did
Confirm the agent is Online in the dashboard
Front Desk Agent
ESP32-S3OnlineAgent
Live status reported by the agent — only while it's online.
Hardware
ESP32-S3
Wi-Fi network
MyHomeWiFi
Wi-Fi signal
-67 dBm
Good
IP address
192.168.1.100
Firmware
v1.0.0
RAM available
191 KB
Active streams
0 / 10
Connected
26m