Developer builds private AI home assistant using MQTT to avoid open ports or VPNs

A developer wanted to query a home GPU-powered Ollama instance from their phone without exposing their network to the internet. Instead of the usual Docker, reverse proxy, and VPN setup, they used MQTT — a publish/subscribe messaging protocol — as a neutral meeting point between their phone and home PC. Neither the home machine nor the browser client accepts incoming internet connections; all communication is routed through a rented Linux server running a Mosquitto MQTT broker. The entire system spans roughly 1,000 lines of code across a static browser page, a lightweight PC service, and a Python plugin handling tokens and Ollama calls. The developer noted alternatives like Tailscale and Cloudflare Tunnel but preferred MQTT for its simplicity, device-agnostic access via URL, and reliance on broker-level authentication rather than a custom auth layer.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in