> ## Content Index
> Fetch the complete content index at: https://ostreff.info/llms.txt
> Use this file to discover other available public pages before exploring further.

# Installing [matrix]-bridges on FreeBSD
- URL: https://ostreff.info/installing-matrix-bridges-on-freebsd/
- Published: 2021-03-01T18:00:00.000Z
- Updated: 2022-04-05T10:37:12.000Z
- Author: Jordan Ostreff
- Tags: FreeBSD, [matrix], #matrix

Here is my example using [mautrix-facebook](https://github.com/tulir/mautrix-facebook?ref=ostreff.info) 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
$ psqlCREATE 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...