Phase 1 — Build Cluster · Step 3 of 14

Configure the Cluster

Assign hostnames to each node, map IP addresses, and set up VNC Viewer so you can control all four Pis from one computer.

Assign Hostnames

Boot each Pi and go to Desktop → Preferences → Raspberry Pi Configuration → System. Set the hostname according to its role:

NodeHostnameRole
Pi 4 (2 GB)MASTERDocker Swarm Manager
Pi 3 B+ #1SLAVE1Swarm Worker
Pi 3 B+ #2SLAVE2Swarm Worker
Pi 3 B+ #3SLAVE3Swarm Worker

Press OK and reboot when prompted.

Enable VNC for Remote Access

Still in Raspberry Pi Configuration, open the Interfaces tab and enable VNC. Remember to press OK.

This allows you to connect to each Pi's full desktop from your controlling computer.

Note Your IP Addresses

After rebooting, open a terminal on each Pi (Alt+Ctrl+T) and run:

Find node IP address
$ hostname -i

Write down the hostname and IP for each node. You will need the MASTER's IP when initialising Docker Swarm:

HostnameExample IPNotes
MASTER192.168.0.23Swarm advertise address
SLAVE1192.168.0.17
SLAVE2192.168.0.18
SLAVE3192.168.0.19
⚠️
Assign static/reserved IPs on your router for each Pi's MAC address. If IPs change after a reboot, Swarm communication will break.

Install VNC Viewer on Your Computer

Download RealVNC Viewer on the computer you'll use to manage the cluster:

https://www.realvnc.com/en/connect/download/viewer/

Connect to each Pi by entering its IP address. You'll see its full desktop in a window — no HDMI cable needed.

💡
Should I disable the Desktop to save RAM? — The desktop environment only uses ~35 KB of RAM while idle. Keeping it running is fine and makes VNC access much more convenient.