By 2026, the Raspberry Pi 5 has become the undisputed king of the "Prosumer Edge." With its PCIe support for NVMe drives and significantly improved thermal management, it’s no longer just a toy—it’s a viable production environment for localized AI, smart home hubs, and private cloud storage.
But running a single Pi is a single point of failure. To get true reliability at the edge, you need a cluster. In this guide, we’ll build a 3-node "Pikube" (without the K8s overhead) that fits in the palm of your hand.
Why Swarm for the Edge?
If you’ve tried running Kubernetes on a Pi, you know the pain: the control plane can consume 1.5GB of RAM before you even deploy a single container.
Docker Swarm is different. It is baked into the Docker engine. On a Raspberry Pi 5, the Swarm overhead is nearly invisible, leaving all those glorious 8GB of RAM for your actual workloads.
Phase 1: The Hardware Prep
For a Production-Ready Edge cluster, we recommend:
- 3x Raspberry Pi 5 (8GB RAM models): The extra headroom is vital for AI sidecars and real-time observability.
- NVMe Base/HAT: Skip the SD cards. They will fail under heavy Docker logging. Use NVMe SSDs for boot and data storage.
- PoE+ HATs: This allows you to power all three nodes via a single ethernet switch—keeping your "cluster" cable-managed and professional.
OS Choice
Stick with Raspberry Pi OS (64-bit) or Ubuntu Server 26.04 LTS. Ensure you enable cgroups in cmdline.txt if they aren't on by default.
Phase 2: Installing Docker (The Quick Way)
On all three nodes, run the standard convenience script:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
[!TIP]
Add your user to thedockergroup so you don't have to typesudofor every command:
sudo usermod -aG docker $USER(Log out and back in for this to take effect).
Phase 3: Initializing the Swarm
Pick your "Lead" Pi (let's call it pi-manager-01) and run:
docker swarm init --advertise-addr <YOUR-PI-IP>
Docker will provide a join-token. Copy that, SSH into your other two Pis, and paste it.
Verify with SwarmCLI
This is where SwarmCLI saves you from opening multiple terminal windows. From your laptop, connect to your manager node and run:
swarmcli node list
You’ll see a beautiful, real-time status of your Pi cluster. If one Pi is running hot or throttled, SwarmCLI will highlight the status so you can investigate before the node goes offline.
Phase 4: Edge-Specific Optimizations
Running on ARM hardware at the edge requires a few tweaks.
1. Label Your Nodes
In an edge setup, you might have one Pi with a camera attached. Use labels to tell Swarm where to put specific tasks.
docker node update --label-add hardware=camera pi-manager-01
2. Manage Log Rotation
Edge storage (even NVMe) can fill up fast. Update your /etc/docker/daemon.json:
{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}
3. Monitoring with SwarmCLI
Instead of installing a heavy monitoring stack like Prometheus/Grafana, use:
swarmcli service stats
This gives you a lightweight view of CPU cycles across the entire cluster without taxing the Pi's resources.
Conclusion: The Power of Three
A 3-node Raspberry Pi 5 Swarm cluster provides:
- High Availability: One Pi can fail completely, and your services will migrate gracefully.
- Low Power: The entire cluster pulls less than 40W under load.
- Simplicity: No complex networking plugins required—just native Swarm power.
What's Next?
- [Coming March 19]: Secure by Design: Managing Docker Swarm Secrets the SwarmCLI Way.
- [Coming March 23]: Troubleshooting 'Pending' tasks on ARM devices.
Previous articles
- [March 09]: The Definitive Docker Swarm Guide for 2026
- [March 12]: Docker Swarm vs. Kubernetes in 2026: The Case for Staying Simple
- [March 16]: The Ultimate Edge Cluster: Setting up a 3-Node Swarm on Raspberry Pi 5 (2026)
Why SwarmCLI?
By 2026, we noticed a gap. Docker Swarm was rock solid, but the management tooling felt stuck in 2017. SwarmCLI bridges that gap with:
Real-time Health: Stop guessing which node is throttled.
Atomic Secret Sync: One-command .env to Raft encryption.
Edge-Optimized: Built in Go for zero-overhead on ARM/RPi5 devices.
Top comments (0)