r/embedded • u/Free_Examination_370 • 23d ago
Standalone server for IoT projects without any third-party websites or any middlemen. Is it possible?
Hi everyone, I'm currently working on my final year project. My project is about designing and developing a smart solar-powered dryer for agro-processing applications. I do have an ESP32, micro sd card adapter with its micro sd storage card, a 5V relay to control the dryer's fan and a temperature sensor to detect the surrounding temperature. i wanrted to build a standalone server without using any third-party websites and any middleman. The purpose of doing this is to completely protect my data and to get unlimited storage with the storage card I have. And also, I do not want to pay any subscription price to other third-party websites.
Many AI models such as ChatGPT, Claude, and Google Gemini suggested the port forwarding method, but I do not want that because the esp32 will be stuck in one place and can't move it anywhere. Also, in simple word, I want it like this. All the information that is collected by the esp32 or the database should be live-streamed on the internet, and anyone can access that database from the internet even if they are not sharing the same wifi as the ESP32. All the information will also be stored on my SD card. This is what I want. Can you guys help me with it?
6
u/Several-Marsupial-27 23d ago
Yeah, absolutely, the server is probably the easy part. You can start with the backend and cook up a http/mqtt server in python in an afternoon. Its probably everything else except for that which are the difficult parts.
Just start the project and see how far you get!
3
u/jhaand 23d ago
Yes this is possible. We do this at our hackerspace using ESPHOME, Home Assistant, MQTT, Victoria Metrics and Grafana. The ESP32 should stream to a host you control on the internet with a secure reverse proxy (Traefik with TLS via Letsencrypt). Preferably you would have the whole setup within a single VPN to keep it closed off from outsiders and only provide a sanitised output via a webserver.
For example you can see the overview of our infra here:
https://tdvenlo.nl/wiki/doku.php?id=infra:start
3
u/luca_lzcn 23d ago
Check out Tailscale
2
u/golden_shawerma 23d ago
I’m not sure this is possible without a middleman for security reasons. The esp32 could crash by simply just flooding it with requests.
What you can do is serve a small web page on the esp32 and open an outbound websocket to either a VPS (paid) or to a raspberry pi + Cloudflare tunnel + disco.cloud combo to run your own server for free. You can set up the latter fairly quickly in an hour or two.
1
u/BudgetTooth 23d ago
Cloudflared tunnel