ClientNodetonetDeviceTarget IOT DEVELOPMENT nodetonet.com
Use case IoT ESP32 Raspberry Pi MQTT

Nodetonet for IoT development — expose ESP32, Raspberry Pi or MQTT brokers safely

Expose your ESP32 web UI, MQTT broker or Raspberry Pi dashboard on a real HTTPS domain with per-tunnel auth, IP allowlists and TCP tunnels for non-HTTP protocols. No router config needed.

N Nodetonet Team
May 15, 2026 9 min read

You're prototyping an ESP32 firmware. The device hangs off your home Wi-Fi. The web UI it serves is genuinely useful — but only when you're on the same LAN. The MQTT broker on your Raspberry Pi talks to half a dozen sensors, but the dashboard you're building lives on a Vercel preview deploy that has no way to reach 192.168.1.42:1883.

TL;DR: Nodetonet HTTP tunnels bridge the gap between devices inside a home router and services on the open internet — over a real HTTPS domain, with TCP pass-through for MQTT, per-tunnel IP allowlists, and a pay-as-you-go model that makes a weekend prototype cost less than a coffee.

This is the IoT-developer trap: the device is in your network; the consumer of that device is increasingly not. Tunneling solves this — and unlike a generic "make a web app reachable" tunnel, IoT workloads have specific needs: TCP for MQTT and Modbus, custom domains so device URLs are memorable, regional edge servers so latency stays low, and per-tunnel access controls so the rest of the internet cannot poke your homelab.

The problem with IoT prototyping

Three things make IoT different from a normal web app:

Generic tools — ngrok, Cloudflare Tunnel, LocalToNet — solve the reachability problem but leave the rest half-answered. See how they compare in our Nodetonet vs ngrok, vs Cloudflare Tunnel and vs LocalToNet pages.

How Nodetonet fits IoT workloads

For each device you want to reach from the outside, you create one of two tunnel types:

  1. HTTP tunnel with auto-issued Let's Encrypt certificate — for the ESP32 web UI, the Home Assistant dashboard, the Grafana panel on your Pi, the Node-RED editor. The cert auto-renews before it expires.
  2. TCP tunnel for everything else — MQTT, Modbus, RTSP cameras, raw socket protocols. The edge holds an open TCP listener and proxies bytes to your device with no HTTP parsing in the way.

Both tunnel types share a common set of features that matter for IoT work:

Tunnel type comparison for IoT protocols

ProtocolTunnel typePort exampleTLS at edge?Notes
HTTP web UIHTTP tunnel80 / 8080Yes — auto certESP32, Home Assistant, Grafana, Node-RED
MQTT plainTCP tunnel1883Pass-throughBroker auth required on the app layer
MQTT over TLSTCP tunnel8883Pass-throughClient validates broker cert end-to-end
Modbus TCPTCP tunnel502Pass-throughSCADA / PLC lab testing
RTSP videoTCP tunnel554Pass-throughIP camera preview; high-bandwidth bursts
Custom TCPTCP tunnelanyPass-throughSerial-over-IP bridges, custom sensors

Step-by-step setup: Raspberry Pi as an MQTT beta server

Here is a concrete walkthrough — a Raspberry Pi running Mosquitto and Home Assistant, reachable from a Vercel-hosted dashboard:

  1. Install the Nodetonet Windows agent (/download) on a PC on the same LAN as the Pi, or install the Linux agent directly on the Pi. See installing the agent.
  2. On the panel, create a TCP tunnel: target 127.0.0.1:1883, bind mqtt.yourname.dev, choose the edge region nearest to your dashboard hosting.
  3. Add an IP allowlist: include the Vercel egress range and your laptop's IP. Everyone else hits connection-refused at the edge.
  4. Create a second tunnel — HTTPS to 127.0.0.1:8080 — for the Home Assistant web UI. Bind ha.yourname.dev. The cert auto-issues in roughly 30 seconds.
  5. Update your dashboard environment variables: MQTT_HOST=mqtt.yourname.dev, MQTT_PORT=1883. Deploy. Done.

The agent on the Pi reconnects automatically after reboots, so the tunnel stays live as long as the Pi is running. Read device health: what "online" means for the reconnection behaviour.

Code example: ESP32 publishing to your tunneled broker

An ESP32 Arduino sketch publishing temperature readings to the Mosquitto broker on your Pi via the Nodetonet tunnel. The ESP itself needs no special config — it talks to mqtt.yourname.dev:1883 exactly as if the broker were a cloud service:

#include <WiFi.h>
#include <PubSubClient.h>

const char* SSID      = "homewifi";
const char* PASS      = "supersecret";
const char* MQTT_HOST = "mqtt.yourname.dev";
const int   MQTT_PORT = 1883;

WiFiClient   net;
PubSubClient mqtt(net);

void setup() {
  WiFi.begin(SSID, PASS);
  while (WiFi.status() != WL_CONNECTED) delay(200);
  mqtt.setServer(MQTT_HOST, MQTT_PORT);
  while (!mqtt.connect("esp32-kitchen", "user", "pass")) delay(500);
}

void loop() {
  float t = readDHT22();
  char buf[16];
  snprintf(buf, 16, "%.1f", t);
  mqtt.publish("home/kitchen/temp", buf, true);
  delay(30000);
}

Notice that the sketch is identical to what you would use against any cloud MQTT endpoint. The tunnel is transparent to the ESP32 firmware. You could host a cloud MQTT broker for a monthly fee per device fleet — or keep using the broker on the Pi you already own, reachable through a per-day tunnel that costs nothing when stopped.

Automating tunnel management via the API

For teams running automated test rigs, Nodetonet exposes a REST API so you can create tunnels on-demand, tear them down after a test run, and never pay for idle time. See REST API: your first call for the authentication and endpoint reference, and programmatic tunnel creation in Python for a full CI integration example.

A typical CI flow:

  1. Build step spins up a tunnel to the device-under-test.
  2. Test suite runs against the public tunnel URL.
  3. Post-test teardown deletes the tunnel. Billing stops.

Pricing for this workload

Nodetonet uses prepaid credit — no monthly subscription, no per-GB charge on tunnel data. Each tunnel accrues a small daily charge only while it is active. Typical IoT-developer setups:

Compare that with a managed IoT cloud subscription (typically $10–50/month minimum before data charges), or running everything on a public VPS where you still need a tunnel or VPN for the device side and pay for compute that was already in your home. Read introducing pay-as-you-go pricing for the full model.

When Nodetonet tunnels are not the right fit

For a single developer prototyping on a Pi, or a small team running a beta with a handful of ESP32 boards: Nodetonet is the shortest path from "works on my desk" to "works from a customer's phone". Create a free account and have your first tunnel live in under a minute.

Frequently asked questions

Can I tunnel an MQTT broker over TLS (port 8883)?
Yes. Create a TCP tunnel pointing to your broker's port 8883. The TLS handshake passes through end-to-end — the client validates the broker's own certificate and Nodetonet acts as a transparent transport. Your broker's certificate is never exposed to the tunnel layer.
Will the tunnel survive my ESP32 or Raspberry Pi rebooting?
The Nodetonet agent on the device reconnects within seconds and the tunnel slot is held during a configurable grace window, so short reboots are transparent to clients. For longer outages the agent reconnects when the device comes back online. Read more about device health and reconnection.
How do I prevent the internet from accessing my MQTT broker?
Use three layers: (1) an IP allowlist on the tunnel — only your dashboard's egress IPs can connect; (2) broker-level authentication (username + password or mTLS in the app); (3) a domain restriction so the broker's endpoint is not publicly discoverable. The IP allowlist alone drops the vast majority of unwanted scans at the edge before they reach your device.
Does the agent run on ARM (Raspberry Pi Zero, BeagleBone)?
We ship binaries for Linux x86_64 and ARM64 (Pi 4, Pi 5, Pi Zero 2W), Windows x64, and macOS x64/arm64. ARMv7 (the original Pi Zero W, BeagleBone) is on the roadmap. Contact support if you need an interim workaround for ARMv7 boards.
Can I use Nodetonet tunnels in a CI/CD pipeline to test embedded firmware?
Yes. The REST API lets you create a tunnel programmatically at the start of a build, run your firmware tests against the public URL, then delete the tunnel when the job finishes — billing stops immediately. See programmatic tunnel creation in Python for a worked example.
What is the difference between an HTTP tunnel and a TCP tunnel for IoT?
An HTTP tunnel terminates HTTP/S at the edge, auto-issues a TLS certificate and forwards HTTP requests to your local service — ideal for web UIs and dashboards. A TCP tunnel opens a raw port on the edge and forwards all bytes unchanged, which is required for MQTT, Modbus and other non-HTTP protocols where you don't want any HTTP layer in between.
Is there an easy way to check what IP my tunneled device is showing to the internet?
Yes — use the free What is my IP tool. Route a request through your tunnel to that URL from the device or your test client and you'll see the exact IP, location and ASN the tunnel exit presents to external services.

Expose your homelab in 60 seconds

HTTPS, custom domain and per-tunnel auth. No router setup.