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.

Then:

git clone https://forge.softwareheritage.org/source/swh-docker-dev.git
cd swh-docker-dev
docker-compose up -d

When all the containers are up and runnig, 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 indexing software is to use the ‘Save Code Now’ feature of the archive web interface:

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.

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

Such a setup is described in the Perfect Developer Setup guide.

Installing from sources (without a virtualenv)

If you prefer to run everything straight, you should refer to the Manual Setup Guide