How to create a Ubuntu repository server -

This guide will show how to configure a local repository server based on Ubuntu Bionic, but it can be adapted to a previous version of Ubuntu or even to any distribution using Aptitude as the main package management system, like Debian or Mint. You might typically want to setup a local repository to save Internet bandwidth.

This is a companion discussion topic for the original entry at

HI, excellent guide. I’m having trouble with what web page to go to after all is installed. Apache is up and running but I can’t locate what the web address should be to get to the packages that have been downloaded. I’ve tried using the one have (changed the IP of course) but I’m getting a 404 error. Do i need to edit an Apache file?
Thanks in advance.

Hi Pcpaulh,

Welcome to our forums.

If you followed the guide, you only have to change the following in your sources.list:



You can also use DNS name if you have name resolution set up. In this case you don’t need to change the webserver’s configuration. The above changes are only needed on the actual repositories you mirrored.


“In case you don’t have much space on disk you can choose to not mirror src packages”

What are the implications of that? What is the downside?


Another question… The partition my mirror is configured on is full. I have mounted a new partition, but I don’t see a way to configure mirror.list to use both partitions. I am mirroring multiple repositories, and I’d like to “move” one to the new partition. Is that possible?

Hi Adam_Moericke,

Welcome to our forums.

The downside of not mirroring the src packages is that you will not be able to install the sources from your mirror, only the compiled packages that are meant for installation.

About more partitions under the mirror: the simplest way would be to symlink directories from your new partition to paths on the original one, which would hold the repositories you plan to store on the 2nd partition.

Thanks so much for your suggestion, the symlink did the trick!

1 Like