Shared apt cache using apt-cacher-ng

Shared apt cache using apt-cacher-ng

Shared apt cache using apt-cacher-ng
In this short how-to i will describe how to use Shared apt cache using apt-cacher-ng. With the use of apt-cacher-ng you can safe a lot traffic since it acts like a cache proxy and will download deb packages only once.



  • apt-cacher-ng (on Server)
  • new config file in: /etc/apt/apt.conf.d/01apt-cacher on Server and Clients



Install apt-cacher-ng
Install the apt-cacher-ng software as root user on your server:

aptitude install apt-cacher-ng


Configure apt-cacher-ng
Modify file: /etc/apt-cacher-ng/acng.conf as you need it.


Create a Proxy config on your server + all sharing clients
Place a new file in your apt conf dir: /etc/apt/apt.conf.d/01apt-cacher with following content:

Acquire::http { Proxy "http://yourServerIP:3142"; };
Acquire::https { Proxy "https://"; };


Thats it!
After that you can use apt-get or aptitude update/upgrade regulary.
The connection will now be passed through your apt-cacher-ng proxy server instance and if there are any existing packages it will use the cached ones instead of loading them over internet again.

You can watch your apt-cacher proxy stats by entering url:


into your browser.

Have fun!


Jules is the owner and author of ISPIRE.ME. He's a Linux System Engineer, Tech fanatic and an Open Source fan.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.