Run your own Software Heritage

This tutorial will guide from the basic step of obtaining the source code of the Software Heritage stack to running a local copy of it with which you can archive source code and browse it on the web. To that end, just follow the steps detailed below.

Using Docker

The easiest way to run a Software Heritage instance is to use Docker and docker-compose. Please refer to the docker-compose documentation if you do not have a working docker setup.


git clone
cd swh-environment/docker
docker-compose up -d

When all the containers are up and running, you have a running Software Heritage platform. You should open:

All the internal APIs are also exposed:

At this point, the simplest way to start loading software is to use the ‘Save Code Now’ feature of the archive web interface:

For details and an overview of what you can do with your Software Heritage, see the full Docker environment documentation.

Enjoy filling your hard drives!

Hacking the archive

If you want to hack the code of the Software Heritage Archive, a bit more work will be required.

To be able to write patches, you will need a development setup.

The best way to have a development-friendly environment is to build a mixed docker/virtualenv setup.

Such a setup is described in the Developer Setup Guide.