This document provides information for those interested in hacking on or contributing to SourceHut.


Here are some tips to expedite the installation procedure:

  • A PostgreSQL database and Redis server are always required.
  • Some services require (or may optionally make use of) an S3-compatible storage backend. Minio is recommended for this purpose.
  • Generally, you can skip the webhooks daemons unless you need them.
  • Always prefer package installations for obtaining dependencies.
  • You can usually get away without configuring the outgoing mail settings, but you may still have to generate a PGP key to get things started up.
  • You can skip setting up a reverse proxy and use our development servers via python3 instead.
  • Some services depend on other services. Some such integrations are optional, but all services depend on
#Dev dependencies

In addition to the runtime dependencies of our packages, building packages from source requires additional build-time dependencies:

  • sassc for CSS pre-processing
  • npm for minifying CSS
  • go for compiling the Go APIs
#Generic instructions

Do this once, when starting with

  • In addition to, check out
  • Copy's config.example.ini to config.ini and configure everything following the instructions in the comments.

Then, for each SERVICE:

  • export SRHT_PATH=/path/to/
  • export PYTHONPATH=/path/to/$SERVICE
  • make all

For each service except

  • Copy the service's section(s) from its config.example.ini into's config.ini, modifying it according to the comments.
  • ln -s /path/to/ config.ini

For each SERVICE:

  • createdb $SERVICE
  • ./$SRV-initdb (e.g. ./metasrht-initdb)

To run a service:

  • ./api/api
  • python

#Sending Patches

We use git send-email and discuss patches (and other development topics) on the list. Please send your patches and development questions there.

About this wiki

commit 7b1ad7e37a518af54c2d519f785ed8a3bea7a240
Author: Haowen Liu <>
Date:   2022-06-20T12:51:57-07:00

Fix debian/oldstable update frequency
Clone this wiki (read-only) (read/write)