Page:
Bridge setup
7
Bridge setup
Jostein Kjønigsen edited this page 2021-01-13 09:28:24 +01:00
Table of Contents
Requirements
- Python 3.7 or higher with
pip
andvirtualenv
- A Matrix homeserver that supports application services (e.g. Synapse)
- A PostgreSQL server (which you should already have for Synapse)
- An instance of signald (Existing users: please note signald has caused breaking changes by moving the repo and renaming the master branch! If you've setup signald in the past, you may have to manually fix your environment.)
Production setup
- Create a directory for the bridge.
- Set up a virtual environment.
- Create with
virtualenv -p /usr/bin/python3 .
- Activate with
source ./bin/activate
- Create with
Install the bridge with(there are no releases yet)pip install --upgrade mautrix-signal[all]
- If you want the master branch instead of a release, use
pip install --upgrade 'git+https://github.com/tulir/mautrix-signal.git#egg=mautrix-signal[all]'
. [all]
at the end will install all optional dependencies. You can also specify only some optional dependencies (comma-separated), like[metrics,qrcode]
. See optional-requirements.txt for existing optional dependencies.
- If you want the master branch instead of a release, use
- Copy
example-config.yaml
toconfig.yaml
. - Update the config to your liking. You'll at least need to change the homeserver settings and add yourself to the permissions section.
- Generate the appservice registration with
python -m mautrix_signal -g
. You can use the-c
and-r
flags to change the location of the config and registration files. They default toconfig.yaml
andregistration.yaml
respectively. - Add the path to the registration file to your Synapse's
homeserver.yaml
underapp_service_config_files
. Restart Synapse to apply changes. - Run the bridge
python -m mautrix_signal
.
Upgrading
- Run the bridge install command again (install step #2).
Development setup
- Clone the repository.
- Optional, but strongly recommended: Set up a virtual environment.
- Create with
virtualenv -p /usr/bin/python3 .venv
- Activate with
source .venv/bin/activate
- Create with
- Install dependencies with
pip install -r requirements.txt
- Optionally, add
-r optional-requirements.txt
to install optional dependencies.
- Optionally, add
- Continue from step #3 of production setup.
Upgrading
- Pull changes from Git.
- Update dependencies with
pip install --upgrade -r requirements.txt
.- If you installed optional dependencies, run the same
pip
command as when installing them, but with--upgrade
- If you installed optional dependencies, run the same
Wiki deprecated
mautrix-signal docs are now on docs.mau.fi