Setup Local Repositories with ‘apt-mirror’ in Ubuntu and Debian Systems

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.95/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.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

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...

8 Responses

  1. Ravindra Maghudiya says:

    hi Matei Cezar, thanks a lot this great tutorial, i am all done with this process and now my network repository running very well.
    but i want too add some extra package other then default mint and ubuntu repository like google chrome,wpa office, in short i want the repository in that i can add my own deb or tar package and install it in my network. waiting for your great response, thanks in advance.

    • Matei Cezar says:

      I do not recommend adding thirty-party software in apt-mirror list, especially non-free software. Add only repos maintained by the distribution. As far as a know Kingsoft Office doesn’t provide any ppa for Ubuntu, only deb packages. Try to download the latest deb packages for the applications you need and place them in a new directory on the ftp server (/srv/ftp/my_deb for example).

  2. Luc Filiatrault says:

    I have 2 Debian client and one Debian server (back-up server). The later took less than 20 minutes to pass from Wheezy to Jessie .
    Do you think I would save bandwith if I build a repository basically for the 2 clients,considering when I move from one version to the next I will have to download all the new version packages again.


    • Ravi Saive says:

      If you setup a local repository in one of your sever for 2 clients, it will save bandwidth as it downloads and install packages from your local repository..

      In short, your local repository server will first download all packages in your server and then clients will fetch packages from your repository server, this way you can save bandwidth and time..

  3. hatta says:

    thank you for the information, I’ve tried to configure the server and succeed. but when I try to access via ftp client, it appears username and password. my question is how to fix it ?

  4. Joe says:

    I ran apt-mirror and it downloaded a ton of stuff, so far so good, but it only created the ubuntu/pool directory, I don’t have necessary directories such as ubuntu/dists, and this causes the client to fail apt-get update. Any idea what would cause that and how to fix it?

  5. Etescartz says:

    Thanks for the great reading material!
    I haven’t had the chance to test your setup in production but I do have one set up with nginx as a web server repository. It used by just about 1000 clients and it is really fast.
    The hardware has more of a 2003-2004 feeling about it but it does the job flawlessly.

Got something to say? Join the discussion.

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