Debian – Install package proxy using apt-cacher

apt-cacher-ngWhen dealing with lots of Debian installs (or a Debian network), using a package proxy can save you a lot of bandwidth and time. Apt-cacher is a nice little feature that will store your packages. So every time you download the same package on a different machine (or same, or any) it will get it from your local proxy instead of the internet. Here is how you enable it.

apt-get install apt-cacher

Check your allowed_hosts configuration in /etc/apt-cacher/apt-cacher.conf
A * allow everything. More info is in the config file.

service apt-cacher restart to apply the changes in the config.

That’s it for the proxy. Now you need to change your “guests” to use the proxy.

vim /etc/apt/apt.conf
Acquire::http::Proxy “http://192.168.1.100:3142/apt-cacher/”;

And then run apt-get update

If you are doing a new install, enter this when asked for proxy:
http://192.168.1.100:3142/apt-cacher/

Happy installing!

Related Posts

A compact server with connected Ethernet cables and illuminated network ports in a dark server room.

Fix Debian 13’s 120-Second systemd-networkd Boot Delay

A boot pause close to two minutes can occur when systemd-networkd-wait-online.service cannot satisfy its definition of an online network. The systemd 257 documentation specifies a default timeout…

php8 gd

PHP8 gd Activate after installation

PHP8 GD activate after installation. GD doesn’t get activated by default. Not even a reboot after installation will activate it. So how do we do it? In…

Debian 12: linux-image-6.1.0-10amd64

Troubleshooting dependency issues in Debian 12: Resolving linux-image-6.1.0-10amd64 package dependency problems. If you installed the Debian 12 from the live image the issue is the raspi-firmware. Even…

OpenMediaVault default password

OpenMediaVault default password

OpenMediaVault default password is printed in the documentation. I did not see it the first time I installed it either. So I had to do some detective…

Debian change dns

Debian change DNS settings to a new DNS

Debian change DNS settings for speed improvement or privacy. It is really easy to do. So let us see how it’s done and get to it. The…

Upgrade debian 9 to debian 10

Upgrade Debian 9 to Debian 10

Upgrade Debian 9 to Debian 10 is very similar to upgrading previous versions. The only you need to do is change the sources to Buster instead of…

Leave a Reply