apt-cacher-ng is a nice little software to create a local cache of the Debian mirrors (but it can also operate on other distribution mirrors). The full documentation is available on the project's homepage (see in particular the excellent user manual).

Here are some quick instructions to get started.


apt-get install apt-cacher-ng

To announce the service on the network, you may also want to install Avahi:

apt-get install avahi-daemon


Now of course, clients need to know about this proxy. You have two options:

HTTPS repositories

apt-cacher-ng will obviously fail to serve HTTPS repositories. There are many solutions upstream but I have found the simplest solution to be to simply tunnel HTTPS connections directly on the proxy, by putting this in /etc/apt-cacher-ng/acng.conf:

PassThroughPattern: .*

This is, as far as I can tell, the only way to avoid doing a special configuration on the clients for HTTPS repositories. The downside is that HTTPS content is not cached.