← Back to list

The Ultimate Edge Cluster: Setting up a 3-Node Swarm on Raspberry Pi 5 (2026)

Learn how to harness the power of the Raspberry Pi 5 to build a low-latency, high-availability edge cluster. We walk through the hardware…

SwarmCLI · 2026-03-19 11:14 · 1 claps · 3.3 min read
#devops #raspberry-pi #docker-swarm #docker
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud 📟 · Gadgets & IoT

The Ultimate Edge Cluster: Setting up a 3-Node Swarm on Raspberry Pi 5 (2026)

Learn how to harness the power of the Raspberry Pi 5 to build a low-latency, high-availability edge cluster. We walk through the hardware setup and light-speed Swarm initialization.

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:

  1. 3x Raspberry Pi 5 (8GB RAM models): The extra headroom is vital for AI sidecars and real-time observability.
  2. NVMe Base/HAT: Skip the SD cards. They will fail under heavy Docker logging. Use NVMe SSDs for boot and data storage.
  3. 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:

Terminal

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

[!TIP] Add your user to the docker group so you don't have to type sudo for 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:

Terminal

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 launch:

swarmcli

It opens a beautiful, real-time dashboard of your Pi cluster. Press :node to navigate to the nodes view. If one Pi is running hot or throttled, SwarmCLI will highlight its health status in real-time so you can investigate before the node goes offline.

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.

Terminal

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:

Terminal

{
  "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, simply run:

swarmcli

Its integrated system-info panel streams lightweight CPU/memory metrics across your entire multi-node cluster dynamically 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.

2026 Docker Swarm Mastery Series

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.

Stay Connected

Originally published at https://swarmcli.io.


메타데이터
post_id
eb4c1bd11b9e
slug
the-ultimate-edge-cluster-setting-up-a-3-node-swarm-on-raspberry-pi-5-2026-eb4c1bd11b9e
url
https://medium.com/@swarmcli/the-ultimate-edge-cluster-setting-up-a-3-node-swarm-on-raspberry-pi-5-2026-eb4c1bd11b9e
canonical_url
https://medium.com/@swarmcli/the-ultimate-edge-cluster-setting-up-a-3-node-swarm-on-raspberry-pi-5-2026-eb4c1bd11b9e
author_url
https://medium.com/@swarmcli
status
ok
fetched_at
2026-07-11 21:05:18