PiMesh turns any Raspberry Pi into a self-sufficient mesh network node using WiFi and batman-adv
.
Fully offline. No internet. No router. Just Raspberry Pis talking to each other.
- Creates an ad-hoc mesh WiFi network using
batman-adv
- Web dashboard served on each node (FastAPI + Tailwind)
- Message system between nodes (text exchange)
- Works on Raspberry Pi 5 and Raspberry Pi Zero 2 W
- Containerized (runs via Docker)
pimesh/
├── backend/ # FastAPI message API
├── frontend/ # Web interface (HTML + Tailwind)
├── mesh/ # Mesh networking setup scripts
├── Dockerfile # Backend container
├── docker-compose.yml
└── README.md
- Raspberry Pi with WiFi
- Raspbian OS (Lite or Desktop)
- Docker installed
batctl
,iw
,wireless-tools
Install dependencies:
sudo apt update
sudo apt install -y batctl iw wireless-tools
- Enable
batman-adv
kernel module:
sudo modprobe batman-adv
- Run the mesh setup script:
sudo bash mesh/mesh-setup.sh
This configures wlan0
in ad-hoc mode, joins the pimesh
network, and assigns IP 10.0.0.100
to bat0
.
You can change the IP in the script for each node.
docker compose up -d
Then visit:
http://<raspip>:8088
You’ll see the local node dashboard and message form.
To run mesh setup at boot:
sudo cp mesh/systemd.service /etc/systemd/system/pimesh.service
sudo systemctl enable pimesh
- Auto-discovery of other nodes
- Multi-hop message relay
- File sharing or media broadcast
- Node map visualization
MIT — Use it freely and build your own mesh 🛠️
Want to build mesh networks for events, villages or just for fun?
This project is for you.