Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A buildout config for mirroring PyPi. With this solution you will have your own PyPi in your home or bussiness network.

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 doc
Octocat-spinner-32 etc
Octocat-spinner-32 patch
Octocat-spinner-32 CHANGELOG
Octocat-spinner-32 README.rst
Octocat-spinner-32 buildout.cfg

PyPi Mirror Installer

The PyPi mirror installer is a source-installation kit that installs a PyPi mirror and all its dependencies.

Feedback/bugs to:


Issue tracker and development

This buildout for PyPi Mirror is developed on Github. The issue tracker also lives there.

Installation Instructions

The installer will compile Nginx and it will install required python eggs from Pypi. (See "Dependencies" below.)

It's recommended to install PyPi Mirror inside a virtualenv.

First of all, edit buildout.cfg and modify the following parameters:

mirror-base at repository section. This is the directory where all packages will be downloaded.


mirror-base = /media/sd/pypi

url at mirror-config. That URL will be the URL for access to your PyPi mirror.


url =

Once you have installed all required dependencies, you can continue with the installation process. So you execute the following command:

$ python2.6

You should have the buildout environment ready to go. Now, you must execute the buildout installation:

$ bin/buildout

At the end, you should have the 'bin/pypimirror' binary. Now it's time to start downloading packages from PyPi executing the following command:

$ bin/pypimirror -I -c -v etc/pypi/pypimirror.cfg


The following packages are necessary to run buildout and install the PyPi mirror.:

GNU make

Startup/Shutdown/Restart instructions

You should run bin/supervisord and Nginx server should be automatically started.

To start Nginx,:

$HOME/bin/supervisorctl start nginx

To stop Nginx,:

$HOME/bin/supervisorctl stop nginx

To restart Nginx,:

$HOME/bin/supervisorctl restart nginx

To check status,:

$HOME/bin/supervisorctl status nginx

Also, you can access to Supervisor Admin Panel at:


(Use the default admin password in doc/adminPassword.txt)

To change the admin password, edit the supervisor part in buildout.cfg and run bin/buildout.

Password changes will not be reflected in doc/adminPassword.txt.


Nginx server runs on port 8080

Supervisord server runs on port 9000

Edit buildout.cfg and run bin/buildout to change ports.

Post-installation instructions

Now, we have our PyPi mirror ready to go. We must to run the following command::

$HOME/bin/pypimirror -I -c -v $HOME/etc/pypi/pypimirror.cfg

This command will start downloading all packages from PyPi. When finished an index.html file will be generated containing an index with all downloaded packages.

At this time, you should be able to access to that index at:


Mirror update

When the buildout installation process has finished it configures a cron job for keeping the mirror up to date every two hours.

You can see this cron job executing the following command:

$ crontab -l

Edit the buildout.cfg and run bin/buildout to change the cron job execution frequency.

Uninstall instructions

  1. Stop supervisord
  2. Remove the folder $HOME/pypi-mirror
Something went wrong with that request. Please try again.