All guides

Run an IoT server for your ESP32 on a Raspberry Pi

This guide shows how to run the Plynx server on a Raspberry Pi and connect an ESP32 to it. Your boards talk to a box on your own network, and your iPhone shows the dashboard on top. The hardware is probably already on your desk, and the whole thing takes about an hour.

There is a particular kind of peace that comes from unplugging your projects from other people’s computers. No terms of service, no pricing page, no sunset announcement email can reach a Raspberry Pi on your bookshelf. Your irrigation controller reports to a box you can physically point at.

The architecture

Three pieces, all on your network:

  1. Your boards connect to the server over TCP and sync pin state.
  2. The server, a single open source jar file on the Pi, holds project state and history.
  3. Your iPhone runs Plynx, a free app that renders your widgets and talks to the same server.

The server is the open source legacy server, a GPL-3.0 fork of the discontinued Blynk local server, currently at release 0.41.18. It is a mature, self-contained Java application that has been running in basements and greenhouses for the better part of a decade. Plynx speaks its protocol natively, which is precisely the point: proven server, modern app.

What you need

  • Any Raspberry Pi. A Pi Zero 2 W is plenty: the server uses between 100 and 200 MB of memory and near zero CPU for hobby workloads. A Pi 3, 4 or 5 is obviously fine too.
  • An SD card with Raspberry Pi OS Lite, SSH enabled.
  • Ten minutes of terminal comfort.

Running a VPS or an Ubuntu server instead of a Pi? The Ubuntu guide covers both, with a Let’s Encrypt certificate and a firewall.

Step 1: install Java

The server needs a Java runtime. On Raspberry Pi OS:

sudo apt update
sudo apt install -y default-jre-headless
java -version

Any Java 11 or newer runtime works.

Step 2: download and run the server

mkdir -p ~/plynx-server/data
cd ~/plynx-server
wget https://github.com/NickP005/plynx-server/releases/download/v0.41.18/plynx-server-0.41.18.jar
java -jar plynx-server-0.41.18.jar -dataFolder ./data

The jar is built by GitHub Actions from the tagged source, and every release carries a .sha256 next to it if you want to check the download.

First launch creates the data folder and prints successfully started, the address of the admin panel and a generated admin password. Boards connect on port 8080 and the app on port 9443. That is the whole install. Press Ctrl+C for now, we will make it a proper service.

Step 3: make it survive reboots with systemd

Paste this block as the user who downloaded the server. It writes the service file with your username and home folder filled in, then starts it:

sudo tee /etc/systemd/system/plynx-server.service > /dev/null <<EOF
[Unit]
Description=IoT dashboard server
After=network-online.target
Wants=network-online.target

[Service]
User=$USER
WorkingDirectory=$HOME/plynx-server
ExecStart=/usr/bin/java -jar $HOME/plynx-server/plynx-server-0.41.18.jar -dataFolder $HOME/plynx-server/data
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable --now plynx-server
systemctl status plynx-server --no-pager

From now on the server starts with the Pi and restarts itself if it ever crashes. Give the Pi a static IP or a DHCP reservation in your router so the address never changes. Better yet, use its mDNS name, something like raspberrypi.local.

Step 4: connect the app

On the iPhone, install Plynx from the App Store. On the sign-in screen tap Server, choose Private Server, and enter your Pi’s address with port 9443. Register an account (it lives on your Pi, not on anyone’s cloud), create a project, add a Button widget on virtual pin V1, and copy the auth token from the project settings.

Step 5: point a board at your Pi

The only change from any standard sketch is the server address:

#define PLYNX_PRINT Serial
#include <WiFi.h>
#include <PlynxSimpleEsp32.h>

char auth[] = "YOUR_AUTH_TOKEN";
char ssid[] = "YOUR_WIFI";
char pass[] = "YOUR_WIFI_PASSWORD";

void setup() {
  Serial.begin(115200);
  Plynx.begin(auth, ssid, pass, "192.168.1.50", 8080);  // your Pi
}

void loop() {
  Plynx.run();
}

Remember to use the Plynx library, as covered in the getting started guide. Flash it, watch the Serial Monitor print Ready, and tap your button. The round trip is your phone to your Pi to your board, entirely inside your walls. Latency is whatever your WiFi does, typically a few milliseconds.

Remote access without opening ports

The clean 2026 answer is an overlay network. Install Tailscale (free for personal use) on the Pi and on your iPhone, and your phone reaches the Pi from anywhere as if it were home, with zero exposed ports and WireGuard underneath:

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

Then use the Pi’s Tailscale address as the server host in the app. Your boards at home keep using the LAN address. Avoid classic port forwarding unless you know exactly why you want it: an open port on a hobby server is a liability you do not need.

Backups, because SD cards die

All state lives in the data folder, so backups are one line. This adds a nightly job to your crontab that archives it:

(crontab -l 2>/dev/null; echo '0 3 * * * mkdir -p $HOME/backup && tar czf $HOME/backup/plynx-data-$(date +\%u).tar.gz -C $HOME/plynx-server data') | crontab -

Seven rotating daily archives, a few hundred kilobytes each for typical hobby use. Copy them off the Pi with rsync or syncthing and an SD card failure becomes a twenty minute annoyance instead of a lost year of sensor history.

Maintenance, honestly

This setup is pleasantly boring. The server never updates itself: the jar you install today keeps running until you replace it. When a new release appears on GitHub, upgrading means downloading the new jar and changing the file name in the service. Your maintenance is the Pi itself: sudo apt upgrade when you remember, and maybe a fresh SD card every few years. Compare that with the changelog anxiety of a cloud platform that can redesign your dashboard on a Tuesday.

The payoff

For the cost of an hour and a Raspberry Pi you already had, you now own the entire stack: board, network, server, dashboard. Sensor history accumulates on your shelf. Everything keeps working when your internet is down. And the app on your phone is genuinely nice to use: native widgets, Home Screen shortcuts to your pins, your tank level on your Apple Watch.

Plynx is free on the App Store, with no ads and nothing to unlock. Point it at the Pi you just set up and your projects are finally, completely yours.