Working with Multiple Raspberry Pis

I've been running multiple Raspberry Pis on my home network, so I thought I'd share my best practices

Predictable IP Addresses

Set a predictable IP address by either:

  1. Setting your DHCP server to assign the IP

  2. Setting up a static IP

Suggestions for IP Address: Set the IP Address to the Raspberry Pi Version, for example, this is my home network:

  • - Raspberry Pi 3

  • - Raspberry Pi 4 ethernet

  • - Raspberry Pi 4 wlan

If I get more Raspberry Pis, I may extend to use double digits, for Example:

  • - Raspberry Pi 3 #1

  • - Raspberry Pi 3 #2

  • - Raspberry Pi 4 #1

  • - Raspberry Pi 4 #2

  • - Raspberry Pi 4 #3

Disable SSH Strict Host Check

If you switch out your SD cards often enough, you may want to disable StrictHostKeyChecking.

Inside ~/.ssh/config:

StrictHostKeyChecking no

Cache repository requests

Assuming you are using Raspbian.


sudo apt install apt-cacher-ng

This will enable a HTTP maintenance page on the server, for example (change to your server ip)


sudo apt install squid-deb-proxy-client

Debian Wiki for AptCatcherNg issues a security warning as the server is detected on the network via mDNS.

Do not install auto-apt-proxy and squid-deb-proxy-client at the same time. auto-apt-proxy's configuration will override squid-deb-proxy-client.



tail -f /var/log/apt-cacher-ng/apt-cacher.log


We are going to install rolldice a simple package which is easily removable, so its great for testing

sudo apt install rolldice

On the server, observe you are getting a request from the client.


To remove rolldice:

sudo apt remove rolldice

How it works

apt-cacher-ng is a proxy and stores files in /var/cache/apt-cacher-ng/ . apt-catcher-ng will publicize it exists over mDNS using avahi-daemon.


To test if the server is being detected run:


This should return the server URL, for example:

If does not happen, test to see if the server is publicizing itself.

On the client, we first need avahi-browse, which exists in the avahi-utils package.

sudo apt install avahi-utils

On the client after installation we can run avahi-browse:

avahi-browse -a | grep apt_proxy

Look for a line similar to:

+ eth0 IPv4 apt-cacher-ng proxy on pi3 _apt_proxy._tcp local

If this line does not appear, then your client is not detecting your server.

If your client detects the server, but the server is not caching check your client apt directory /etc/apt/apt.conf.d/ for files which may configure your apt proxy

grep -R Proxy /etc/apt/apt.conf.d/*