From e7205fcb9d094fdcd9f32a2d85eb6f14457116a3 Mon Sep 17 00:00:00 2001
From: MadLittleMods
The code of Synapse is written in Python 3. To do pretty much anything, you'll need a recent version of Python 3. Your Python also needs support for virtual environments. This is usually built-in, but some Linux distributions like Debian and Ubuntu split it out into its own package. Running sudo apt install python3-venv
should be enough.
A recent version of the Rust compiler is needed to build the native modules. The +easiest way of installing the latest version is to use rustup.
Synapse can connect to PostgreSQL via the psycopg2 Python library. Building this library from source requires access to PostgreSQL's C header files. On Debian or Ubuntu Linux, these can be installed with sudo apt install libpq-dev
.
Synapse has an optional, improved user search with better Unicode support. For that you need the development package of libicu
. On Debian or Ubuntu Linux, this can be installed with sudo apt install libicu-dev
.
The source code of Synapse is hosted on GitHub. You will also need a recent version of git.
For some tests, you will need a recent version of Docker.
-A recent version of the Rust compiler is needed to build the native modules. The -easiest way of installing the latest version is to use rustup.
The preferred and easiest way to contribute changes is to fork the relevant project on GitHub, and then create a pull request to ask us to pull your @@ -180,6 +180,9 @@ git checkout develop
If you need help getting started with git, this is beyond the scope of the document, but you can find many good git tutorials on the web.
Before installing the Python dependencies, make sure you have installed a recent version +of Rust (see the "What do I need?" section above). The easiest way of installing the +latest version is to use rustup.
Synapse uses the poetry project to manage its dependencies
and development environment. Once you have installed Python 3 and added the
source, you should install poetry
.
@@ -195,14 +198,28 @@ for other installation methods.
cd path/where/you/have/cloned/the/repository
poetry install --extras all
-This will install the runtime and developer dependencies for the project.
+This will install the runtime and developer dependencies for the project. Be sure to check
+that the poetry install
step completed cleanly.
To start a local instance of Synapse in the locked poetry environment, create a config file:
cp docs/sample_config.yaml homeserver.yaml
+cp docs/sample_log_config.yaml log_config.yaml
-Now edit homeserver.yaml, and run Synapse with:
+Now edit homeserver.yaml
, things you might want to change include:
server_name
log_config
to point to the log config you just copiedregistration_shared_secret
so you can use register_new_matrix_user
command.And then run Synapse with the following command:
poetry run python -m synapse.app.homeserver -c homeserver.yaml
+If you get an error like the following:
+importlib.metadata.PackageNotFoundError: matrix-synapse
+
+this probably indicates that the poetry install
step did not complete cleanly - go back and
+resolve any issues and re-run until successful.
Join our developer community on Matrix: #synapse-dev:matrix.org!