From sensor data to answers, on your own hardware.
p4n4 is a command-line tool that sets up a self-hosted IoT and AI stack with Docker Compose. One command gives you MQTT messaging, a time-series database, dashboards, local LLMs and edge model inference, on anything from a Raspberry Pi to a GPU server.
The MING stack (Mosquitto, InfluxDB, Node-RED, Grafana) handles sensor data. The AI layer runs local LLMs, System 1 and your edge ML models beside it, on one Docker network. Start only the parts you need.
--layer. Only those start.The init wizard creates the project and generates every password and token. Then p4n4 up starts it.
--layer.Six example projects in p4n4-templates, each built around a real use case.
Templates are a work in progress. Each one's README explains how to run it.
Browse templatesA trained model labels each sensor reading in milliseconds. When one looks wrong, System 1 suggests a likely cause from a list you define, and a local LLM explains it in plain words.
MING is a common open source IoT stack. p4n4 uses it as the base and adds local LLMs and edge ML models on top.
p4n4 runs on 64-bit Linux with Docker, on ARM64 or x86-64. We test on a Raspberry Pi 5, a Jetson Orin Nano and an embedded Linux computer. The other boards below should work but haven't been tested. Models run on the CPU by default, and NVIDIA GPUs work through a Compose override file.
p4n4-emu runs your project on your workstation with a real board's CPU, memory and disk limits. Its settings go in a separate Compose file, so your project files don't change.
RPi.GPIO, so Pi code runs off the Pi.You need Docker 24+ with Compose v2, Python 3.11+ and Git. p4n4 uses Git to download the stack files.
p4n4 0.3 is for development and trusted local networks. Don't expose its ports to the internet.