mirror of
https://github.com/mautrix/facebook.git
synced 2026-11-16 23:05:05 +00:00
No results
6
Bridge setup
Tulir Asokan edited this page 2021-01-30 19:56:51 +02:00
Table of contents
Requirements
- Python 3.7 or higher with
pipandvirtualenv - A Matrix homeserver that supports application services (e.g. Synapse)
- A PostgreSQL server (which you should already have for Synapse)
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
pip install --upgrade mautrix-facebook.- If you want the master branch instead of a release, use
pip install --upgrade 'git+https://github.com/tulir/mautrix-facebook.git#egg=mautrix-facebook[all]'.
- If you want the master branch instead of a release, use
- Copy
example-config.yamltoconfig.yaml. - Update the config to your liking. You'll at least need to change the homeserver and database settings, and add yourself to the permissions section.
- Generate the appservice registration with
python -m mautrix_facebook -g. You can use the-cand-rflags to change the location of the config and registration files. They default toconfig.yamlandregistration.yamlrespectively. - Add the path to the registration file to your Synapse's
homeserver.yamlunderapp_service_config_files. Restart Synapse to apply changes. Create the database withNo longer needed in v0.2.0 and up.alembic upgrade head. If you have a custom config path, usealembic -x config=/path/to/config.yaml upgrade head- Run the bridge
python -m mautrix_facebook.
Upgrading
- Run the bridge install command again (install step #2).
Update the database with the command in install step #7.
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 - 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
pipcommand as when installing them, but with--upgrade
- If you installed optional dependencies, run the same
Update the database with the command in install step #7.
Wiki deprecated
mautrix-facebook docs are now on docs.mau.fi