Assign Hostnames
Boot each Pi and go to Desktop → Preferences → Raspberry Pi Configuration → System. Set the hostname according to its role:
| Node | Hostname | Role |
|---|---|---|
| Pi 4 (2 GB) | MASTER | Docker Swarm Manager |
| Pi 3 B+ #1 | SLAVE1 | Swarm Worker |
| Pi 3 B+ #2 | SLAVE2 | Swarm Worker |
| Pi 3 B+ #3 | SLAVE3 | Swarm 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:
$ hostname -i
Write down the hostname and IP for each node. You will need the MASTER's IP when initialising Docker Swarm:
| Hostname | Example IP | Notes |
|---|---|---|
| MASTER | 192.168.0.23 | Swarm advertise address |
| SLAVE1 | 192.168.0.17 | |
| SLAVE2 | 192.168.0.18 | |
| SLAVE3 | 192.168.0.19 |
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.