Installing [matrix]-bridges on FreeBSD

FreeBSD Mar 1, 2021

Here is my example using mautrix-facebook as example‌

$ mkdir bridges/facebook
$ cd bridges/facebook
$ virtualenv -p /usr/local/bin/python3.7 .
$ bash
$ source bin/activate
$ pip install --global-option=build_ext --global-option="-I/usr/local/include" --upgrade git+https://github.com/tulir/mautrix-facebook.git#egg=mautrix-facebook[all]
$ cp example-config.yaml config.yaml

Edit config.yaml file to suit your current setup. Please note line ‌

database: postgres://bridge_facebook:[secret_password]@127.0.0.1/bridge_facebook

Next step is to create postgres database for bridge.‌

su - postgres
$ createuser --pwprompt bridge_facebook
$ psql
CREATE DATABASE bridge-facebook
ENCODING 'UTF8'
LC_COLLATE='C'
LC_CTYPE='C'
template=template0
OWNER bridge_facebook;‌

Start generation of registration.yaml file‌

$ python -m mautrix_telegram -g
$ vi registration.yaml‌

Add additinaly listening port again, bellow url: line.‌

url: http://localhost:29319
port: 29319‌‌
$ vi /usr/local/etc/matrix-synapse/homeserver.yaml‌

Put additional lines like bellow:‌

app_service_config_files:
/usr/home/synapse/bridges/facebook/registration.yaml
service synapse restart‌

Next step is to write rc startup script for your daemon...

Tags

Jordan Ostreff

2G/3G/4G/NSA-5G/SA-5G Mobile Packet Core, Telco Clouds, Ericsson CEE, OpenStack, NFV, Orchestration, SDN, Containerisation, Networking IPv4/IPv6, Industrial Computer Networks, Mathematics, Engineering

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Share with Me via Nextcloud