Setting up an ‘Apt-Cache’ Server Using ‘Apt-Cacher-NG’ in Ubuntu 14.04 Server

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Babin Lonston

I'm Working as a System Administrator for last 10 year's with 4 years experience with Linux Distributions, fall in love with text based operating systems.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

23 Responses

  1. prasad says:


    Nice setup… Thanks a lot you saved bandwidth and time.

  2. David says:

    Great article. Thanks. I got it working in just a few minutes and verified caching. Cheers.

  3. dtulyakov says:

    add /etc/apt/apt.conf.d/02proxy
    Acquire::https::Proxy “false”;

  4. Amauri says:

    Good afternoon!
    Congratulations on the excellent material available !
    I take this opportunity to ask the noble friend , if there is an option to lock and / or release for some “hosts “.

    I thank you attention!

  5. Brent says:

    Wow, what a day, wrong again… MAAS has a proxy configuration near the bottom of the settings page. LOL, this is what happens when you work on stuff too long. All is working now!

  6. Brent says:

    Oh wait, i just realized my mistake. I was thinking apt-cacher-ng was a caching mirror, when its essentially a proxy and thus needs to be in the proxy configuration. Of course MAAS doesnt have that.. sigh. Will have to see if my router can redirect clients instead.

  7. Brent says:

    I am trying to get this working for ubuntu 14.04 LTS installs. I am playing with MAAS and it has the ability to populate an archive server for installs. I setup a separate VM with just 14.04 and apt-cacher-ng and pointed the MAAS archive setting to it. The setup is working as it shows the proxy information when you go to the VM with the apt-cacher-ng installed. When tell MAAS to start a machine, it runs the PXE installer and starts the ubuntu server 14.04 LTS install. The installer stops at the archive part with bad archive mirror. I set the mirror to http://ipofaptcacherng:3142 and left the directory as “/” on the next screen and hit continue, but it fails again saying the mirror is bad.

    I do lots of test installs at my house, so i thought i would save everyone some bandwidth with this setup. I use a mirror at the datacenter, but i didnt want to download 50GB to a machine i may or may not keep super long.

    Did i miss something? I followed the instructions in this post to the letter….

    • @ Brent Have you read the article without loosing every line ?
      //Note: This is not an Ubuntu or Debian Mirror, this is just a cache server for apt packages.// Here i have said clearly it’s not a Mirror it’s a cache.

  8. dcpc says:

    Nice Article.

    How do you get updated missing in motd messages please ?

  9. @ alberto, Happy to hear from you, thanks for the feedback.

  10. alberto says:

    hi babin.
    realy, this article is good, very good. no difficulty.
    I implemented apt-cacher-ng in the company by your steps and I get sucess.
    i’m using mint17 32 e 64 bits and I’m thinking about translate it for brazilian mint community (of course, with references to you).

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.