Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a student at Case Western Reserve University, and the bandwidth from the Ubuntu servers to my location is often horrendously bad (on the order of a few hundred bytes per second). Myself and a few friends would like to be able to download the packages once, and have them cached for the rest of our Ubuntu installations on campus. To do that, we would either need to setup our own APT repositories, or setup some form of caching (squid?) server at which we could point our systems.

Is setting up such a mirror a difficult process? How would one accomplish it?

share|improve this question
possible duplicate of Best way to cache apt downloads on a LAN? – 8128 Oct 27 '10 at 19:30
Not even 1k/s? I'd recommend that you complain to your system administrator. Even Starbucks' free wifi can reach 150k/s. – Gödel Oct 27 '10 at 21:10
@Gödel: The actual connection is much faster -- I get downloads of 1MB/s pretty much everwhere except aptitude related stuff. The mirror in this are just seems to be extremely slow. – Billy ONeal Oct 28 '10 at 2:57
I'm also at CWRU and have seen less than stellar speeds to the default mirror. Have you tried using a mirror that is on Internet2 such as I can often get speeds greater than 1MB/s to such mirrors. – Eric Perko Mar 4 '11 at 3:51
@Eric: Ah -- switching the mirror does seem to fix the problem. Perhaps the "Select best mirror" bit cares more about latency than bandwidth. Thanks! – Billy ONeal Apr 5 '11 at 23:16
up vote 7 down vote accepted

You might want to use apt-proxy instead of a full mirror, since it will then take considerably less space and time to get set up:

You would then need to update the repository lists for anyone wanting to use your proxy.

share|improve this answer

There are several ways to mirror a repository or cache package downloads. What is the best solution depends on how many people are going to use it and what infrastructure is already available.

For example, many universities already have local software mirrors, and in that case the easiest solution is probably to add Ubuntu to that mirror. ;)

And if your university already has a proxy server, it might be possible to use that (maybe with some custom settings for the repositories?).

When you want to mirror the whole or some part of the official repositories (and/or other repositories), you can use something like apt-mirror, debmirror, debpartial-mirror, mirrorkit or ubumirror. Mirroring the whole repositories might pull in a lot of packages that nobody ever uses, so if bandwidth is really an issue (even at night) it might be useful to mirror only the popular packages...

When you want to cache only the used packages, there are apt-cacher, apt-cacher-ng or apt-p2p, or a proxy like Squid.

One advantage of having a local mirror (when compared to a cache) is that installation/upgrades will always be fast (for the packages that are available on the mirror), while when using a cache the first person who needs a package will have to wait until it's downloaded. You can also configure the mirror to update at night, so that downloading packages happens when (almost) nobody else is using the internet uplink.

OTOH the advantage of using a cache is that you will only download exactly what packages are needed, and never more than that.

share|improve this answer

Yes you can and here is a sample just take a look is an easy solution and a well explain solution here.

share|improve this answer
Please, avoid link-only answers. – That Brazilian Guy May 15 '14 at 16:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.