apt-cacher-ng
When you manage more than a handful of Debian or Ubuntu systems, you quickly discover that downloading the same packages repeatedly from the internet is both wasteful and slow. Enter apt-cacher-ng, a caching proxy specifically designed for Debian package repositories. It sits between your local machines and the upstream mirrors, storing packages locally after the first download and serving them from cache for subsequent requests.
The beauty of apt-cacher-ng lies in its simplicity. Installation is straightforward: a single apt install apt-cacher-ng on a server, and you have a working proxy listening on port 3142. Client configuration is equally painless – you can either set the proxy in each machine’s apt configuration, or use the auto-detect feature if your network supports it. Once configured, every package fetched by any client is cached, dramatically reducing bandwidth usage and speeding up updates across your network.
apt-cacher-ng handles the complexities of Debian repositories gracefully. It understands the structure of Packages files, Release signatures, and the various compression formats used by apt. It can cache packages from multiple distributions simultaneously – Debian stable, testing, Ubuntu LTS, and their various architectures – all through the same proxy instance. The web-based status page provides visibility into cache statistics, and the maintenance features help keep the cache clean over time.
For homelabs and small offices, apt-cacher-ng is nearly indispensable. The reduction in download times is immediately noticeable, especially when spinning up new virtual machines or containers. The decreased load on upstream mirrors is a bonus for the broader community. While there are alternatives like approx and squid-deb-proxy, apt-cacher-ng strikes a good balance between features and simplicity that makes it my go-to choice for Debian caching proxies.