Installation of Cousins Matter
This has been tested on Linux and Windows+WSL2 with Ubuntu or Debian + Docker Desktop installed. (The install script has not yet been tested on MacOS, but should work with very few changes)
Production installation
Section titled “Production installation”Prerequisites
Section titled “Prerequisites”If not already done, install Docker on your server:
curl https://get.docker.com | shYou will also need a Python 3.14+ environment to run the Cousins Matter admin script.
Download and run the Cousins Matter admin script
Section titled “Download and run the Cousins Matter admin script”Please replace in the link below the <release> placeholder with the current release of Cousins Matter:
curl https://raw.githubusercontent.com/leolivier/cousins-matter/refs/tags/<release>/scripts/manage_cousins_matter.pypython manage_cousins_matter.py install [-d <directory>] [-r <release>]- if -d directory is not given, it will install in the current directory
- if -r release is not given, it will install the latest release
This command will:
- download the necessary files for Cousins Matter;
- create the necessary directories;
- create the base .env file from an example;
- run an editor on the .env file to suit your needs (see the Settings page). In particular, don’t forget to add the information to create the superuser.
This script can also help you to migrate from v1 to v2 version of Cousins Matter and to rotate your secret key from time to time.
To get the different commands available, run:
python manage_cousins_matter.py -hTo get help for a specific command, run:
python manage_cousins_matter.py <command> -hStart Cousins Matter
Section titled “Start Cousins Matter”cd <directory>docker compose up -dThe first time, go to http://127.0.0.1:8000/members/profile, log in using the admin account that you have just created and complete your profile.
And you’re done!
Build from source
Section titled “Build from source”-
Install Docker and uv if not yet done
curl https://get.docker.com | shpip install uv -
Clone the git repo:
git clone https://github.com/leolivier/cousins-matter.gitcd cousins-matter
Note for contributors: if you want to contribute to the cousins-matter development, first fork the project on github and clone your own repo.
-
Create and sync your python virtual environment:
uv sync -
Update your settings: Copy
env.exampleto.envand edit.envto set the properties according to your needs, see the Settings page.You can automatically create the SECRET_KEY by running the following command:
./manage_cousins_matter.sh rotate-secrets -
build the docker image:
make build t=cousins-matter:local -
Use your local image by adding the following line to the .env file:
COUSINS_MATTER_IMAGE=cousins-matter:local -
Start everything:
make up
Run it outside Docker
Section titled “Run it outside Docker”If you want to debug your installation, you can run it outside Docker.
For this, instead of starting make up, use:
make up4run # will start the needed containers: postgres, redis, and qcluster (using the image built previously)# to start cousins-matter in dev modemake run # will reload automatically after each code modification# to run tests (no UI tests)make test [t=<test name>]# to run UI testsmake test-ui [t=<test name>]# get all other make command by just runningmakeor start debugging from your IDE (the project is already configured for Visual Studio Code in the .vscode/launch.json file)